How to design an advanced database

Source: Internet
Author: User

I believe that we read this article seriously will know how to design a high-level database!!!

Recently a friend has been asking why I need a normative database design?

Professional analysis:

Because in the actual project development, if the system data storage is large, the design table is more, the relationship between table and table is compared

Complex, you need to first consider the specification of the database design, and then do the specific creation of the library, create the table work, whether it is to create dynamic

Web site, or an application that creates a desktop window, the importance of database design is self-evident. If the design is inappropriate, there will be

The data operation is abnormal, the modification is complicated, the data redundancy and so on, the program performance will be affected. So we have to have a standard database design.

Can improve the application performance of the project!

The same shoes ask good! What is database design???

Dapeng tells you: database design is the process of planning and structuring the relationship between the data entities in the database and the data entities.

e.g. (the structure of the Student Information database also includes the relationship between the four data entities)

After the database design, let's talk about the steps to design the database:

The development of a project requires a few phases: requirements analysis, summary design, code writing, run testing, and package release.

Demand Analysis: analyze the customer's business and data processing needs.

Overview design phase: Drawing a e-r diagram of the database for use within the project team, between the designer and the customer

Communicate and confirm the correctness and completeness of the required information.

Detailed design phase: Convert the E-r diagram to multiple tables, make logical designs, confirm the primary foreign keys for each table, and apply the data

The three main paradigms of library design are audited. However, the next step is to write the code.

Tip: Regardless of the size and complexity of your database, you can refer to the following basic steps when you perform a system analysis of your database: (don't tell anyone)

1. Collect information.

2. Identifying Entities

3. Identify the details that each entity needs to store

4. Identify the relationships between entities

Identify entities: In fact, some children's shoes do not know how to identify the entity, the entity can be tangible things, such as people or products, can also be intangible things, such as business

Trading, company department, payroll cycle. Take a hotel management system database As an example: we need to identify the most important entities in the system.

It is conceivable that it is the guest room. Rooms include single room, Standard room, triple room, Presidential Suite, guest name, guest identification information, etc.

This is the identity entity. entities are generally nouns, an entity describes only one thing, and cannot repeat entities that have the same meaning.

The next thing to do is to store detailed information for the entity

Rooms: Room number, room type, room status, room description, number of beds, number of guests, price

Guest: Name, ID number, guest number, check-in date, closing date, deposit, total amount

Conceptual design ———————————— Drawing e-r diagram (entity-relationship)

The E-r diagram is called an entity-Relationship diagram. It includes some graphical symbols with specific meanings.

Rectangles represent entity sets

Ellipse Representation Property

Diamond Identification Contact Set

Lines are used to connect attributes and entity sets, and also to connect entity sets and contact sets.

Drawing e-r diagrams can be used specifically with Microsoft Visio software to describe

The three main paradigms of the must-back:

First paradigm: The goal is to ensure that the atomicity of each column

The second paradigm: on top of the first paradigm, the goal is to ensure that each column in the table is related to the primary key.

The third paradigm: on the basis of the second paradigm, the goal is to ensure that each column is directly related to the primary key, rather than indirectly.

I believe you see here how to design a large database in the heart should also have a ruyi small abacus it.

If it helps you please don't forget to support!

How to design an advanced database

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.