Commonly used data models in database systems
The development of the database has gone through the initial stage, the budding stage, the primary stage, the intermediate stage, and the advanced stage. This process has also produced many different data models. Next, we will introduce the database model in detail.
The history of the database
The history of the database
- Initial stage: manual management: human manual sorting and storing data in the budding stage
- Embryonic stage: file system: use disk files to store data
- Primary stage: the first generation of databases: the emergence of a network model, a hierarchical model database
- Intermediate stage: Second-generation database: advanced stage of relational database and structured query language
- Advanced stage: a new generation of databases: "relation-object" database
Data model supported by DBMS
1. Hierarchical model
Hierarchical model
If represented by a graph, the hierarchical model is an inverted tree. In the database, the data model that meets the following conditions is called a hierarchical model:
- There is only one node and no parent node, this node is called the root node
- Other nodes have exactly one parent node. Desktop relational model database
Second, the mesh model
Network model
In the real world, the connections between things are more non-hierarchical. It is not straightforward to use a hierarchical model to represent a non-tree structure. The network model can overcome this drawback. The mesh model is a network.
In the database, a data model that meets the following two conditions is called a mesh model:
- Allow more than one node without parent node
- A node can have more than one parent node
Three, the relationship model
Relational model
A data model that expresses the relationship between entities and entities in the form of a two-dimensional table is called a relational data model. From the perspective of the three elements of the model, the content of the relational model is:
- Data structure: a two-dimensional table.
- Data operation: definition, retrieval, maintenance, calculation of data tables, etc. Data constraint conditions: The value range of the columns in the table is the limit condition of the domain value.