Conceptual, logical, physical data model

The recent knowledge of the system's learning database storage and the company often hear colleagues talk about CDM, combined with the experience of using MySQL some time ago, conceptual data model (Concept Data Model, CDM), logical data model (Logical Data Model , LDM), Physical Data Model (Physical Data Model, PDM) to make a simple introduction. This article will introduce the basic concepts of these three models and the differences between them.

  Before discussing the three data models, we first learn about the so-called data models. The data model consists of three parts: data structure, data operations and data constraints.

  1. Data structure: The data structure mainly describes the type, content, nature, and connection between the data. It is the basis of the entire data model, and the operations and constraints between the data are based on the data structure. ;
  2. Data operation: mainly defines the operation type and operation mode on the corresponding data structure (addition, deletion, modification, etc. in the database);
  3. Data constraints: Data constraints are mainly used to describe the grammar, word sense connections between data structures in the database and the mutual constraints and constraints between each other (such as the use of foreign keys in MySQL to ensure data integrity between data)

  1. Conceptual Data Model (CDM)

  The conceptual data model is the first layer of abstraction from the real world to the information world. It is mainly a description of information from a high-level and business-oriented perspective. It is usually used as a bridge between business personnel and technical personnel. As a conceptual structure of the real world, this data model allows database designers to focus on the connection between data in the initial database design stage without paying attention to the underlying details of the data (such as the characteristics of the computer system used and the Database management system-characteristics of DBMS).

  The main contribution to the conceptual data model that links between the data analysis, it is a kind of user data stored in highly abstract, the reaction is user one operational level integrated information needs.

  At this stage, the concept of the entire data model or the entities in the software system and the connections between the entities are generally formed, which lays the foundation for building a logical data model. The following figure describes the conversion process of the real world and the information world and the information that is ultimately converted into the computer world.

  

Figure 1 Data abstraction and conversion flow chart

  The main tools for designing conceptual data models are ER diagrams and extended ER diagrams.

  2. Logical data model (LDM)

  Logical data model is a conceptual data model further specified, defines the attributes of each entity based on the concept of the data model entity definitions, is the user from the database can be seen in the perspective of the model data, is used by the database management system ( Database Management System (DBMS) supported data types (mesh data model, hierarchical data model, relational data model). This data model builds a bridge between the user and the system , not only facing the user, but also considering the features supported by the DBMS used.

  The logical data model reflects the point of view of the system analysis designer for data in a specific storage system (such as MySQL), and is a further refinement and division of the conceptual data model. The logical data model is generated according to the rules between businesses, and it is a blueprint about business objects, business object data, and the relationship between business objects.

  The content of the logical data model includes all entities, the attributes of the entities, the relationships between the entities, and the primary key of each entity, and the foreign key of the entity (used to maintain data integrity). The main goal is to describe the data in as much detail as possible, but it does not involve the specific physical realization of these data. The logical data model will not only ultimately affect the design direction of the database, but also ultimately affect the performance of the database (such as primary key design, foreign key, etc. will ultimately affect the query performance of the database).

  The logical data model is a complete document for developing a physical database. The logical data model mainly uses a hierarchical model, a mesh model, and a relational model. The most commonly used is the relational model. The corresponding database is called a relational database, such as MySQL.

  3. Physical Data Model (PDM)

  Physical data model, also known as physical model, is the concrete representation of conceptual data model and logical data model in computer. The model describes the specific organizational structure of data on physical storage media, not only related to specific database management systems, but also related to specific operating systems and hardware, but much of the work is done automatically by the DBMS, what the user has to do The job is actually to add your own index and other structures.

  The physical data model is based on the logical data model, comprehensively considering the limitations of various storage conditions, and designing the database, so as to truly realize the storage of data in the database. Its main job is to convert the elements, attributes, and connections in the logical data model into the corresponding elements in the physical model, including defining all tables and columns, and defining foreign keys to maintain connections between tables. Specific examples are as follows:

Figure 2 Example of conversion from logical data model to corresponding database

   summary:

  This article is only a brief explanation of the several data models that have just come into contact. Next, we will introduce in detail the several data models in the logical data model, the relationship between entities, and the conversion from the conceptual data model to the logical data model. Etc.



Published 8 original articles · Likes2 · Visits 486

Guess you like

Origin blog.csdn.net/qq_42003546/article/details/102796037