官术网_书友最值得收藏!

Constraint

The relational model defines many constraints in order to control data integrity, redundancy, and validity. Here are some examples of checking for data:

  • Redundancy: Duplicate tuples are not allowed in the relation.
  • Validity: Check constraints and domain constraints are used to validate the data input, for example, the date of birth should be a date that occurred in the past.
  • Integrity: The relations within a single database are linked to each other. An action on a relation such as updating or deleting a tuple might leave the other relations in an invalid state.

We could classify the constraints in a relational database roughly into two categories:

  • Inherited constraints from the relational model: Domain integrity, entity integrity, and referential integrity constraints.
  • Semantic constraint, business rules, and application-specific constraints: These constraints cannot be expressed explicitly by the relational model. However, with the introduction of procedural SQL languages such as PL/pgSQL for PostgreSQL, relational databases can also be used to model these constraints.
主站蜘蛛池模板: 宁乡县| 沧源| 玛曲县| 万宁市| 图木舒克市| 新田县| 沅江市| 确山县| 津市市| 新沂市| 沂源县| 怀集县| 类乌齐县| 尼木县| 蓬溪县| 越西县| 武平县| 枞阳县| 东港市| 陵水| 金塔县| 贵港市| 桐城市| 临沧市| 沁源县| 秭归县| 梅河口市| 霍城县| 北流市| 灵丘县| 双牌县| 柯坪县| 潍坊市| 正定县| 张家界市| 泊头市| 南康市| 凤凰县| 扎囊县| 宁远县| 玛多县|