MySql Performance Tuning (3) Table Design

Source: Internet
Author: User

MySql Performance Tuning (3) Table Design

I. first introduce several concepts:
1. full function dependency: in the relational mode R (U) of the property set U, if X-> Y, and for any real subset of X ', if both have x' <> Y, Y is fully dependent on X.

2. Pass function dependency: In R (U), if X-> Y, Y-> Z, Z is called the transfer function dependency of X.

Ii. Paradigm

Relational databases have six paradigms: 1NF, 2NF, 3NF, BCNF, and 4NF ), 5NF ). Associations between various paradigms: 5NF ε 4NF ε BCNF ε 3NF ε 2NF ε 1NF

1. 1NF ):

Fields in the database table are single attributes and cannot be divided. The first paradigm meets the minimum requirements.

2. 2NF)

For rε 1NF, and each non-primary attribute fully depends on the code, rε 2NF.

3. Third Paradigm (3NF)

If a non-primary attribute neither relies on Code nor transmits code, R belongs to the third paradigm.

4. BCNF

Except for this NF, there is no other determining factor, that is, no loop.

Normalization process of the link mode:

Summary:During program development, the designed database follows the three paradigm to the maximum extent. The three paradigm joins many tables during queries, resulting in reduced query efficiency, so that sometimes, in order to improve the query efficiency, we can moderately redundant and moderately reverse the paradigm.

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.