MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATABASE MANAGEMENT SYSTEM

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The key that can be used for data retrieval is known as ____
A
Foreign key
B
Surrogate key
C
Primary key
D
Secondary key
Explanation: 

Detailed explanation-1: -A primary key is the field in a database that is the primary key used to uniquely identify a record in a database. A secondary key is an additional key, or alternate key, which can be use in addition to the primary key to locate specific data.

Detailed explanation-2: -The main purpose of the primary key is faster data retrieval.

Detailed explanation-3: -Secondary keys are also called alternate keys. They uniquely identify rows in a table and thus can be used alternatively as primary keys.

Detailed explanation-4: -Secondary keys are used to view records in an order that is different from the order defined by the primary key fields.

Detailed explanation-5: -That country column in the customer table would be a foreign key. A secondary key on the other hand is just a different column in the table that you have used to create an index (which is used to speed up queries). Foreign keys have nothing to do with improving query speeds.

There is 1 question to complete.