The structure of the database system
From the perspective of database application developers, the database system usually adopts a three-level model structure, which is the internal system structure of the database system.
From the perspective of database end users, the structure of the database system is divided into single-user structure, multi-user structure, master-slave structure, distributed structure, CS, BS/database server multi-layer structure, etc.
Concept differentiation
Schema
A structural description of the data in the database, the structure information of the observed data
View / Data
Data in the database shown in a certain form of expression
Three-level model structure
From the structural point of view, it is the pattern, and from the data point of view, it is the view.
External mode / user mode / sub mode / partial mode-(external) view
At the local level, a structural description of the data that a user can see and process
(Concept) Mode/Global Mode/Logic Mode — Concept View
At the global level, the structure description of the data to be understood/managed from a global perspective, including the corresponding association constraints, is
reflected in the intrinsic essential connection between the data
Internal Mode/Physical Mode/Storage Mode — Internal View
The structure description of the data stored on the medium, including storage path, storage method, index method, etc.
Two-layer image
EC Mapping
- Map the external mode to the conceptual mode to support the conversion of the conceptual view of the data to the external view
- Convenient for users to observe and use
C-I Mapping
- The conceptual mode is mapped to the internal mode to support the conversion of the conceptual view of the data to the internal view
- Convenient for computer storage and processing
Two data independence
Logical data independence
When the conceptual model changes, you can leave the external model unchanged (just change the E-CMapping), so there is no need to change the application
Physical data independence
When the internal mode changes, the conceptual mode can be unchanged (just change the CI Mapping), so as not to change the external mode
Standard structure of database system
Data model
Abstraction of the characteristics of real-world data.
The data model is the core and foundation of the database system.
Data model and pattern
- The model that specifies the unified description of the model, including: data structure, operation and constraints
- The data model is an abstraction of the structure of the pattern itself, and the pattern is an abstraction of the structure of the data itself.
such as,
- Relational mode: All modes can be in the form of abstract tables [data structure], and each specific mode is a specific table with different column names. What are the [operation] and [constraints] for data in this table format
Three classic data models
- Relational model: organize data in the form of a table
- Hierarchical model: organize data in the form of a tree
- Mesh model: organize data in the form of graphs