by Dinesh Thakur Category: Memory

There are two types of relational integrity rules

Entity Integrity: - No attribute participating in the primary key of a base relation allowed containing any nulls. Primary key performs the unique identification function in a relational model. Thus a null primary key value within a base relation would be like saying that there was some entity that had no known identity. An entity that cannot be identified is a contradiction in terms, hence the name entity integrity.

Referential integrity: - A referential integrity constraint designates a column or combination of columns as a foreign key and establishes a relation ship between the foreign key and a specified primary or unique key, called the referenced key. or The value that appears in one relation for a given set of attributes also appears for a certain set of attributes in another relation is called Referential Integrity. If the Base Relation/Table includes a foreign key matching Primary key of some other base table relation. Then every value of the Foreign Key in the First table/Relation must either be equal to the value of Primary Key in some tuple of the second table or be the wholly null. Or in other words a Foreign Key value must match primary key value in some tuple of the referenced relation if that foreign key value is non-null. Sometimes it is necessary to permit foreign keys to accept nulls. Here it must be noted that the nulls are of the variety value does not exist’ rather than ‘Value unknown’.

If you liked this article, you can also catch us on facebook and Google+


Related Articles (You May Also Like)

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Related Articles