Reconstruction has been dragging on for more than a month, and there has been no progress. Simulates the previous three-tier learning and implements the data center login function. Database design involves creating E-R diagrams. Go back and study the chapter on E-R in "database system principle. After analyzing the requirements of the data center charging system, we have achieved today's results. Please see my E-R diagram (English and Chinese ),
Reconstruction has been dragging on for more than a month, and there has been no progress. Simulates the previous three-tier learning and implements the data center login function. Database design involves creating E-R diagrams. Go back and study the chapter on E-R in "database system principle. After analyzing the requirements of the data center charging system, we have achieved today's results. Please see my E-R diagram (English and Chinese ),
Reconstruction has been dragging on for more than a month, and there has been no progress. Simulates the previous three-tier learning and implements the data center login function. Database design involves creating E-R diagrams. Go back and study the chapter on E-R in "database system principle. After analyzing the requirements of the data center charging system, we have achieved today's results.
Please look at my E-R diagram (English-Chinese Version), in order to make the picture more simple and easy to understand, context more clear, entity and Link Attributes are not marked, the analyzed IDC billing system is provided in the relational model.
The key here is to find out all the requirements on the data center, and also find out the primary and Foreign keys. See the link model I converted to below:
1. Student (StudentID, StudentName, Sex, Class, Grade, Department)
2. Card (CardID, Cash, IsUsing, Remark, Type, StudentID, RegisterDate, RegisterTime, InitialMoney, CancelDate, CancelTime, Refundment, UserName)
3. Administrator (UserName, Password, Level, RealName, Creator)
4. BasicData (FixedRate, TempRate, UnitTime, LeastTime, PrepareTime, LeastMoney)
5. Login (UserName, ComputerName, LoginDate, LoginTime, LogoutDate, LogoutTime)
6. Recharge (CardID, UserName, AddMoney, Date, Time)
7. OnOffLine (CardID, UserName, ComputerName, OnDate, OnTime, OffDate, OffTime, Status, ConsumeTime, ConsumeCash)
Daily close weekly statement generated during checkout:
8. DayBill (RemainCash, RechargeCash, ConsumeCash, CancelCash, AllCash, Date)
9. WeekBill (RemainCash, RechargeCash, ConsumeCash, CancelCash, AllCash, Date)
Note: The primary key with a slide line and the foreign key marked in red.
Summary:
You can find that you only need to design nine tables to meet the requirements of the data center. The above E-R diagram is not all converted to the relational model, once again stressed that the design database is based on the needs of, only to write useful things is enough, useless to discard. In this way, we can streamline the database design without redundancy. If you have any questions, please discuss them with me, because it is the first design and may not be considered. We will continue to improve it in the future. Thank you for your patience!