Hello Everyone,
We are planning to migrate an multi-tenancy application which has around 400 tables from RDBMS to Cassandra. Our application uses SQL Queries extensively and some of the queries (30-40%) are joining 8-10 tables running into pages.
I want some pointers on how we can model the database in cassandra.
Assuming i want to create the following table in cassandra..
CREATE TABLE CUSTOMER
(
TENANT_ID NUMBER(10) NOT NULL,
CUSTOMER_ID NUMBER(20) NOT NULL,
CUSTOMER_NAME VARCHAR2(50) NOT NULL,
.
.
.
CONSTRAINT CUSTOMER_PK PRIMARY KEY(TENANT_ID,CUSTOMER_ID)
);
In Cassandra i am thinking of creating the following for the above table.
CREATE TABLE customer
(
id uuid,
tenant_id int,
customer_id int,
customer_name text,
.
.
.
PRIMARY KEY (id)
);
CREATE TABLE customer_lkup
(
tenant_id int,
customer_id int,
id uuid,
PRIMARY KEY (tenant_id,customer_id)
);
Some pointers is highly appreciated. Also we have hundreds of SQL queries in our application, does that mean we have to denormalized and have as many CFs as my SQL queries ?
I am using CQL 3.0.
Best Regards
Ed
