Three-Level schema in the database

Source: Internet
Author: User
Schema is the logical structure and feature description of all data in the database, also known as the conceptual mode or conceptual view. A view can be understood as a set of record values that the user or programmer sees and uses in the database. The mode is in the middle layer of a three-level structure. It is an abstract representation of the actual storage of the entire database, an abstraction of the real world, and a real world

Schema is the logical structure and feature description of all data in the database, also known as the conceptual mode or conceptual view. A view can be understood as a set of record values that the user or programmer sees and uses in the database. The mode is in the middle layer of a three-level structure. It is an abstract representation of the actual storage of the entire database, an abstraction of the real world, and a real world

Schema is the logical structure and feature description of all data in the database, also known as the conceptual mode or conceptual view. A view can be understood as a set of record values that the user or programmer sees and uses in the database.

The mode is in the middle layer of a three-level structure. It is an abstract representation of the actual storage of the entire database, an abstraction of the real world, and an application environment (enterprise or unit) in the real world) the representation of all the information content set of is also the result of combining all the views of individual users, so it is also called the common view of users.

The so-called Mode refers to a data model that is precisely defined using a data description language. Three Layers of data mode: the external layer, the concept layer, and the internal layer constitute the three-level mode structure of the database system, no matter how the functions of the database management system change, how the operating system platform is different, and how the data models are different, the features of the three-level mode structure of the database system remain unchanged.

The external mode is also called the user mode. It is defined as a sub-mode in traditional database systems, and the sub-mode is a subset of the conceptual mode. The external mode defines data according to the user view, or you can export data from the conceptual mode.

The conceptual model, also known as the logical model, is a twist between the real world and data storage. The concept mode is the abstraction and description of the global data logical relationship obtained after the database is designed to achieve database data sharing. It is independent of the physical storage structure of the data, is a common logical data view of all users.

The internal mode, also known as the physical mode, describes how data is stored and accessed in the database.

DBMS provides an internal mode Description Language (internal mode DDL) to define the internal mode.

In the database system, there are multiple external modes, and each conceptual mode and internal mode can have only one.

The internal mode is the representation of the actual storage of the entire database, while the conceptual mode is the abstract representation of the actual storage of the entire database. The external mode is the abstract representation of a part of the conceptual mode.

All of these modes must be defined before using the database. The database management system provides the schema Description Language DDL to strictly describe the definitions of all entities in a database, which is stored in the database after compilation. The external mode is associated with each specific application and the advanced programming language it uses. The internal mode is related to the physical storage (operating system) and hardware of the data. The concept mode is independent of the specific application and physical environment, and is the logical representation of all data in the database.

The process of database design is to combine the external mode to generate the conceptual mode, and generate the physical mode based on the DBMS used. The concept mode exports the user view, which is the logical data that the user sees.

The three-level schema of the database is three abstract levels of data. To achieve data conversion between the three abstract levels, the database management system must provide two-layer ing functions, that is, ing between the external mode and the conceptual mode, and ing between the conceptual mode and the internal mode.

The ing between the external mode and the conceptual mode defines the correspondence between the external mode and the conceptual mode, which is generally described in the external mode. This layer of ing is used to realize the independence of Logical Data. When the overall logic structure of the data changes, if an external mode remains unchanged, the ing between the external mode and the conceptual mode needs to be changed, so the application corresponding to the external mode does not need to change.

The ing between the concept mode and the internal mode exists in the concept layer. The DBMS establishes a one-by-one correspondence between the two. This layer of ing is used to achieve the independence of physical data. When the physical storage mode of a database is changed, for example, when the storage devices and access methods are changed, the concept mode can remain unchanged, And the ing between the internal mode and the concept mode needs to be changed, the application does not need to be changed.

Advantages of a three-level structure:

(1) ensure data independence. The mode and internal mode are separated to ensure the physical independence of data. The external mode and mode are separated to ensure the logical independence of data.

(2) simplified user interfaces. Write Applications or input commands in the external mode, without understanding the internal storage structure of the database, so that you can easily use the system.

(3) conducive to data sharing. In different external modes, multiple users can share data in the system, reducing data redundancy.

(4) data security and confidentiality. In external mode, operations are performed according to requirements, and limited data operations are not allowed, ensuring the security of other data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.