- 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.
推薦閱讀
- 從零開始構建企業級RAG系統
- Deploying Node.js
- Mastering LibGDX Game Development
- C語言開發基礎教程(Dev-C++)(第2版)
- Mastering C++ Multithreading
- Hands-On Full Stack Development with Spring Boot 2.0 and React
- Elasticsearch Essentials
- Simulation for Data Science with R
- Learning Grunt
- Python GUI Programming Cookbook(Second Edition)
- AutoCAD基礎教程
- Mastering OpenStack
- SQL Server實例教程(2008版)
- Building a Media Center with Raspberry Pi
- Visual C#(學習筆記)