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

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.
主站蜘蛛池模板: 休宁县| 贡觉县| 荣成市| 东台市| 社旗县| 铜川市| 安龙县| 宜阳县| 安义县| 临沭县| 满城县| 金沙县| 涿州市| 涟源市| 齐齐哈尔市| 吉水县| 廉江市| 鄂托克旗| 千阳县| 阳泉市| 景泰县| 资阳市| 清水县| 仪征市| 海口市| 抚宁县| 广水市| 贡山| 内江市| 盈江县| 新丰县| 杭州市| 静宁县| 荔浦县| 临清市| 新疆| 新邵县| 锡林郭勒盟| 上饶县| 连平县| 长丰县|