- Learning PostgreSQL 11
- Salahaldin Juba Andrey Volkov
- 161字
- 2021-07-02 13:11:38
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.
推薦閱讀
- Microsoft Exchange Server PowerShell Cookbook(Third Edition)
- C語言程序設(shè)計(第3版)
- Android開發(fā)精要
- Learning Spring 5.0
- Java入門很輕松(微課超值版)
- Learning SAP Analytics Cloud
- Java Web應(yīng)用開發(fā)技術(shù)與案例教程(第2版)
- Java深入解析:透析Java本質(zhì)的36個話題
- Hands-On Microservices with Kotlin
- 從Excel到Python:用Python輕松處理Excel數(shù)據(jù)(第2版)
- “笨辦法”學(xué)C語言
- Mastering Docker
- 例解Python:Python編程快速入門踐行指南
- SAS編程演義
- Backbone.js Patterns and Best Practices