Logical data independence is provided by the "foreign schema/schema" image. When the schema changes, the database administrator makes corresponding changes to the image of each foreign schema/schema so that the foreign schema remains unchanged. The application program is written based on the external schema of the data, so that the application program does not need to be modified, ensuring the logical independence of the data and the program, referred to as data logical independence.
Related recommendations: "Programming Course"
The three-level schema structure of the database system refers to the database system from the outside It consists of three levels: pattern, pattern and inner pattern.
External schema is also called sub-schema or user schema. It 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. It is the data view of database users. , is a logical representation of data related to a certain application.
Schema, also called logical schema and conceptual 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. It is the middle layer of the database schema structure and does not involve the physical storage details and hardware environment of the data, nor is it related to specific applications, development tools and languages.
The internal schema is also called the storage schema. It is a description of the physical structure and storage method of data, and is the representation method of data within the database.
The database management system provides the following two-layer images between the three-level modes to ensure that the data in the database system has high logical independence and physical independence.
Foreign schema/schema image: When the schema changes, the database administrator makes corresponding changes to the image of each foreign schema/schema, so that the foreign schema remains unchanged. The application program is written based on the external schema of the data, so that the application program does not need to be modified, ensuring the logical independence of the data and the program, referred to as data logical independence.
Logical data independence describes the degree of independence of an application when the schema changes. Today's systems can provide logical data independence in the following aspects:
(1) Add new record types to the schema, as long as the connection between the original record types is not destroyed.
(2) Add new relationships between original record types.
(3) Add new data items in some record types.
Schema/internal schema image: When the storage structure of the database changes, the database administrator makes corresponding changes to the schema/internal schema image, so that the schema remains unchanged. , so that the application does not need to be changed, ensuring the physical independence of data and programs, referred to as data physical independence.
If you want to read more related articles, please visit PHP Chinese website! !
The above is the detailed content of What image provides the logical data independence of the database?. For more information, please follow other related articles on the PHP Chinese website!