info@jobexams.pk

MCQ Detailed View

Explore the question in detail with explanation, related questions, and community discussions.

1 DATABASE MCQS

Which of the following keys is not unique?

  • Secondary key
  • Primary key
  • Foreign key
  • Candidate key
Correct Answer: C. Foreign key

Detailed Explanation

In a database, a foreign key is a field or a set of fields in one table that refers to the primary key in another table. Unlike primary keys, a foreign key does not have to be unique. In fact, it often contains duplicate values because multiple records in one table can refer to the same record in another table.


For example, in an Orders table, the CustomerID field may be a foreign key that refers to the ID in the Customers table. Many orders can be placed by the same customer, so the CustomerID (foreign key) can appear multiple times in the Orders table.

Discussion

Thank you for your comment! Our admin will review it soon.
No comments yet. Be the first to comment!

Leave a Comment