Monday, November 17, 2014

cassandra vs rdbms data model

If you are coming from a relational database world like me then the initial terminology used in cassandra will be a bit confusing.
I'll state some keywords which are used in cassandra and try to draw parallels of them to the relational world.

Note: These parallels are just for ease of understanding and actually does not equal to each other at all.

Cassandra keyword
RDBMS keyword
Keyspace
Database
Column family
Table
Column
Table Column
Row
Table row

The outermost element of Cassandra is a cluster which can be one or more nodes set up as a ring which appears as a single instance to the end user.

A cluster usually contains one or more keyspaces (Databases).

A keyspace contains one or more column families  (Tables)

A column family contains one or more rows. (Slightly different from a Table which would contain columns )

A row contains one or more columns.

The biggest difference is that the number and type of columns in rows can  differ from one another thus making the Cassandra column family much more flexible compared with the rigid table structure in the rdbms world.

In other words each row in  a column family can have its own schema. This is an extremely useful option for storing dynamic data

0 comments:

Post a Comment