140k views
2 votes
In referential integrity constraint, the referenced attribute(s) must be __________ or _________

Select one:
a. Primary key, Foreign key
b. Unique key, Foreign key
c. None of the others
d. Primary key, Unique key

1 Answer

3 votes

Final answer:

In referential integrity constraint, the referenced attributes must be a Primary key or a Unique key to ensure that the foreign key value matches a value in another table and maintains data consistency.

Step-by-step explanation:

In referential integrity constraint, the referenced attribute(s) must be either a Primary key or a Unique key. This is because the purpose of the constraint is to ensure that the value of the foreign key matches one of the values in a column of another table, typically the primary or unique key. It is crucial to maintain consistent and accurate data relations across various tables in a relational database. For example, in a database containing tables for 'Students' and 'Enrollments', the 'Enrollment' table might have a foreign key that references the 'StudentID' in the 'Students' table. 'StudentID' would need to be a primary or unique key in the 'Students' table to maintain referential integrity.

User Wayne Weibel
by
7.0k points