Home > Database > Mysql Tutorial > In database design, what is the process of converting ER diagram into relational data model?

In database design, what is the process of converting ER diagram into relational data model?

青灯夜游
Release: 2023-01-05 16:13:35
Original
30469 people have browsed it

In database design, the process of converting the E-R diagram into a relational data model belongs to the "logical design phase". E-R diagrams are used to describe conceptual models of the real world; the main work of the logical design stage is to design the conceptual data model of the real world into a logical model of the database, that is, adapted to the logical data supported by a specific database management system. model.

In database design, what is the process of converting ER diagram into relational data model?

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

In database design, the process of converting the E-R diagram into a relational data model belongs to the "logical design phase".

E-R Diagram Also known as Entity Relationship Diagram, it provides a method to represent entity types, attributes and relationships, and is used to describe the conceptual model of the real world.

It is an effective way to describe a conceptual model of real-world relationships. It is a way to represent the conceptual relationship model:

  • Use a "rectangular box" to represent the entity type, and write the entity name in the rectangular box;

  • Use "oval frame" or rounded rectangle to represent the attributes of the entity, and use "solid line segment" to connect it with the "entity type" of the corresponding relationship;

  • Use "diamond frame" "Indicates the cause of the connection between entity types. Write the name of the connection in the diamond box, and use "solid line segments" to connect it to the relevant entity types respectively. At the same time, mark the type of connection next to the "solid line segment" (1:1,1 :n or m:n).

Database Design (Database Design) refers to constructing the optimal database model for a given application environment, establishing the database and its application system, and making it Able to effectively store data to meet the application needs of various users (information requirements and processing requirements). In the field of databases, various systems that use databases are often collectively referred to as database application systems.

The design content of database design includes: requirements analysis, conceptual structure design, logical structure design, physical structure design, database implementation and database operation and maintenance.

  • Requirements Analysis

    Investigate and analyze users’ business activities and data usage, and clarify the type, scope, and quantity of data used and their communication in business activities situation, determine the user's requirements for the use of the database system and various constraints, etc., to form a user requirements specification.

    Requirements analysis is based on user surveys and analysis to gradually clarify user needs for the system, including data needs and business processing needs surrounding these data. In requirements analysis, the system is analyzed through a top-down, step-by-step decomposition method, and the analysis results are graphically described using data flow diagrams (DFD).

  • Conceptual design

    Describe the real world (maybe a factory, a shopping mall or a school, etc.) that the user requires, by classifying and gathering the places in it and generalization to build abstract conceptual data models. This conceptual model should reflect the information structure of various departments in the real world, the flow of information, the mutual constraints between information, and the requirements of each department for information storage, query and processing. The model established should avoid the specific implementation details of the database on the computer and express it in an abstract form. Taking the expanded entity-(E-R model) contact model method as an example, the first step is to clarify the various entities and their attributes contained in each department in the real world, the connections between entities, and the constraints on information, etc., thereby giving each A partial description of the information used within a department (called a user's partial view in the database). The second step is to integrate the partial views of multiple users obtained previously into a global view, that is, the conceptual data model of the real world that the user wants to describe.

  • Logical design

    The main job is to design the conceptual data model of the real world into a logical model of the database, that is, adapted to the support of a specific database management system logical data pattern. At the same time, corresponding logical sub-patterns may need to be generated for various data processing application areas. The result of this step of design is the so-called "logical database".

  • Physical design

    According to the various storage structures and access methods provided by a specific database management system and other physical design measures that depend on the specific computer structure, the Select the most appropriate physical storage structure (including file type, index structure, data storage order and bit logic, etc.), access method, and access path for specific application tasks. The result of this step of design is the so-called "physical database".

  • Verification design

    Based on the above design, collect data and specifically establish a database, run some typical application tasks to verify the correctness and reasonableness of the database design sex. Generally, the design process of a large database often requires multiple iterations. When a problem is discovered at a certain step in the design, it may be necessary to go back and make modifications. Therefore, when designing the above database, the possibility and convenience of modifying the design in the future should be taken into consideration.

  • Operation and maintenance design

    In the process of the database system being officially put into operation, it must be constantly adjusted and modified.

    So far, many tasks in database design still need to be done manually. In addition to a relatively complete set of data paradigm theories for relational databases that can be used to partially guide database design, there is still a lack of a complete set of database design theories and methods. and tools to enable automated or interactive semi-automated design of databases. Therefore, the future research and development direction of database design is to study database design theory, seek data models that can express semantic relationships more effectively, provide automatic or semi-automatic design tools and integrated development environments for each stage of design, and make database design more efficient. Engineering, more standardized and more convenient, fully reflect the advanced ideas and methods of software engineering in the design of the database.

Related free learning recommendations: mysql video tutorial

The above is the detailed content of In database design, what is the process of converting ER diagram into relational data model?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template