[Database] - Three-level schema structure, concept of data model/three elements

  1. Describe the three-level schema structure of the database system, and explain what are the advantages of this structure?

    The three-level schema structure of a database system consists of an outer schema, a schema, and an inner schema .

    • External mode, also known as sub-mode or user mode , is a description of the logical structure and characteristics of local data that database users (including application programmers and end users) can see and use. A logical representation of the data concerned.
    • Schema, also known as logical schema , is a description of the logical structure and characteristics of all data in the database , and is a common data view for all users. A schema describes the global logical structure of data. External schema refers to the local logical structure of data, usually a subset of the schema.
    • Internal mode, also known as storage mode , is the representation of data inside the database system, that is, the description of the physical structure and storage method of data. The three-level mode of the database system is three levels of abstraction for data, which leaves the specific organization of data to the DBMS management, so that users can process data logically and abstractly, without having to care about the representation and storage of data in the computer.
    • In order to realize the connection and transformation of these three levels of abstraction internally, the database system provides two layers of images between the three levels of schema: external schema/schema image and schema/internal schema image . It is these two layers of images that ensure that the data in the database system can have high logical independence and physical independence .
  2. Describe the concept of the data model, the function of the data model and the three elements of the data model.

    1. The data model is a tool used in the database to abstract the real world , and a formal framework used to provide information representation and operation means in the database. Generally speaking, a data model is a collection of strictly defined concepts. These concepts accurately describe the static characteristics, dynamic characteristics and integrity constraints of the system.
    2. Therefore, the data model usually consists of three parts: data structure, data operation and integrity constraints .
      1. Data structure: It is a collection of object types under study, and it is a description of the static characteristics of the system.
      2. Data operation: refers to the collection of operations allowed on instances (values) of various objects (types) in the database, including operations and related operation rules, and is a description of the dynamic characteristics of the system.
      3. Data constraints: It is a set of integrity rules. Integrity rules are the constraints and dependency rules of the data and their connections in a given data model, which are used to limit the database status and status changes that conform to the data model, so as to ensure the correctness, validity and compatibility of the data. Parsing a data model is one of the most important concepts in database systems.
    3. A data model is the foundation of a database system . Any DBMS is based on a certain data model, or supports a certain data model. In a database system, there are different levels of models. According to the different purposes of the model application,
    4. Models can be divided into two categories or levels :
      1. One is the conceptual model, which models data and information from the user's point of view, and is used to model the information world, emphasizing the ability to express semantics, and the concept is simple and clear;
      2. The other type is the data model, which models the data from the point of view of the computer system. It is used in the machine world. People can use it to define and manipulate the data in the database. Generally, a strict formal definition and a set of strictly defined syntax are required. and semantic language, with some stipulations and restrictions, for easy implementation on machines.

Guess you like

Origin blog.csdn.net/weixin_56462041/article/details/131361143