referential integrity image

This topic is one of the most important aspects to add consistency to database designs. Integrity constraints help maintain the semantic consistency of the data. Integrity constraints provide a means of ensuring that modifications made to the database by authorized users do not cause loss of data consistency. That is, they protect the database against accidental damage. One of those integrity constraints is Referential Integrity. Here you can see in more detail what it is about.

 What is Referential Integrity?

Referential Integrity in database allows assuring that a value that appears in a relation for a determined set of attributes also appears in another relation for a certain set of attributes.

referential integrity

Basic concepts of Referential Integrity constraint

Be a couple of relationships r(R) y s(S) and the natural union r/x/ s. There may be a tuple tr of r that does not meet with any tuple of s.

That is, there is no ts in s such that tr [R ∩ S] = ts [R ∩ S]. These tuples are called hanging.

Hanging tuples may be acceptable depending on the set of entities or relationships being modeled. The external meeting allows to operate with relationships containing hanging tuples.

Be r1 (R1) and r2(R2) two relations with the primary keys K1 and K2, respectively. It is said that a subset α of R2  is an external key that refers to K1 of the relationship r1 if it is required that for each t2 of r2 there is a tuple t1 of r1 such as t1 [K1] = t2[α]. The demands of this type are called restrictions of referential integrity or dependence of a subset.

The designation dependence of a subset is due to the fact that this last restriction of referential integrity can be written as Пα (r2) Пk1 (r1).

Note that, for a referential integrity constraint to make sense, α must be equal to K1, or else α and K1 must be compatible sets of attributes.

To get the info on Domain Controller visit below link:

Referential integrity in the E-R model

Referential integrity constraints appear frequently. If the schema of the relational database is obtained by creating tables from the E-R diagrams, each relation that comes from a set of relationships will have referential integrity constraints.

Be an N-ary set of relations R, which relates the sets of entities E1, E2, …, En, Ki denotes the primary key of Ei. The schema attributes of the relation set of R relations include K1 U K2 U … U Kn . Each Ki from the R schema is an external key that leads to a constraint of referential integrity.

For more information about the Referential Integrity, visit:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.