3 min to complete
Differences between data modeling in Scylla and in Relational databases
To recap the basic data modeling lesson, data modeling in Scylla is based around the application and queries, as opposed to the relational world where it’s based around the data entities.
If you have some background in relational databases you will notice there are a few differences in the data modeling approach. Understanding these differences will help you when creating the data model. These are the main differences:
|1||Query-based: Application -> Data -> Model||Entity-based: Data -> Model -> Application|
|4||Denormalization||Support for foreign-keys, Joins|
|5||CAP Theorem, Eventual Consistency||ACID Guarantee|
|6||Distributed Architecture||Mostly single point of failure|
In Scylla, we think about the application before thinking about the data. Data modeling is query based. In relational databases, however, the queries are mostly an afterthought and the data model is based on the entities.
Scylla has a distributed architecture which ensures high availability and no single point of failure. This and the CAP theorem are described in more detail in the introduction lesson.
The distributed architecture and the fact that the data is spread around multiple Nodes, restricts some operations such as joins and the use of foreign keys. Instead, we use techniques such as denormalization which will be explained later on.