Site icon KSoftLabs

Database Models – Part 2

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

Disadvantages of Key Value Database Model

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

Disadvantages of Column Based Database Model

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

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

Disadvantages of Graph Data Model

If you want to learn MongoDB check this tutorial. https://www.guru99.com/mongodb-tutorials.html

References

Exit mobile version