MySQL Performance tuning (iii) table design

Source: Internet
Author: User

A First introduce several concepts:
1. Full function dependency: In the relationship mode R (U) on the attribute set U, if x->y, and for any one true subset X ' of X ', there is X ' ≠>y, then Y is dependent on the X full function.

2. Transfer function dependency: in R (U), if x->y,y->z, the Z-to-X transfer function is called dependent.

Two Paradigm

There are 6 paradigms for relational databases: the first paradigm (1NF), the second paradigm (2NF), the third paradigm (3NF), the Badesco paradigm (BCNF), the fourth paradigm (4NF), and the Five normal form (5NF ). Links between the various paradigms: 5NF∈4NF∈BCNF∈3NF∈2NF∈1NF

1. First paradigm (1NF):

A field in a database table is a single attribute and cannot be divided. The first paradigm meets the minimum requirements.

2. Second paradigm (2NF)

For R∈1NF, and each non-primary attribute full function depends on the code, then R∈2NF.

3. The third paradigm (3NF)

Each non-primary property does not depend on the code or the pass-through code, then r belongs to the third paradigm.

4. BCNF

In addition to the code outside this NF, there is no other determinant, that is, no circuit.

Normalization process for relational schemas:



Summary: In the development of the program, the design of the database to the maximum degree of adherence to the three paradigms, the three paradigms in the query will join many tables, resulting in inefficient query efficiency, so that sometimes in order to improve the efficiency of the query can be moderately redundant, moderate anti-paradigm.

MySQL Performance tuning (iii) table design

Related Article

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.