Three kinds of integrity in the database: domain, entity, referential integrity __ Database

Source: Internet
Author: User
three kinds of integrity in the database: domain, entity, referential integrity the integrity of the relationship includes domain integrity, entity integrity and referential integrity of three.
1. Domain (column) integrity
Domain integrity is a constraint on the properties of a field in a datasheet, usually referring to the validity of the data, which includes the field's range, the type of the field, and the valid rules for the field, which are determined by the properties of the field defined when the relationship structure is determined. Limit data types, defaults, rules, constraints, whether they can be empty, and domain integrity to ensure that no invalid values are entered ...
2. Entity (line) integrity
Entity integrity is the uniqueness of records in a relationship, which is the constraint of a primary key. To be exact, entity integrity means that the primary attribute value in a relationship cannot be null and cannot have the same value. Defines all rows in a table uniquely identifiable, typically with a primary key, unique indexed unique keyword, and identity attribute such as our ID number, can uniquely identify a person.
3. Referential integrity
Referential integrity is the constraint of data reference references between data tables that establish an association relationship in a relational database, which is the foreign key constraint. To be precise, referential integrity means that a foreign key in a relationship must be a valid value for the primary key of another relationship, or it is null. Referential integrity maintains the validity and completeness of data between tables, typically by establishing a foreign key to contact another table's primary key implementation, and by using triggers to maintain referential 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.