Suggest an editImprove this articleRefine the answer for “What is data integrity?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)Data integrity is a database property that guarantees information stays correct, consistent, and reliable while it's stored and processed; it covers entity integrity (a unique primary key), referential integrity (valid foreign keys), domain integrity (values matching their type and constraints), and user-defined integrity (business-logic rules). **Key point:** data integrity guarantees that the database holds truthful, logical, consistent information, and that no operation on the data breaks these rules.Shown above the full answer for quick recall.Answer (EN)Image**Data integrity** is a database property that guarantees **correctness, consistency, and reliability of information** while it's being stored and processed. ### The main types of integrity 1. **Entity Integrity** - Every record in a table must have a **unique identifier (a primary key)**. - This ensures there are no duplicate or "empty" records. 2. **Referential Integrity** - A foreign key's values must match existing values of the primary key in the other table. - It prevents "orphaned references", for example, an employee can't reference a department that doesn't exist. 3. **Domain Integrity** - A field's values must match the allowed data type and constraints (e.g. number, text, date). - For example, the `Age` field can't hold the text "thirty". 4. **User-defined Integrity** - Additional rules set by business logic, for example: a salary can't be negative. Put simply, **data integrity guarantees that the database holds truthful, logical, consistent information**, and that no data operation breaks these rules.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.