Different non-relational database types
Databases can be roughly divided into two groups, relational databases (SQL) and non-relational databases (NoSQL). On some of our previous blogs, we have already discussed the differences between them and what their advantages and disadvantages are.
Today we will see what types of non-relational databases exist. We can divide them into four groups :
Document based (MongoDB, Firestore)
Column based (Cassandra)
Graph based (Neo4j)
Key-value represents one of the basic NoSQL types. We have unique keys that store values that can be in JSON, BLOB or any other data type. We can use them to store large amounts of data, but without some complex queries.
Document based represents extension of type mentioned before. Each document contains an array of key-value pairs. The data is stored in JSON or XML format.
Column based databases are considered two dimensional key-value databases. Each row does not need to have the same columns. They are very useful for storing large amounts of data when we can anticipate queries.
A database of graphs, as its name suggests, models data in the form of graphs. The key elements of this database are nodes and edges. Nodes represent entities while the edges are the relationships between them. Both nodes and edges have their own unique identifier.
We can make a certain correlation between terms, for example in SQL databases and NoSQL document based. For example, we can look at a collection of documents in a document-based type such as a table in relational databases. One row in a SQL database is like a document, and a column is a property or attribute of one document.