Level three schema structure in the database

Source: Internet
Author: User

A schema is a description of the logical structure and characteristics of all data in a database, also known as a conceptual or conceptual view. Views can be understood as a set of recorded values that the user or programmer sees and uses for the contents of the database.

The pattern is in the middle layer of level three structure, it is the abstract representation of the actual storage of the whole database, is also an abstraction to the real world, is the representation of all the information content collection of the real World Application environment (enterprise or organization), and also the result that all individual user views synthesize together, so it is also called the user common view.

A pattern is a data model that is precisely defined using a data description language. The three levels of the data pattern: the outer layer, the concept layer and the inner layer constitute the three-level pattern structure of the database system, no matter how the function of the database management system changes, the platform of the operating system is different, and the data model is different, the characteristics of the three-level model structure of the database system are basically unchanged.

External mode is also called user mode, which is defined as sub-mode in traditional database system, and sub-mode is a subset of conceptual pattern. The external mode defines the data by user view, or it can be exported from the conceptual mode.

The conceptual model, also known as the logical mode, is the twisted band between the real world and the data storage. The concept pattern is the abstraction and description of the global data logical relationship, which is independent of the physical storage structure of the data, and is the common logical view of all the users after the database design is realized.

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

The DBMS provides an internal schema description language (Internal-mode DDL) to define internal patterns.

In the database system, the external mode can have many, but the concept mode, internal mode can only have one.

The internal pattern is the representation of the actual storage of the entire database, and the conceptual pattern is an abstract representation of the actual storage of the entire database. The outer pattern is an abstract representation of a part of a conceptual pattern.

All of these patterns must be defined before the database is used. The database management system provides schema description language DDL, which is used to strictly describe the definition of all entities in a database and is stored in the database after compilation. The outer pattern is associated with each specific application and the high-level programming language it uses. The internal mode is related to the physical storage (operating system) and hardware of the data. Conceptual patterns are independent of specific applications and physical environments, and are logical representations of all data in a database.

The process of database design is to synthesize the external mode, produce the conceptual pattern, and produce the physical pattern according to the DBMS used. The user view is then exported by the conceptual mode, which is the logical data that the user sees.

The three-level schema structure of the database is three levels of abstraction for the data. Between these three levels of abstraction, in order to transform the data, the database management system must provide a two-layer mapping function, that is, the mapping of the outer mode and the conceptual pattern, the conceptual mode and the internal pattern.

The mapping of the external and conceptual patterns defines the correspondence between the outer and conceptual patterns, usually given in the external schema. The purpose of this layer mapping is to realize the independence of logical data. When the overall logical structure of the data changes, if an external mode remains the same, the mapping of the corresponding external and conceptual patterns needs to be changed, so that the corresponding application of the outer mode does not change.

The mapping of conceptual and internal patterns exists in the conceptual layer, and the corresponding relationship between the two is established by the DBMS. The role of this layer of mapping is to achieve the independence of physical data. When the physical storage mode of the database is modified, such as changing the storage device and accessing method, the concept mode can remain unchanged, the mapping relation of the corresponding inner mode and conceptual pattern needs to be changed, and the application does not have to change.

Advantages of Level Three structure:

(1) Ensure the independence of the data. Separating the mode and the internal mode ensures the physical independence of the data, and separates the external mode and the mode to ensure the logical independence of the data.

(2) simplifies the user interface. Write applications or type commands in an out-of-the-way mode without needing to know the storage structure inside the database to make it easier for users to use the system.

(3) Facilitate data sharing. Multiple users can share data in the system in different external modes, reducing data redundancy.

(4) To facilitate the security and confidentiality of data. In the external mode according to the requirements of the operation, the limited data can not operate, to ensure 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.