Integrity Constraints

RGPV: DBMS: Unit 2
 

INTEGRITY CONSTRAINT

 

Integrity Constraint:-

It is the mechanism or condition used to prevent invalid data entry into the relation (table). It applies rules on the table.

Three types of integrity contraints are-

(1)   Domain integrity constraint :- Set a range on any relation that will prevent the user from performing any invalid manipulation.

They are of two types:-

 

(i)                 NOT NULL: Not allow null values

(ii)               CHECK:  Specify condition that each tuple must satisfy.

 

(2)   Entity Integrity Constraints: Applies on relation or table.

They are of two types:

 

(i)                 UNIQUE: Prevent duplicate values, allow NULL values

(ii)               PRIMARY KEY: Prevent duplicate values, don’t allow null values

 

(3)   Referential Integrity Constraint: Applies condition in two tables.

 

(i)                 FOREING KEY: Tuples in the referencing relation R1 have attribute (Foreign key attribute) that reference the primary key attribute of the referenced relation R2.

COMING SOON...

LEAVE A REPLY










Related topics

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.