Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the three-level schema structure in the database system?

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what is the three-level schema structure in the database system". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn what the three-level schema structure in the database system refers to.

The three-level schema structure of the database system means that the database system is composed of external schema, schema and internal schema. Schema, also known as logical pattern, is the common data view of all users; external mode, also known as user mode, is the data view of database users and the logical representation of data related to an application; internal schema, also known as storage mode, is the way data is organized within the database.

The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.

The three-level schema structure of the database system:

The three-level schema structure of the database system means that the database system is composed of external schema, schema and internal schema, as shown in the figure:

① mode (schema):

Schema, also known as logical pattern, is the description of the logical structure and characteristics of all data in the database, and is the common data view of all users. It is the middle layer of the database system schema structure, which does not involve the physical storage details of the data, and the right has nothing to do with specific applications, application development tools and high-level programming languages.

A schema is actually a logical view of database data. There is only one schema in a database. The database schema is based on a certain data model, agrees to comprehensively consider the needs of all users, and organically combines these requirements into a logical whole. When defining a schema, we should not only define the logical structure of the data, such as which data items are composed of data records, the name, type and value range of the data items, but also define the relationship between the data and define the security and integrity requirements related to the data.

The database management system provides schema data definition language (schema DDL) to define schemas strictly.

② external mode (external schema):

External schema, also known as subpattern (subschema) or user pattern, is the description of the logical structure and characteristics of local data that can be seen and used by fixed phones in the database (including application programmers and end users). It is the data view of database users and the logical representation of data related to an application.

The outer pattern is usually a subset of the pattern. A database can have multiple external schemas. Because it is the data view of each user, if different users have differences in application requirements, the way they view data, and the requirements for data confidentiality, the external schema description will be different. Even for the same data in the schema, the structure, type, length, security level and so on of the external schema can be different. On the other hand, the same external mode can also be used by multiple applications of a user, but only one external mode can be used by an application.

External schema is a powerful measure to ensure the security of the database. Each user can only see and access the data in the corresponding external schema, and the rest of the data in the database is not visible.

Intra-③ mode (internal schema):

Internal schema, also known as storage schema (storage schema), a database has only one internal schema. It is the description of the physical storage and storage of data, and the organization of data within the database. For example, whether records are stored in heap or in ascending (descending) order of attribute values, or in cluster (attribute values); how the index is organized, whether it is a B+ tree index or hash index; whether the data is compressed and encrypted; what are the rules of the record structure of data storage, such as fixed-length structure or variable-length structure, a record cannot be stored across physical pages, and so on.

At this point, I believe you have a deeper understanding of "what the three-level schema structure in the database system refers to". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report