Standard-paradigm of normalization of database design relationship

Source: Internet
Author: User

Pre-Knowledge: properties: An attribute that an entity has is called a property

Code: A property set that uniquely identifies an entity is called a code, and if one entity has more than one candidate, one of the main codes is selected

Attributes that are contained in any candidate code are called primary properties, and properties that are not included in any code are called non-primary properties.

Multi-valued dependency: Set in relationship mode R (U), U is a complete set of properties, X, Y and Z are subsets of U, and z=u-z-y, if any relationship R for R, for a certain value of x, there is a group of y values corresponding to it, and Y's set of values is determined only by the sum of X and Z value Independent, this is called Y Multi-value dependence and X. In multi-valued dependency, if z is not an empty set, it is called non-trivial multi-valued dependency, otherwise it is a trivial multi-valued dependency.

The purpose of the paradigm is to minimize the exceptions that occur when data redundancy data operations such as insertions, deletions, and updates are eliminated. But I personally think the first thing to understand is what is the data operation without exception? What is the lowest degree of redundancy in data, can it achieve 0 redundancy? According to my summary in several books, as long as the non-primary attribute or the main attribute of the code of the partial dependency or transfer dependency, in the advanced is to eliminate the non-trivial and non-functional dependency of the multiple dependencies, eliminate the dependency of the candidate code is not implied by the connection, you can let the database schema to achieve the standard you expect.

The current paradigm has a total of six:

1NF: All the properties in the Relationship mode R are non-divisible, in which case the relationship pattern R contains both full function dependencies, partial function dependencies, and transitive function dependencies, which often lead to various drawbacks of data manipulation. Therefore, we should use the projection decomposition to decompose the relationship, remove the complex relationship, and transform to a higher-level paradigm.

The basic principle of decomposition is that "one thing, one place" means that a relationship only describes the connection between an entity or an entity, and if an entity or contact is redundant, the projection is decomposed.

2NF: If the relationship mode R belongs to the first paradigm, and each non-principal attribute is completely dependent on any candidate code called M-code in R, then R is the second paradigm, and the second paradigm can be eliminated by the first paradigm from the partial function dependency of the non-principal attribute pair code.

3NF: If the relationship mode R belongs to the first paradigm, and each non-principal attribute does not pass the code dependent on R, then R is called the third normal. The third paradigm can eliminate a variety of data redundancy and data manipulation anomalies to some extent. However, it does not restrict the dependency of the main attribute on the code, and if this dependency occurs, redundancy will still occur, inserting the delete and modifying exceptions.

BC Paradigm: If R is the first paradigm, and all functions depend on x-->y (Y is not a subset of X), the determinant X contains a candidate for R, then R belongs to the BC paradigm. The BC paradigm eliminates the function dependency of the main attribute on the code.

4NF: If for each non-trivial multivalued dependency of R X->->y (Y is not a subset of X), X has a candidate code, it is said

R belongs to the fourth paradigm.

The five paradigm is to eliminate the connection dependency that appears in the fourth paradigm, where it is not deeply grilled.

Standard-paradigm of normalization of database design relationship

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.