I am trying to create a mental model of data model of Cassandra. What I have got so far is that the basic unit of data is a column (name, value, timestamp). A super-column can contain several columns (it has name and its value is a map). An example of ColumnFamily (which I suppose contains several entries of data or rows) is
UserProfile = { // this is a ColumnFamily
phatduckk: { // this is the key to this Row inside the CF
username: "phatduckk", //column
email: "[email protected]", //column
phone: "(900) 976-6666"//column
}, // end row
ieure: { // another row in same CF. this is the key to another row in the CF
username: "ieure",
email: "[email protected]",
phone: "(888) 555-1212"
age: "66", // a differnet column than previous one.
gender: "undecided" // a differnet column than previous one.
},
}
Question 1- To me it seems that a row in CF is nothing but a key-value pair where value is a super-column Am I correct?
Question 2- Could the value (of row key) be a map of several super columns?What I am thinking is say I want to create a row with User's name and address then the row could be key (user id) and value maps to two super columns, C1 (firstname, last name) and C2 (street, country)