Take the 2-minute tour ×

as the title says I am fairly (read: completely) new to NoSQL DBS such as Cassandra. As many others, I learned RMDBS before. So I did a little reading on 'WTF is a super column' and other obvious google hits, but I am still not sure how to model this:

Say I want to save Users, as in username/password/name/etc... what if that user has like, a mobile phone and a landline telephone? is this the 'right' way to do it? (using the same abbreviated JSON style as seen on other sites)

Users: {    // <-- this is the Users SuperColumnFamily, keyed by username
    myuser: {    // <-- this is a User SuperColumn
        username = "myuser",    // <-- this is the username Column
        email = "myuser@googlemail.com",

Phone: {    // <-- this is where the users phone numbers are stored
    myuser: {
        mobile = "0129386835235",
        landline = "123876912384",

opinions/corrections please

share|improve this question

1 Answer 1

up vote 4 down vote accepted

First things first, don't use super columns. See:


Now to answer your question. The example you described is easily modeled with just a regular column family:

Users: { <- This is the name of the column family
  username1: { <- this is a row key within the column family, it is one of your usernames
    email: user@email.com <- these are all of the columns within this row, they correspond to attributes for this user
    mobile: ...
    landline: ...
  username2: { <- another row for a different user
    email: diff@email.com

You can see the flexible schema above in that each row has a different set of columns for describing that user.

For more info on the cassandra data model I would recommend reading over http://www.datastax.com/docs/1.0/ddl/index

share|improve this answer
thank you, i was thinking too much relation –  Eike Cochu Apr 13 '12 at 6:17

Your Answer


