I have a question regarding the Cassandra data modelling while choosing the strategy.
I need to store the employee data that consists of attributes like id, name, email, date of birth, designation but these attributes will grow in future.
The partition key is going to be id.
There are two ways to design the table
Create employee table:
CREATE TABLE employee_horizontal ( id text, name text, email text, dob DATE, designation text, PRIMARY KEY (id) ) ;
But here I have the limitation that I can query using id
Create employee table:
CREATE TABLE employee_kv ( id, key text, (predefined set of attributes name, email,dob, designation) value text, PRIMARY KEY (id,key) );
The above table will give leverage to do a lookup based on id and key (if that key exists for employees).
Could someone please suggest some pros/cons for the above strategy?