[Model] database system database system with hierarchical data independence

Foreword

Originally wanted to go beyond that, but still it is necessary to make it clear to everyone with Chinese physical data independence, because very important.

Categories under the hierarchical mode

A database structure can be abstracted as a physical layer, a logical layer, three-layer view, can be logically divided into sub-mode (external mode), the logic mode (Mode / conceptual mode), physical modes (intra mode / memory mode) three .

In order to improve the independence of the data in the database system, DBMS between these three modes provides two images. Independence as a basic feature of the database system data and programs is to rely on these three models and two images.

Sub-mode

Sub-mode is also called the external mode, is an interface between the user and the database, the database and the user can see the description of the logical structure and local features of the data used.

In mode three database system, in view of the sub-pattern layer (top layer).

Logic mode

Logic mode is also called mode or conceptual model, all user data is integrated by the database designer, and a description of the logical structure of the global database according to a certain point of view construction.

In mode three database system, the logic pattern at a logical layer (intermediate layer), only one logical database model, which involves neither the details of the physical storage of data and hardware environment nor to the particular applications and programming languages .

Physical mode

Physical mode is also called an internal mode or storage mode is a description of the physical structure of data in the database and the storage of the data in the internal database representation.
In mode three database system, the conceptual model is the physical layer (bottom layer), a database only one internal. Internal mode is the bottom of the DBMS, which is the physical storage devices to store data when a physical abstraction.

Data independence

  • Physical data independence
  • Logical data independence

Physical data independence

Concepts of the physical data independence is based on the logic pattern image between the physical mode. Since only one logical database model, only a physical model, therefore, logical schema / physical mode (mode / intra modes) images only one, normally, mode logic / physical mode image on a physical model is described.

The so-called " physical data independence " refers to data in the database and user applications stored on the disk are independent of each other.
In other words, how the data is stored on the disk by the DBMS management, user does not need to know (transparent to the user), the application to be processed is only the logical structure of the data, so that when the physical storage of the changed data, without changing the application.

Not that the underlying data changes, the upper unchanged. But that does not cause the underlying reconstruction forced reconstructed upper layer.

Logical data independence

Just above said physical data independence, there is also the logical data independence .

Concept of logical data independence is based on the image between the sub-modes of the logical schema. Since a plurality of outer pattern corresponding to the pattern, and therefore, for each sub-model, the database system has a "sub-mode / logic mode (outer mode / Mode)" map , which defines the correspondence between the logical schema and subschema relationship, which typically comprise image definition described in the respective sub-mode.

Independence logic refers to a logical structure of the user's application and the database are independent of each other, that is, when the logical structure of the data changes, the user may change the program.

It is not difficult to understand, logical data independence independence more difficult to achieve than physical data. This is because the application of the data they access to a large extent dependent on the logical structure, loosely coupled system is clearly better than do tightly coupled system, maintainability stronger.

Data independence

Both belong to the above-described total data independence .

Independence of the data is one of the most basic features of the database system, one of a database system is the most important goal. It includes a logical data independence and physical independence of data, means are independent application programs and data structures, independently of each other.
In the three-tier architecture model data independence refers to changes in the database system at a certain level mode will not make it on the floor the ability to change the pattern also occurred. Between the two images is the three modes to ensure that the data in the database system has a high data independence.
Separate program and data, the data is separated from the definition of the program, with access to the data and the DBMS is responsible, thus simplifying the preparation of the application, which greatly simplifies the complexity of the application maintenance.

to sum up

Hierarchical mode can be divided into three, two mirror interposed therebetween, respectively, embodies the physical and logical data independence data independence, both belonging to the independence of the data, which is one of the most basic features of the database system.

Published 576 original articles · won praise 1185 · Views 380,000 +

Guess you like

Origin blog.csdn.net/weixin_43896318/article/details/104487978