COMPUTER FUNDAMENTALS

COMPUTER APPLICATIONS

DATABASE MANAGEMENT SYSTEMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Consider attributes ID, CITY and NAME. which one of these can be considered as a primary key?
A
NAME
B
ID
C
CITY
D
ID, NAME
Explanation: 

Detailed explanation-1: -Consider attributes ID, CITY and NAME. Which one of this can be considered as a super key ? Explanation: Here the id is the only attribute which can be taken as a key.

Detailed explanation-2: -Candidate keys are those attributes that uniquely identify rows of a table. The Primary Key of a table is selected from one of the candidate keys.

Detailed explanation-3: -A Primary Key is the minimal set of attributes of a table that has the task to uniquely identify the rows, or we can say the tuples of the given particular table. A primary key of a relation is one of the possible candidate keys which the database designer thinks it’s primary.

There is 1 question to complete.