- SQL Server 2014 Development Essentials
- Basit A. Masood Al Farooq
- 197字
- 2021-09-03 10:07:26
Data integrity
Data integrity ensures that the data within the database is reliable and adheres to business rules. Data integrity falls into the following categories:
- Domain integrity: This ensures that the values of the specified columns are legal, which means domain integrity ensures that the value meets a specified format and value criteria. You can enforce domain integrity by restricting the type of data stored within columns (through data types), the format (through
CHECK
constraints and rules), or the range of possible values (throughFOREIGN KEY
constraints,CHECK
constraints,DEFAULT
definitions,NOT NULL
definitions, and rules). - Entity integrity: This ensures that every row in the table is uniquely identified by requiring a unique value in one or more key columns of the table. You can enforce entity integrity through indexes,
UNIQUE KEY
constraints,PRIMARY KEY
constraints, orIDENTITY
properties. - Referential integrity: This ensures that the data is consistent between related tables. You can enforce referential integrity through
PRIMARY KEY
constraints andFOREIGN KEY
constraints. - User-defined integrity: This ensures that the values stored in the database remain consistent with established business policies. You can maintain user-defined integrity through business rules and enforce user-integrity through stored procedures and triggers.
推薦閱讀
- INSTANT OpenCV Starter
- 數(shù)據(jù)結(jié)構(gòu)(Java語言描述)
- VMware vSphere 6.7虛擬化架構(gòu)實(shí)戰(zhàn)指南
- PHP 編程從入門到實(shí)踐
- TypeScript圖形渲染實(shí)戰(zhàn):基于WebGL的3D架構(gòu)與實(shí)現(xiàn)
- Kotlin Standard Library Cookbook
- 微信小程序項(xiàng)目開發(fā)實(shí)戰(zhàn)
- Mastering Android Development with Kotlin
- Lighttpd源碼分析
- Scala編程(第5版)
- Java并發(fā)編程之美
- 深入解析Java編譯器:源碼剖析與實(shí)例詳解
- 你真的會(huì)寫代碼嗎
- Python 快速入門(第3版)
- 金融商業(yè)數(shù)據(jù)分析:基于Python和SAS