Three major paradigms of database and three major integrity

Source: Internet
Author: User

Because the relationship between the entities in the database is actually the connection between the data and the numerical value, how the definition of this relation will strictly affect the efficiency and accuracy of the data we manipulate later.

So there are many paradigms, of which the three paradigms are the most important.

The first paradigm must be satisfied before the second normal form satisfies the second normal form before satisfying the third paradigm.


The first normal form (INF) all attributes are indivisible atomic values

For example: A row in the score column: 70,80,90

Because the content is divisible, the first paradigm is not satisfied

Second Normal (2NF) non-primary attribute non-part dependent on primary keyword

It is straightforward to say that all data must be dependent on the primary key.

The third paradigm (3NF) requires that a database table not contain non-primary key information that is already contained in another table


The three major integrity of a relational database:

(1) Entity Integrity : The identity attribute in an entity attribute cannot be empty, cannot be duplicated, and the constraint is implemented by the specified primary key.

Its constraints are systematically enforced.

(2) Referential integrity: foreign keys in an entity can be empty, but not wrong,

For example, the student management system, the class has not been determined, the students came to report, then had to not split class,

But can't write one at will, not to mention a non-existent.

Additionally, you cannot delete a property that has a foreign key constraint.

(3) User-defined integrity : When designing a database, the user defines a line that cannot be empty.

Or sex can only be male or female.

The constraint is added by adding default,check,unique to the specified column

Three major paradigms of database and three major integrity

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.