patternModerate
Why Cassandra is not considered a relational database?
Viewed 0 times
whyconsideredrelationaldatabasecassandranot
Problem
Read this answer
Relational databases are based on the relational model, an intuitive, straightforward way of representing data in tables. In a relational database, each row in the table is a record with a unique ID called the key. The columns of the table hold attributes of the data, and each record usually has a value for each attribute, making it easy to establish the relationships among data points.
Cassandra has tables.
Data being relational has nothing to do with support of ACID properties.
Data being relational has nothing to do with normalised data
-
Why Cassandra is not considered Relational database?
-
Why Cassandra is considered NoSQL database? despite it has tables
Relational databases are based on the relational model, an intuitive, straightforward way of representing data in tables. In a relational database, each row in the table is a record with a unique ID called the key. The columns of the table hold attributes of the data, and each record usually has a value for each attribute, making it easy to establish the relationships among data points.
Cassandra has tables.
CREATE TABLE movies (
movie_id UUID,
title TEXT,
release_year INT,
PRIMARY KEY (( movie_id ))
);Data being relational has nothing to do with support of ACID properties.
Data being relational has nothing to do with normalised data
-
Why Cassandra is not considered Relational database?
-
Why Cassandra is considered NoSQL database? despite it has tables
Solution
Cassandra is not an RDBMS because it does not support the relational data model.
The fundamental assumption of the relational model is that all data is
represented as mathematical n-ary relations, an n-ary relation being a
subset of the Cartesian product of n domains
https://en.wikipedia.org/wiki/Relational_model
Instead, it models data as a key-value store, where the values are rows. But there's no requirement that all the "rows" in a "table" have the same "columns", as is the case in the relational model.
From Wikipedia:
Unlike a table in an RDBMS, different rows in the same column family
do not have to share the same set of columns, and a column may be
added to one or multiple rows at any time.[29]
Each key in Cassandra corresponds to a value which is an object. Each
key has values as columns, and columns are grouped together into sets
called column families. Thus, each key identifies a row of a variable
number of elements. These column families could be considered then as
tables. A table in Cassandra is a distributed multi dimensional map
indexed by a key. Furthermore, applications can specify the sort order
of columns within a Super Column or Simple Column family.
https://en.m.wikipedia.org/wiki/Apache_Cassandra
The fundamental assumption of the relational model is that all data is
represented as mathematical n-ary relations, an n-ary relation being a
subset of the Cartesian product of n domains
https://en.wikipedia.org/wiki/Relational_model
Instead, it models data as a key-value store, where the values are rows. But there's no requirement that all the "rows" in a "table" have the same "columns", as is the case in the relational model.
From Wikipedia:
Unlike a table in an RDBMS, different rows in the same column family
do not have to share the same set of columns, and a column may be
added to one or multiple rows at any time.[29]
Each key in Cassandra corresponds to a value which is an object. Each
key has values as columns, and columns are grouped together into sets
called column families. Thus, each key identifies a row of a variable
number of elements. These column families could be considered then as
tables. A table in Cassandra is a distributed multi dimensional map
indexed by a key. Furthermore, applications can specify the sort order
of columns within a Super Column or Simple Column family.
https://en.m.wikipedia.org/wiki/Apache_Cassandra
Context
StackExchange Database Administrators Q#280929, answer score: 11
Revisions (0)
No revisions yet.