Database design experience - Pizza Hong whirring

According to the actual situation of our team for database design, database design, we will be divided into two phases - preparation and design, database design in two stages, have their own issues that need attention. Here, according to the problems we encountered in the database set the actual design process, given some of their own ideas.

First, prepare

1, design tools

工欲善其事必先利其器, first of all, of course, we need we are ready for database design tools, and our select group of database design tools is a natural choice of most people --PowerDesigner. Use the Internet has a lot of information about PowerDesigner, this will not repeat them. Just Getting Started PowerDesigner, recommendation from the CDM (conceptual data model, also known as the information model, it Entity - Relationship (Entity-RelationShip, referred to as ER) theory, and this theory was expanded it from the user's point of view. modeling information, mainly for the conceptual design of the database level.), the PDM (physical data model) to start.

2, the product with the embodiment of FIG.

Product use case diagrams role has three: capture requirements, guidance test, play a guiding role in other workflows.

 According to the use case diagram, it can basically clear relationship between functions and personnel we need to achieve.

3, needs analysis (document)

Software requirements analysis is an important activity planning stage, is also an important part of the software life cycle. In this session, we have to consider the good features we need to implement the basic functions of a clear and general framework of the project, task assignment and pave the way for the project design. With our project as an example for the design of educational systems in the natural function is to achieve "information search", "course selection," "personnel management" and so on, and the design of the database is to focus on the natural functions of these design.

4, ER FIG.

ER diagrams can be said is a simplified version of the CDM, prior to detailed design, design should be good ER diagram (as a prototype of CDM), good conduct CDM design.

Second, the design

1, CDM is established

CDM is established, the most important thing is to determine the "real" good design "entity" of "property", "entity" of "property" must be consistent with the actual situation, but also to meet the needs of the current functional design, and sometimes also consider the need for future expansion to design some properties.

For example, here's student table, you have the relevant information students should have, and the ID number in this field is taking into account the future expansion of functions.

The establishment of CDM second step is to determine the "relationship" between the good "entity";

For example, a classroom can be a multi-course, and a course can take classes in a multi-classrooms, a teaching building with many classrooms, a classroom and only correspond to a classroom building.

Note: CDM naming to meet specifications, but this step can be done with the script.

2, the establishment of PDM

CDM conversion can be obtained from PDM, in the PDM, CDM will convert entity table in relation to relational tables. If the automatically generated table can not meet our needs, we can then be further modified to meet the needs.

Third, the summary

Establishment of a database is not a simple matter to make adequate preparations, especially in formal or table creation, we must carefully consider the fields in the table, a good relationship between the tables, relationships between tables are complex, it can be said to be complicated. Meanwhile, as demand in the future change may occur, so consider the complex structure of relational tables in time, but also for the future of things to do intend to, and vulnerabilities on any table structure, are likely to cause serious problems in the future . In regard to demand, it is fundamental database design, requirements and if not, then the database will be designed around the needs of earth-shaking changes, and determine the requirements, it is the need for close exchanges and communication with the demand side, between members it is to coordinate the division of labor, good communication, together dig out the detailed design of the database.

Guess you like

Origin www.cnblogs.com/JoterGo/p/11823139.html