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

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.
主站蜘蛛池模板: 阿拉善盟| 宁阳县| 佳木斯市| 丘北县| 宁远县| 邵阳县| 清流县| 河西区| 南汇区| 黔西| 阿拉尔市| 象州县| 武隆县| 新蔡县| 永嘉县| 嘉定区| 松潘县| 萝北县| 西青区| 荆州市| 富民县| 长岭县| 越西县| 普兰店市| 福贡县| 三江| 神池县| 巫溪县| 大荔县| 沿河| 始兴县| 万荣县| 长乐市| 大方县| 咸阳市| 丹凤县| 渭南市| 中卫市| 民丰县| 岚皋县| 雷波县|