220k views
5 votes
A ________ is an attribute that appears as a non-primary key attribute in one relation and as a primary key attribute (or part of a primary key) in another relation.

A) Referential integrity
B) Primary key
C) Foreign key
D) Unique key

1 Answer

6 votes

Final answer:

C) Foreign key. A foreign key is an attribute that appears as a non-primary key attribute in one relation and as a primary key attribute (or part of a primary key) in another relation.

Step-by-step explanation:

A foreign key is an attribute that appears as a non-primary key attribute in one relation and as a primary key attribute (or part of a primary key) in another relation.

This means that the foreign key in one relation is referencing the primary key in another relation, establishing a relationship between the two tables.

For example, let's say we have two tables: 'Students' and 'Courses'. In the 'Students' table, the primary key is the student ID, and in the 'Courses' table, the primary key is the course ID. If we want to associate a student with a specific course, we can include a foreign key in the 'Students' table that references the course ID in the 'Courses' table.

User Randie
by
8.5k points