Data Center reconstruction-Database Design

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.