Since most developers who have used databases are familiar with traditional RDBMS systems, I’ll explain Cassandra SuperColumns as succinctly as possible using some tables.
The first is an example of a row from a column_family.
select * from user_1;
| column_name | column_value |
|---|---|
| name | kelley reynolds |
| favorite_drink | hard cider |
As you can see, this shows some name/value pairs, and those values are easy to get quickly. Now a supercolumn, on the other hand, is usually illustrated like so:
select * from users;
| supercolumn_name | column_name | column_value |
|---|---|---|
| user_1 | name | kelley reynolds |
| user_1 | favorite_drink | hard cider |
| user_2 | name | kevin way |
| user_2 | favorite_drink | port ellen |
But this would be WRONG! It would actually be illustrated more like this:
select * from users;
| supercolumn_name | subcolumns |
|---|---|
| user_1 | {name:’kelley reynolds’,favorite_drink:’hard cider’} |
| user_2 | {name:’kevin way’,favorite_drink:’port ellen’} |
And now you should be thinking to yourself, “Self, that’s silly! I’d never do it that way. If I wanted to access just the favorite drink of one of those people, I’d have to read the entire thing, deserialize it, then read just the row I was after. I can’t read just one subcolumn with it done that way!”
Exactly!

