Home  >  Article  >  Database  >  What needs to be modified to ensure the data independence of the database?

What needs to be modified to ensure the data independence of the database?

青灯夜游
青灯夜游Original
2020-07-23 13:14:3814461browse

In order to ensure the data independence of the database, what needs to be modified is: the mapping relationship between the schema and the foreign schema. When the database schema changes, by adjusting the mapping relationship between external schemas/schemas, the application program does not have to be modified accordingly, thus ensuring the logical independence between the data and the application program.

What needs to be modified to ensure the data independence of the database?

#Data independence is one of the most basic characteristics of a database system. Data independence means that applications and data structures are independent of each other and do not affect each other. In the three-tier schema architecture, data independence refers to the ability of the database system to change the schema at a certain level without changing the schema at the upper level. It is the two-layer image between the three-level schemas that ensures that the data in the database system has high data independence. Data independence includes data logical independence and data physical independence.

Data independence is also one of the most important goals of the database system. It makes data independent of applications.

The independence of data and program separates the definition of data from the program, and the DBMS is responsible for data access, thus simplifying the preparation of application programs and greatly reducing the maintenance and modification of application programs. .

A database structure can be logically divided into three layers: external schema, internal schema and conceptual schema. In order to improve data independence in the database system, DBMS provides two layers of imaging between these three levels of schemas. As a basic feature of database systems, the independence of data and programs relies on these three-level schemas and two-level images.

Conceptual schema, also called a schema, is a description of the global logical structure of the database that is constructed by the database designer based on all user data and based on a certain point of view.

In the three-level model of the database system, the conceptual model is in the middle layer. A database has only one conceptual model, which neither involves the physical storage details of the data nor the hardware environment nor the specific applications and programming languages. Nothing to do.

External schema is also called a sub-schema. The sub-schema is the interface between the user and the database. It is a description of the logical structure and characteristics of the local data that the database user can see and use.

The internal schema is also called the storage schema, which is a description of the physical structure and storage method of data in the database, and is the way data is represented inside the database. A database has only one internal schema. The internal schema is the lowest level of DBMS management. It is the physical abstraction when storing data on physical storage devices.

The ability to modify the schema definition at a certain level without affecting the schema at the level above it is called data independence. There are two levels of data independence: physical independence and logical independence.

For more related knowledge, please visit: PHP Chinese website!

The above is the detailed content of What needs to be modified to ensure the data independence of the database?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn