Three main paradigms of database

Source: Internet
Author: User
First paradigm: Ensure the atomicity of each column.
If each column (or each attribute) is the smallest data unit (also known as the smallest atomic unit) that is not re-divided, the first normal form is satisfied.
Example: Customer table (name, number, address 、......) Where the "address" column can also be subdivided into countries, provinces, municipalities, districts and so on.

The second paradigm: one more layer on the basis of the first paradigm, with the goal of ensuring that each column in the table is related to the primary key.
If a relationship satisfies the first normal form and the columns other than the primary key are dependent on the primary key, the second normal form is satisfied.
For example: the order form (order number, product number, order date, Price 、......), "order number" as the primary key, "product number" and primary key column do not have a direct relationship, that is, the "Product number" column does not depend on the primary key column, you should delete the column.

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 column, rather than indirectly.
If a relationship satisfies the second normal form and the columns other than the primary key are not dependent on the primary key column, the third normal form is satisfied.
In order to understand the third paradigm, it is necessary to define transitive dependencies according to one of Armstrong km. Suppose that A, B, and C are the three attributes of a relationship R, and if A-〉b and B-〉c, then from these function dependencies, you can derive a-〉c, as described above, that dependency a-〉c is a transitive dependency.
For example: Order form (order number, date of purchase, customer number, customer name, ...), first look at the table is not a problem, to meet the second paradigm, each column and the primary key column "order number" related, and then you will find "Customer name" and "customer number" related, "customer number" and "Order Number" is also related Finally pass-through dependency, "Customer name" and "Order Number" is also related. In order to satisfy the third paradigm, the "Customer name" column should be removed and placed in the Customer table.

Three main paradigms of 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.