The design of the database of the general process presumably everyone knows, do not know can easily find relevant information on the Internet, usually, we will be divided into 6 stages of database design, namely, the requirements analysis phase, conceptual structure design phase, logical structure design phase, physical structure design phase, implementation stage, operation and maintenance phase.
This time we do not talk about the theoretical knowledge of database design, mainly based on the database design of the computer room charge system as the background to explain how the conceptual structure of the database design is generated, of course, including the database design of the most difficult needs analysis, otherwise there is no database concept structure design.
Because we have done it all over again, and from the very beginning we are doing it according to the system prototype, there is no process from scratch, so we can not understand what the real demand analysis is, and will not think about how the various functions of the system to be developed are abstracted. I will start with my personal understanding of the database design of the computer room charge system.
Computer room charge system is for the staff and management of the computer room to use, so the system users will be an entity, in order to meet customer needs, but also to the user to set permissions. The information that the system wants to manage is the information of the student itself and the data record of the student because of the machine, so the student is also an essential entity.
Many people because of the three-paradigm principle, the original student information about the card information in the part of the extraction, forming another entity, namely the card entity. This improves the flexibility of the database, after a student's card is lost, the lost card information can be deleted from the database, the student information in the card number can be updated. However, in the actual use of the system, such a design does not have much advantage, but reduces the efficiency of the query, because it involves two tables. Some people say that using a view can be done, but relative to a table, it is a bit more troublesome.
We continue to analyze, the system user operation will generate work records, students in the computer room on the opportunity to generate on-machine records, the system users have to the card registration, logout and recharge permissions, so it will produce the corresponding data information, so that a system to run the basic data set, the data information needs a table to store, Therefore, the basic database entity diagram can be drawn out.
The above diagram is a very simple picture, there may be many errors, after all, there is no skilled and accurate treatment of the development system of the ability to perform abstract analysis. Of course, the above diagram does not give the properties of each entity, below I use Power Designer software to draw a conceptual structure of the system, of course, this figure is not a standard CDM, the main purpose is to show you the properties of each entity.
In short, the design of the most difficult database is the initial phase of demand analysis, may require developers and customers after a long period of repeated discussions and exchanges, just can produce the final results, and in the subsequent development process may also need to continue to improve and improve. Of course, strictly speaking, I said here is not really a database design, because the system Blueprint and database blueprint exists, will interfere with our thinking and analysis, but this is learning, to go through this process, hand to do a database, will have a profound experience, because standing on the shore will never learn to swim!