Collection
zero Useful+1
zero

Data mode

Announce Upload video
Logical mode
The mode of storing data in the database, because of the data mode, can construct the complex data structure to establish the internal relationship and complex relationship between data, thus forming the global structure mode of data.
The data model describes the data in terms of "type" based on the selected data model, while the corresponding "instance" describes the data in terms of "value". The corresponding data model can be discussed based on the data model first, and the corresponding instance can be obtained based on the data model.
Chinese name
Data mode
Foreign name
Date Schema

pattern

Announce
edit
Definition: also known as logical mode, it is a description of the logical structure and characteristics of all data in the database, and a common data view for all users.
understand:
① A database has only one schema;
② It is the view of database data at the logical level;
③ The database schema is based on a certain data model;
④ When defining a schema, it is not only necessary to define the logical structure of the data (such as which data items make up the data record, the name, type, value range, etc. of the data item), but also to define the security and integrity requirements related to the data and the relationship between these data.

External Schema

Announce
edit
Definition: Also called subschema or user mode, it is a description of the logical structure and characteristics of local data that can be seen and used by database users (including application programmers and end users), a database user's data view, and a logical representation of data related to an application.
understand:
① A database can have multiple external schemas;
② External mode is user view;
③ External mode is a powerful measure to ensure data security.

Internal Schema

Announce
edit
Definition: also known as Storage Schema, it is a description of the physical structure and storage method of data, and is the representation of data within the database (for example, whether records are stored in order, in B-tree structure, or in hash method; how indexes are organized; whether data is compressed and stored, and whether it is encrypted; what are the regulations on the storage record structure of data)
understand:
① A database has only one internal mode;
② A table may consist of multiple files, such as data files and index files.
It is a method for database management system (DBMS) to effectively organize and manage data in the database
Its purpose is to:
① To reduce data redundancy and realize data sharing;
② To improve access efficiency and performance.
Conceptual Schema
Conceptual schema is a description of the logical structure of global data in the database system and a common data view for all users (applications). This description is an abstract description, which does not involve specific hardware environment and platform, nor specific software environment.
The conceptual schema mainly describes the conceptual record types and data of data and their relationships. It also includes some semantic constraints between data. Its description can be defined in DDL language in DBMS.
External Schema
An external schema is also called a subschema or a User's schema. It is the user's data view, that is, a part of the schema that the user sees. It is derived from a conceptual schema. The conceptual schema gives the global data description of the system while the external schema gives the local description of each user. A conceptual pattern can have several outer patterns, and each user only cares about the patterns related to it. This can shield a lot of irrelevant information and is conducive to data protection, so it is extremely beneficial to users. The general DBMS provides the related external schema description language (external schema DDL).
 
Internal Schema
The internal mode is also called Physical Schema. It gives the physical storage structure and physical access methods of the database, such as file structure, index, clustering, hash and other access methods and access paths for data storage. The physical nature of the internal mode is mainly reflected in the operating system and file level, but it does not go deep into the device level (such as disk and disk operations), However, in recent years, there is a trend towards device level development (such as raw disks, disk partitioning technology, etc.). DBMS generally provides related internal mode description language (internal mode DDL).
The data schema gives the data framework structure of the database, and the data in the database is the real entity, but these data must be organized according to the structure described by the framework. The database composed of the conceptual schema as the framework is called the conceptual database, and the database composed of the external schema as the framework is called the user's database, The database with the internal mode as the framework is called the physical database. Of the three databases, only the physical database actually exists in the external memory of the computer. The other two databases do not really exist in the computer, but are mapped from the physical database through two kinds of mapping.
The three levels of a pattern reflect the three different environments of the pattern and their different requirements. The inner pattern is at the lowest level, which reflects the actual storage form of data in the computer physical structure. The conceptual pattern is at the middle level, which reflects the overall logical requirements of the designer's data, while the outer pattern is at the outermost level, which reflects the user's requirements for data.
The three-level model of the database system is the abstraction of data at three levels. It leaves the specific physical implementation of data to the physical model, so that users and global designers can not care about the specific implementation and physical background of the database. At the same time, it establishes the connection and conversion between the three-level models through two-level mapping, making the conceptual model and external model have no physical existence, However, it is also possible to obtain its existing entities through mapping. At the same time, two-level mapping also ensures the independence of data in the database system, that is, changes in the physical organization of data and changes in the logical concept level do not affect changes in the outdoor mode. It only needs to adjust the mapping method without changing the user mode.
Mapping from conceptual schema to internal schema
This mapping gives the correspondence between the global logical structure of the data in the conceptual schema and the physical storage structure of the data. This mapping is generally implemented by DBMS.
Mapping of external patterns to conceptual patterns
A conceptual pattern is a global pattern while an outer pattern is a local pattern of the user. Multiple outer patterns can be defined in a conceptual pattern, and each outer pattern is a basic view of the conceptual pattern. The mapping from the outer pattern to the conceptual pattern gives the corresponding relationship between the outer pattern and the conceptual pattern, which is generally implemented by DBMS. [1]