P
P
pavelkolodin2016-01-20 16:48:06
MongoDB
pavelkolodin, 2016-01-20 16:48:06

How formally does the Cassandr data model differ from MongoDB?

From here:
https://www.ibm.com/developerworks/ru/library/os-a...
you can understand that the key points to the column family ( https://en.wikipedia.org/wiki/Standard_column_family )
Each " string" in Cassandra is like a document in MongoDB: any fields (columns) can be present or absent.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lega, 2016-01-20
@pavelkolodin

In Mongo, data (fields of one document) are stored in a "heap", and in Cassandra the "line" is broken - the fields are stored in different places, so it's easy to add / remove columns in Cassandra (make migrations), you can also get savings for columns with repeating data, for example, a column with true/false can be 2 elements in size, even if there are millions of "rows", but as a minus - you need to "collect" a "row" from different places, and this can be slower than loading one "bunch" as in monge.
In terms of volume, you don’t need to store the names and type of fields in the cassandra - savings, but in the mong a bunch is compressed, as a result, both databases can be more economical, depending on the data.
I think (in terms of data model) cassandra can be placed somewhere between monga and mysql.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question