domain constraints - key constraints and constraints on null values - entity integrity, referential integrity, and foreign Keys
Understand the main constraints in the Relational Model: Domain Constraint, Key Constraint, Entity Integrity, and Referential Integrity. These constraints ensure that the data remains accurate, valid, and consistent.
Key Constraints & NULL Values: A Primary Key must be unique and cannot be NULL. Candidate Keys are possible primary keys, while Foreign Keys and non-key attributes can contain NULL values (unless restricted).
Entity Integrity & Referential Integrity: Entity Integrity ensures every row has a unique, non-NULL primary key. Referential Integrity ensures every Foreign Key value either matches an existing Primary Key in the referenced table or is NULL.
Exam Focus: Be able to identify Primary Key, Candidate Key, Super Key, and Foreign Key from a given table and explain how these constraints prevent duplicate, invalid, and inconsistent data.