Difference between Relational model and Document Model

1. Relational Model :
Relational model is a model for the management of the database. It is called so because the data is stored in the form of relations i.e., in the form of tables. Every row consists of related data. These row in the table depict a real-world entity. To work with python and the Relational data model we need a prerequisite knowledge of – SQL and Pandas. Pandas is a library of Python.

2. Document Model :
In the document model, the data is stored in the form of documents. The documents consist of the records which describe the actual and data of the document. A nested document can be used to provide information about subcategories of the data. Document can also be used to represent real-world objects.



Difference between Relational and Document Model :

Relational Model Document Model
It is row-based. It is document-based.
Not suitable for hierarchical data storage. Generally used for hierarchical data storage.
It consists of a predefined schema. It consists a dynamic schema.
ACID properties are followed by this model. (Atomicity, Consistency, Isolation, and Durability). CAP theorem are followed by this model. (Consistency, Availability, and Partition tolerance).
It is slower . It is faster than Relational Model.
Supports complex joins. Does Not support for complex joins.
It is column-based. It is field-based.
They are vertically scalable They are horizontally scalable
East replication support is not provided. They provide easy replication support
It is more used now-a-days to store data in database. It is comparatively less used.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



Improved By : pp_pankaj

Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.