Entity Integrity
Entity integrity ensures that there are no duplicate rows in a table. This is often managed with the help of the primary key.
CREATE TABLE Employee (
EmployeeID int NOT NULL,
LastName varchar(255),
FirstName varchar(255),
Age int,
PRIMARY KEY (EmployeeID)
);
Domain Integrity
Domain Integrity enforces valid entries for a given column by restricting the type, the format, or the range of possible values.
Referential Integrity
Referential integrity ensures that relationships between tables remain consistent. More specifically, that a foreign key in one table must always refer to the primary key in another table.
User-Defined Integrity