What are the Caveats for Relational Developer in Apache Cassandra?

Connect with

Apache Cassandrawell, What are the caveats for relational developer in Apache Cassandra? Most of us came from Relational background so we somewhere think relational beauty in first go.

Apache Cassandra is well known column-oriented data based in the NOSQL big data space. Lest us discuss one by one of it’s primary caveats for the relational developer, it means, if you have the background of relational then you have to get out of that and think from the different perspective. If you are learner of Apache Cassandra you can visit my previous post about what is Apache Cassandra?. The RDBMS best practices can be good practices in Cassandra.

In the software world, we came from different background, it means, with different roles and with different responsibilities in a company. Some of them from: hard-core developer, Project manager, Architect, Product Manager, Operational team, devOps team, IT-infrastructure, business , process. The thinking mindset of all of them are different from different perspective. Being an architect, you have to think on different NFR (Non-Functional Requirements) for you business Use Case. These following things will certainly help out your business need.

The following are the primary caveats for the relational developer in Apache Cassandra:

  1. No Normalization:
  2. Apache Cassandra does not supports normalize structure of Data, if you do so , you have to pay for this , this is anti-pattern in Cassandra. Normalization is the best practices in any RDBMS but this is bad practices in Cassandra.

  3. De-normalization:
  4. Apache Cassandra not only encourage but also allow to De-normalize your data structure to store in its storage engine.

  5. Focus on Query:
  6. In the relational world , first identify business domain model and start storing data and later point of time you start pulling the data. In Apache Cassandra, you have to reverse your thinking, first you thing what data you want to get and what would be the query for that , based on the query you need to thing how to store data, How to choose Primary key, cluster key, and data type in order to distribute data and in order to scale out the application.

  7. Physical Topology of Cluster:
  8. The physical topology are different if you compare to RDBMS world. Cassandra is peer-to-peer architecture it means no primary no secondary, no master no slave, all the node in the cluster treats equally.

  9. Collection (Set, List, Map):
  10. in the RDBMS, we keep the data straight forward , based on the data types available for that RDBMS database. Apache Cassandra, supports complex data type i.e. Set ( which keeps unique data) , list ( a list of any type) , Map ( key and value) where key and value can be any type. Here, Set, Map and List are same data type as in Java. You know , Cassandra is developed in Java so these complex data type derived from java language, which almost all language have these type.

  11. No Foreign key & no Referential Integrity:
  12. Foreign key and referential integrity check is the one of the beauty of RDBMS but not in Apache Cassandra. Cassandra does not support any forms of foreign key, referential integrity check.

  13. No Join:
  14. You know almost all the NOSQL does not support join, in order to scale out of your system. Apache Cassandra also does not support any type of join on database level. If join is not supported, then how can you make relationship between different entities? This is very basic question which must raise in your mind , what are the work around to achieve this. One of the option is, you can join in your application level not on database level, but remember if you do so, you have to pay something like performance cost.

  15. No Sequence:
  16. Apache Cassandra does not supports any sequence like RDBMS, it support counter data type to ncrement your counter value for your business needs, like number of pageView of a specific URL in your application etc.

  17. Trade-off in ACID:
  18. According to CAP theorem Apache Cassandra lies in the A (Availability) and P (Partition Tolerance), but support eventual consistency. There is a trade-off of ACID and BASE which you have to opt for your business need.

  19. Column oriented storage engine:
  20. Cassandra store data in Map> . It does not store in completely row-oriented fashion like any RDBMS.

  21. Schema-less & Data Type
  22. Apache Cassandra supports all type of data: Structured data, Semi-Structured data and Unstructured data. Cassandra is not completely schema-less but due to its flexible nature of schema and supporting of complex data type , you can say its schema-less.


In a nutshell, you can say, you have to think following things for your business Use-Case, which Apache Cassandra provides and well known for:

  1. scale-out (Horizontal Scaling)
  2. Fault-Tolerance
  3. High Availability
  4. Distributed database,
  5. Massive storage engine in Petabyte, exabyte..
  6. Super fastening write and Optimized read,
  7. Eventual consistency

Your suggestions are welcome to improve this article 🙂

Connect with

2 thoughts on “What are the Caveats for Relational Developer in Apache Cassandra?”

Leave a Comment

Your email address will not be published. Required fields are marked *