I've spend the last couple of days browsing online articles, videos, and even stacks posts to understand how to model data in cassandra. I understand that one needs to model the data according to query patterns but what I don't understand is the column family and column relationship in cassandra and if that applies to they way I want to query data.
I have a relational database table that consists of the following
CUST_ID | ACCT_ID | CUST_ADDRS | ACCT_ADDRS | CUST_ST | ACCT_ST | CUST_FRAUD_IND | ACCT_DAYS_OPEN | ACCT_TYPE | CUST_CARD_IND | etc...
essentially its a table with customer IDs and their account IDs so the unique key would be cust_id+acct_id. Each customer can have many 1 or more accounts. There are attributes based on customerID like addrs, state, if the customer has a card, etc. And there are attributes based on accounts like address, state, type of account, etc...
Some of the queries we would run would be tell me if a specific customer (CUST_ID = xxxx) has any accounts that are a card account (ACCT_TYPE = 'CARD'). Or if a customer has any accounts open longer than 180 days.
I've looked at this link:
http://www.ebaytechblog.com/2012/07/16/cassandra-data-modeling-best-practices-part-1/#.VH-OezHF_6M
And I'm curious about option 4 as it looks like what should be building. So in my case my table would have a key of CUST_ID and then a super column called "Card Account", "Checking Account", etc.. that contain all the attributes of those columns.
My question is now, is that the right option, and if so, how would I build that table in cassandra? And then, how do I load data into a table that has super columns?