[Reconstruction] Database Design

Source: Internet
Author: User
The key step of Data Center reconstruction lies in the database design. After the database is designed, reconstruction can save a lot of trouble. So I can read "database system principles" again, so it is necessary to take an exam. [Knowledge point] First, design the ER model, which is divided into three steps: first, design the local ER model, and then combine the local into a global ER model.

The key step of Data Center reconstruction lies in the database design. After the database is designed, reconstruction can save a lot of trouble. So I can read "database system principles" again, so it is necessary to take an exam. [Knowledge point] First, design the ER model, which is divided into three steps: first, design the local ER model, and then combine the local into a global ER model.

The key step of Data Center reconstruction lies in the database design. After the database is designed, reconstruction can save a lot of trouble. So I can read "database system principles" again, so it is necessary to take an exam.

[Knowledge point]

First, we need to design the ER model, which is divided into three steps: first, design the local ER model, then combine the local into a global ER model, and finally optimize the global.

1. Design a local ER model: Determine the local structure scope, define entities, define contacts, and assign attributes.

2. design the global ER model: determine the common entity type, merge the local ER model, and eliminate conflicts.

3. Optimize the global ER model: Merge entity types to eliminate redundant attributes and redundant connections.

The ER Model of the IDC is as follows:


The next step is to convert the ER model to the relational mode, which is also the tables in the database. here we need to follow the three paradigm:

1. The first paradigm (1NF) should follow atomicity, that is, the attribute values in the table cannot be further divided, and the attribute values are non-sharable Atomic values.

2. The second Paradigm (2NF) does not have local dependencies, eliminating undesirable redundancy and exceptions.

3. The third paradigm (3NF) does not have the transmission dependency.

According to the ER Model and paradigm, the reconstructed IDC database is divided into 11 tables:


Some tables:

User table (T_UserInfo)


Card table (RECHARGE table) (T_CardInfo)


Note the following naming rules for databases:

1. Database Name: Use uppercase letters to avoid table names retained by the system. For example, LibraryMaintainSystem

2. Database Table: Use the T _ table name, and the first letter of the table name is capitalized. Example: T_UserInfo

3. Table field: the first letter is in lower case, followed by a word or pinyin, and the first letter is in upper case. The naming rules only come from the business and try to express the meaning of the column, the name is generally a noun or adjective. (The first letter is in upper case ...)

[Summary]

I feel that the database is not well designed and will be used for learning and using view stored procedures in the future. In addition, the knowledge learned by self-test is very useful. Please be prepared for the test!

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.