151k views
0 votes
Referential integrity states that:______.

A. Something assigned to an attribute when no other value applies (N/A) or when the applicable value is unknown;
B. Values of an attribute must be taken from a pre-defined domain;
C. No primary key attribute (or component of a primary key) can be null;
D. Each foreign key value MUST match a primary key value in another relation or the foreign key value must be null;

User Rana Usman
by
5.1k points

1 Answer

4 votes

Answer:

D. Each foreign key value MUST match a primary key value in another relation or the foreign key value must be null.

Step-by-step explanation:

In Computer programming, integrity constraints can be defined as a set of standard rules that ensures quality information and database are maintained.

Basically, there are four (4) types of integrity constraints and these are;

1. Key constraints.

2. Domain constraints.

3. Entity integrity constraints.

4. Referential integrity constraints.

Referential integrity states that each foreign key value must match a primary key value in another relation or the foreign key value must be null.

For instance, when a foreign key in Table A points to the primary key of Table B, according to the referential integrity constraints, all the value of the foreign key in Table A must be null or match the primary key in Table B.

Hence, the referential Integrity constraints ensures that the relationship between the data in a table is consistent and valid.

User Ketan Akbari
by
4.7k points