- 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.
推薦閱讀
- HTML5移動Web開發技術
- Ceph Cookbook
- Java EE框架整合開發入門到實戰:Spring+Spring MVC+MyBatis(微課版)
- 簡單高效LATEX
- C#編程入門指南(上下冊)
- Reactive Programming with Swift
- 碼上行動:零基礎學會Python編程(ChatGPT版)
- Java 9 Programming Blueprints
- Linux網絡程序設計:基于龍芯平臺
- Learning Python Design Patterns(Second Edition)
- Java Web應用開發技術與案例教程(第2版)
- EPLAN實戰設計
- KnockoutJS Starter
- NoSQL數據庫原理
- 深入理解Java虛擬機:JVM高級特性與最佳實踐