Skip to content
Related Articles

Related Articles

Difference between Relational model and Document Model

View Discussion
Improve Article
Save Article
  • Last Updated : 16 Aug, 2022

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 :

S. No.Relational ModelDocument Model
1.It is row-based.It is document-based.
2.Not suitable for hierarchical data storage.Generally used for hierarchical data storage.
3.It consists of a predefined schema.It consists a dynamic schema.
4.ACID properties are followed by this model. (Atomicity, Consistency, Isolation, and Durability).CAP theorem are followed by this model. (Consistency, Availability, and Partition tolerance).
5.It is slower .It is faster than Relational Model.
6.Supports complex joins.Does Not support for complex joins.
7.It is column-based.It is field-based.
8.They are vertically scalableThey are horizontally scalable
9.Fast replication support is not provided.They provide easy replication support
10.It is more used now-a-days to store data in database.It is comparatively less used.
11.To add attributes in a relational model, database schema needs to be modified for including additional columns and their data types.In a document-based database, you need to add additional key-value pairs in the document for representing new fields.
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!