Keys and Constraints
Learn Keys and Constraints (Design and Database Objects, PostgreSQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Constraints are rules the database enforces for you, so bad data can never be saved even if the application has a bug.