- 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.
推薦閱讀
- 微服務與事件驅動架構
- Python 深度學習
- 樂學Web編程:網站制作不神秘
- Java編程指南:基礎知識、類庫應用及案例設計
- Python高級機器學習
- Easy Web Development with WaveMaker
- Getting Started with LLVM Core Libraries
- OpenGL Data Visualization Cookbook
- After Effects CC案例設計與經典插件(視頻教學版)
- R統計應用開發實戰
- 軟件工程實用教程 (第3版)
- Java王者歸來:從入門邁向高手
- 智能優化算法與MATLAB編程實踐
- Java程序設計項目教程(第二版)
- Build Applications with Meteor