Advanced design of the database

Source: Internet
Author: User

I. Standardization

In the design of database, there is a tradeoff between minimizing data redundancy and database efficiency.

1. First Paradigm:

  • Define the required data items and place the related data items in a table.
  • Make sure there are no duplicate data groups. (You can delete duplicate data by dividing the data into multiple tables)
  • Make sure there is a primary key.

Primary key: Unique identifier of the record. You can add a new column, or use one or more of the existing columns, as long as the columns can be combined into a unique primary key.

2. Second paradigm: Requires no local correlation for any of the columns in the primary key.

3. Third paradigm (optional, environment dependent): conforms to the second paradigm, and all non-primary key fields are dependent on the primary key.

Transitive correlation. Eliminate transitive dependencies--place data items with transitive dependencies in a single table.

The benefits are reduced data duplication, data integrity, and the risk of updating only certain data when duplicate data changes are avoided.

The downside: increased complexity and reduced efficiency.

Two. Use constraints to ensure the validity of data

Advanced design of the 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.