1. 网络数据模型:
它是分层数据模型的高级版本。为了组织数据,它使用有向图而不是树结构。在这个孩子可以有不止一个父母。它使用两种数据结构的概念,即记录和集。
在上图中,Project 是根节点,它有两个孩子,即项目 1 和项目 2。项目 1 有 3 个孩子,项目 2 有 2 个孩子。总共有5个孩子,即A部门、B部门和C部门,他们是网络相关的孩子,因为我们说这个模型可以有一个以上的父母。因此,对于 B 部门和 C 部门有两个父项,即项目 1 和项目 2。
2. 关系数据模型:
关系数据模型由 EF Codd 于 1970 年开发。它们没有物理链接,因为它们处于分层数据模型中。以下是关系数据模型的属性:
- 数据仅以表格的形式表示。
- 它只处理数据而不处理物理结构。
- 它提供有关元数据的信息。
- 在行和列的交叉处,元组将只有一个值。
- 它提供了一种轻松处理查询的方法。
网络和关系数据模型之间的区别:
Network Data Model | Relational Data Model |
---|---|
It organizes records to one another through links or pointers. | It organizes records in form of table and relationship between tables are set using common fields. |
It organizes records in form of directed graphs. | It organizes records in form of tables. |
In this relationship between various records is represented physically via linked list. | In this relationship between various records is represented logically via tables. |
There is lack of declarative querying facilities. | It provides declarative query facility using SQL. |
Complexity increases burden on programmer for database design as well as data manipulation. | As physical level details are hidden from end users so this model is very simple to understand. |
Retrieval algorithms are complex but symmetric. | Retrieval algorithms are simple and symmetric. |
There is partial data independence in this model. | This model provides data independence. |
VAX-DBMS, DMS-1100 of UNIVAC and SUPRADBMS’s use this model. | It is mostly used in real world applications. Oracle, SQL. |