Full width home advertisement

Welcome Home

Post Page Advertisement [Top]

What is Relational Integrity Constraints in DBMS?

A relational integrity constraint is a situation whereby every relation has some conditions that must hold for it to be a valid relation. 

Three major integrity constraints which are:

1. Key constraints
There must be at least one minimal subset of attributes in the relation, which can recognize a tuple uniquely. This minimal subset of attributes is called key for that relation. If there is more than one such minimal subset, these are called candidate keys. Key constraints are also regarded as Entity Constraints.

2. Domain constraints
Attributes have specific values in real-world scenario. For instance, age can only be a positive integer. The same constraints have been tried to make use of on the attributes of a relation. Every attribute is bound to have a specific range of values. For instance, age cannot be less than zero and telephone numbers cannot have a digit outside 0-9.

3. Referential integrity constraints
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.
Referential integrity constraints work on the theory of Foreign Keys. A foreign key is a key attribute of a relation that can be referred in other relation.

No comments:

Post a Comment

Bottom Ad [Post Page]