7275 Keys
7275 Keys
7275 Keys
DeptCode DeptName
001 Science
002 English
005 Computer
• Domain constraints
Key Constraints
There must be at least one minimal subset of attributes in the relation, which can identify a tuple
uniquely. This minimal subset of attributes is called key for that relation. If there are more than one
such minimal subsets, these are called candidate keys.
Key constraints force that:
• in a relation with a key attribute, no two tuples can have identical values for key attributes.
Domain Constraints
Attributes have specific values in real-world scenario. For example, age can only be a positive
integer. The same constraints have been tried to employ on the attributes of a relation. Every
attribute is bound to have a specific range of values. For example, age cannot be less than zero and
telephone numbers cannot contain a digit outside 0-9.
Referential Integrity Constraints
Referential integrity constraints work on the concept of Foreign Keys. A foreign key is a key
attribute of a relation that can be referred in other relation.Referential integrity constraint states that
if a relation refers to a key attribute of a different or same relation, then that key element must exist.