PrepAway - Latest Free Exam Questions & Answers

What is the relationship between the foreign key and primary key?

What is the relationship between the foreign key and primary key? Each correct answer represents a complete
solution. Choose all that apply.

PrepAway - Latest Free Exam Questions & Answers

A.
A foreign key constraint works in conjunction with a primary key constraint to enforce referential integrity
among related entities.

B.
A foreign key ties attribute(s) of an entity to the primary key of another entity, for the purpose of creating a
dependency.

C.
There is no relationship between a primary key and a foreign key.

D.
A foreign key and a primary key create a link between two entities.

Explanation:
Answer A and BA foreign key ties attribute(s) of an entity to theprimary key of another entity, for the purpose of creating a
dependency. It is used to
establish and enforce a relationship between data in two tables. A relationship between two tables is created by
adding a column or columns
holding the primary key values of the primary tableto the related table. This column becomes a foreign key in
the second table. You can
create a foreign key by defining a FOREIGN KEY constraint, when you create or alter a table.


Leave a Reply