When the values in one or more attributes being used as a foreign key must exist in another set of one or more attributes in another table, we have created a(n):
A. transitive dependency.
B. insertion anomaly.
C. referential integrity constraint.
D. normal form.
Answer: Option C
Solution (By Examveda Team)
- Transitive dependency refers to a situation where a non-prime attribute is functionally dependent on another non-prime attribute.- Insertion anomaly occurs when certain attributes cannot be inserted into a table without the presence of other attributes.
- Referential integrity constraint ensures that the values in a foreign key column match the values in the primary key of another table, maintaining the relationship between the tables.
- Normal form refers to a state of organizing data in a database to reduce redundancy and improve data integrity.
In this scenario, the correct answer is referential integrity constraint as it describes the situation where values in one table must exist in another table to maintain the relationship between them.
explain referential integrity constraint?