What mechanism prevents the entry of duplicate records by specifying the columns that must contain a unique set of values?

  1. Foreign key

  2. Index

  3. Primary key

  4. User Key


Correct Option: D

AI Explanation

To answer this question, you need to understand the concept of preventing duplicate records and the mechanisms used to enforce uniqueness.

Option A) Foreign key - This option is incorrect because a foreign key is used to establish a relationship between two tables, not to prevent duplicate records.

Option B) Index - This option is incorrect because an index is used to improve the performance of database operations, such as searching and sorting, but it does not enforce uniqueness.

Option C) Primary key - This option is incorrect because a primary key is used to uniquely identify each record in a table, but it does not prevent the entry of duplicate records.

Option D) User Key - This option is correct because a user key, also known as a unique key or a candidate key, is a mechanism that enforces uniqueness by specifying the columns that must contain a unique set of values. This means that no two records in the table can have the same values in these columns.

The correct answer is D) User Key. This option is correct because it specifically refers to a mechanism that prevents the entry of duplicate records by specifying the columns that must contain a unique set of values.

Find more quizzes: