Database mode: database mode

Source: Internet
Author: User

Database mode: database mode

Three-Level mode structure: external mode, mode, and internal mode

I. Schema)

Definition: Also known as the logical mode. It is the logical structure and feature description of all data in the database and is the public data view of all users.

Understanding:

① A database has only one mode;

② It is the logical view of database data;

③ The database mode is based on a data model;

④ When defining a mode, you must not only define the logical structure of the data (for example, which data records are composed of, but also the name, type, and value range of the data items ), in addition, data-related security and integrity requirements should be defined to define the relationships between these data.

Ii. External Schema)

Definition: Also known as Subschema or user mode, it is the logical structure and feature description of local data that can be seen and used by database users (including application programmers and end users, it is the data view of database users and the logical representation of data related to an application.

Understanding:

① A database can have multiple external modes;

② The external mode is the user view;

③ External mode is a powerful measure to ensure data security.

Iii. Internal Schema)

Definition: Storage Schema. It describes the physical structure and Storage mode of data and represents the internal representation of data in the database (for example, the record storage method is sequential storage, B-tree storage, or hash Storage. The indexing method is organized. Whether the data is compressed or encrypted; what are the storage record structures of Data ).

Understanding:

① 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 used by the database management system (DBMS) to effectively organize and manage data in the database.

Its purpose is:

① To reduce data redundancy and achieve data sharing;

② To improve access efficiency and performance.

1. Conceptual Schema)

The conceptual model is the description of the logical structure of global data in the database system and the public data view of all users (applications). This description is an abstract description, it does not involve specific hardware environments and platforms, but also has nothing to do with specific software environments.

The conceptual model mainly describes the conceptual record types and relationships between data. It also includes semantic constraints between data and its description can be defined by the DDL language in DBMS.

2. External Schema)

The external mode is also called Subschema or User's schema. It is a User's data view, that is, a part of the mode that the User sees, it is derived from the concept mode. The concept mode gives the global data description of the system, while the external mode gives the local description of each user. A conceptual model can have several external models, and each user only cares about the models related to it. This can shield a large amount of irrelevant information and facilitate data protection, which is extremely beneficial to users. Generally, DBMS provides the relevant external mode Description Language (external mode DDL ).

3. Internal Mode (Internal Schema)

The internal mode is also called the Physical Schema. It provides the Physical storage structure and Physical access method of the database, such as the file structure, index, cluster, and hash of data storage. The physical nature of the internal mode is mainly reflected in the operating system and file level, it does not go deep into devices (such as disks and disk operations), but in recent years there has been a trend towards device-level development (such as raw disks and disk Partitioning technologies ), DBMS generally provides the relevant internal mode Description Language (internal mode DDL ).

The data mode provides the data framework structure of the database, and the data in the database is the real entity, but the data must be organized according to the structure described by the framework, A Database composed of Conceptual models is called a Conceptual Database. A Database composed of external models is called a user's Database ), A Database composed of frameworks in the internal mode is called a Physical Database. Only Physical databases in these three databases are actually stored in computer external storage, the other two databases do not actually exist in the computer, but are mapped by physical databases.

The three layers of the mode reflect the three different environments of the mode and their different requirements. The internal mode is at the lowest layer, which reflects the actual storage form of data in the physical structure of the computer, the concept mode is in the middle layer, which reflects the global logic requirements of the designer's data, while the external mode is in the outermost layer, which reflects the user's requirements for data.

The three-level mode of the database system is the abstraction of three levels of data. It leaves the physical implementation of data to the physical mode, this allows users and global designers to avoid having to worry about the specific implementation and Physical background of the database. At the same time, it establishes the connection and conversion between three-level modes through two-level ing, although the concept mode and the external mode do not exist physically, they can also obtain their existing entities through ing. At the same time, the two-level ING also ensures the independence of data in the database system, that is, the physical organization change and logical concept change of data do not affect the change of the user's external mode. It only needs to adjust the ing mode without changing the user mode.

1. ing between conceptual mode and Internal Mode

This ing gives the correspondence between the Global Logical Structure of data in the conceptual mode and the physical storage structure of data. This ing is generally implemented by DBMS.

2. ing from external mode to conceptual Mode

The conceptual mode is a global mode, while the external mode is a local mode of the user. A Conceptual mode can define multiple external modes, and each external mode is a basic view of the conceptual mode. The ing between the external mode and the conceptual mode provides the correspondence between the external mode and the conceptual mode. This ing is generally implemented by the DBMS.

Note: (1) to ensure the independence of the Logical Data of the database, you must modify the ing between the mode and the external mode.

(2) to ensure the independence of the Logical Data of the database, you must modify the ing between the. mode and the internal mode.

(3) among the three modes of the database, there is only one mode and one internal mode, while the external mode can have multiple.


Related Article

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.