官术网_书友最值得收藏!

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 (through FOREIGN 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, or IDENTITY properties.
  • Referential integrity: This ensures that the data is consistent between related tables. You can enforce referential integrity through PRIMARY KEY constraints and FOREIGN 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.
主站蜘蛛池模板: 卓尼县| 那坡县| 平阴县| 余江县| 定安县| 乡宁县| 会泽县| 康定县| 望城县| 潞城市| 兴业县| 泉州市| 增城市| 昭苏县| 革吉县| 将乐县| 顺昌县| 高青县| 兴仁县| 安康市| 墨竹工卡县| 江津市| 梅河口市| 湄潭县| 横山县| 剑河县| 明光市| 灌阳县| 舞阳县| 城固县| 卢湾区| 东源县| 桐梓县| 富顺县| 淮阳县| 轮台县| 阳东县| 昭平县| 陇西县| 五家渠市| 荔波县|