You can find the Part 1 of article on Database Model here
Key-Value Database Model
Key value database is a data storage paradigm where data is stored, retrieved and managed in associative arrays. These are now commonly known as Dictionary or Hash Table. As the name suggest it consists of Key and Value pairs. Here keys are unique and values can contain data of various lengths and types. He user can access the value using the key. There are no predefined schema for the values so it may contain different field for every record.
Advantages of Key Value Model
- Faster read and write operations due to simple data format
- Value can be anything including JSON
Disadvantages of Key Value Database Model
- Optimized only for data with single key and value.
- Not optimized for lookup
Column-Based Database Model
In a column based database data is stored in columns rather than in rows. This type of databases are mainly used in large data warehouses. The reason for this is that when doing analytical operations accessing only the required columns is much faster than accessing each column and then extracting few columns you need.
Advantages of Column Based Database Model
- Highly efficient data compression
- Aggregation queries
- As the column based databases can query directly to columns they perform well in queries such as calculating sum, calculating average etc.
- Column databases are highly scalable
- Fast to load and query
- These databases can be loaded extremely fast.
Disadvantages of Column Based Database Model
- High Insertion Time
- High update time
- Low performance for queries with JOINS
Document Database Model
Document oriented database model is designed for storing, retrieving and managing document oriented semi structured information. This can be described as a subclass of key value database model. Difference is that in Key Value database model data in the value is inherently opaque to the system but in document database model, system relies on meta data in the value to further optimizations. Generally the data is encoded using standard encoding techniques such as XML, YAML, JSON etc.
There is no fixed schema for the structure of the document. So it is easy to insert new field later.
Advantages of Document oriented database model
- Documents are independent
- Objects can be directly written as documents
- Can easily store unstructured data
- Have strong indexing feature
Graph Database Model
In graph database model graph structures such as nodes and edges are used to represent and store data. Graph data model can be referred as being “whiteboard-friendly”. Which means we can directly build the database using arbitrary data and their connections without formatting and structuring to fit a normalized model.
Advantages of Graph data model
- Object oriented thinking
- Very high performance for querying related data.
- Can solve problems which are impractical for relational query.
- Can do real time updates on big data simultaneously querying the data.
- Can do group by aggregate queries which are not possible in relational databases.
- Can combine multiple dimensions to manage big data.
Disadvantages of Graph Data Model
- If there is no connections, there will be no significant effect
- Less number of experts
- No standard.
If you want to learn MongoDB check this tutorial. https://www.guru99.com/mongodb-tutorials.html