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

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.
主站蜘蛛池模板: 公安县| 南丹县| 衡东县| 科尔| 吉水县| 沾化县| 平舆县| 福泉市| 汉源县| 邵阳县| 凤台县| 杂多县| 梓潼县| 上饶县| 连山| 双柏县| 广宁县| 怀宁县| 岑巩县| 若尔盖县| 九江市| 祁连县| 安溪县| 荔波县| 陇川县| 西城区| 建平县| 年辖:市辖区| 滁州市| 武汉市| 钟祥市| 万宁市| 丹棱县| 蒙山县| 富川| 万州区| 镇平县| 宁德市| 同江市| 山西省| 七台河市|