📜  关系模型和文档模型的区别

📅  最后修改于: 2021-09-08 15:52:33             🧑  作者: Mango

1. 关系模型:
关系模型是一种用于管理数据库的模型。之所以这样称呼,是因为数据以关系的形式存储,即以表格的形式存储。每一行都由相关数据组成。表中的这些行描述了一个真实世界的实体。要使用Python和关系数据模型,我们需要先决条件——SQL 和 Pandas。 Pandas 是一个Python库。

2. 文件模型:
在文档模型中,数据以文档的形式存储。文件由描述文件的实际和数据的记录组成。嵌套文档可用于提供有关数据子类别的信息。文档还可用于表示现实世界的对象。

关系模型和文档模型的区别:

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.