Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

mukheja.nitin avatar image
mukheja.nitin asked ·

Is Cassandra schemaless?

I saw the netflix case study where its mentioned cassandra has schemaless architecture. I understand what schemaless is but i always thought for casasndra we need to have fixed schema.

https://www.datastax.com/sites/default/files/content/case-study/files/2019-09/CS-Netflix.pdf

cassandra
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

No, Cassandra isn't schemaless in the way you're thinking. The document you linked talks about the architecture of the database being schemaless, not the data model itself.

In relational databases, tables are rigid fixed two-dimensional structures where you have fields going across the table with 1 or more rows which has all the fields regardless of whether a cell has a value or not (empty).

In Cassandra, the tables (column families) don't have a rigid structure and can be multi-dimensional. Depending on the data model, a partition can be a wide row with a dynamic number of columns (clustering key). In addition if a column doesn't have a value, it doesn't occupy any disk space (sparse storage) which means that you can have partitions with only 1 column or thousands of columns. This is what others mean by "schemaless architecture". Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.