- 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.
推薦閱讀
- 案例式C語言程序設(shè)計(jì)
- 程序員面試白皮書
- 薛定宇教授大講堂(卷Ⅳ):MATLAB最優(yōu)化計(jì)算
- Banana Pi Cookbook
- SEO實(shí)戰(zhàn)密碼
- C語言程序設(shè)計(jì)
- KnockoutJS Starter
- RISC-V體系結(jié)構(gòu)編程與實(shí)踐(第2版)
- Creating Mobile Apps with jQuery Mobile(Second Edition)
- Learning YARN
- RESTful Web Clients:基于超媒體的可復(fù)用客戶端
- SwiftUI極簡(jiǎn)開發(fā)
- Hands-On Robotics Programming with C++
- 深度實(shí)踐KVM:核心技術(shù)、管理運(yùn)維、性能優(yōu)化與項(xiàng)目實(shí)施
- OpenCV 3.0 Computer Vision with Java