First time here? Checkout the FAQ!
+4 votes

Consider a relational table with a single record for each registered student with the following attributes:

  1. $\text {Registration_Num:}$ Unique registration number for each registered student
  2. $\text {UID:}$ Unique identity number, unique at the national level for each citizen
  3. $\text {BankAccount_Num:}$ Unique account number at the bank. A student can have multiple accounts or joint accounts. This attribute stores the primary account number.
  4. $\text {Name:}$ Name of the student
  5. $\text {Hostel_Room:}$ Room number of the hostel

Which of the following options is INCORRECT?

(A) $\text {BankAccount_Num}$ is a candidate key

(B) $\text {Registration_Num}$ can be a primary key

(C) $\text {UID}$ is a candidate key if all students are from the same country

(D) If $S$ is a super key such that $S \cap \text{UID}$ is $\text{NULL}$ then $S \cup \text{UID}$ is also a superkey

asked in Databases by Veteran (73.2k points)   | 404 views
plz ans this

3 Answers

+11 votes
Best answer

A relation is given (Registration_Num, UID, BankAccount_Num, Name, Hostel_Room).

Now, Registration_Num is unique for each student. So with this, we can identify each student. Hence, this can be the primary key.

UID: It's an identification number for a person in a country. (Say you're in India and your UID is 0243. Someone in Pakistan may also have the same UID as 0243). So, if all students are from India (that is, the same country) then their UID will be different and then UID will be a Candidate key.

If S is a super key then S $\cup$ UID will be a Super key. e.g.  R(A, B, C, D), If AB is a superkey then ABC, ABCD are also superkey.

BankAccount_Num is not a candidate key, because a student can have multiple accounts or joint accounts. We can not identify each student uniquely with BankAccount_Num.

answered by Boss (9.2k points)  
selected by
+4 votes
Ans is A

can have possible duplicate values

As in case of joint account maybe 2 students  having joint account together.

In d) any non key attribute combined with superkey can uniquely identify all attributes.
answered by Boss (7.2k points)  
why not c?

UID: Unique identity number, unique at the "National level" for each citizen.
and in option C it is clearly mentioned that "if all students are from the same country" then UID is primary key..

ok tnks
0 votes
Option B

As a student can have two bank accounts so for this particular student the relation will contain two tuples but for these two tuples registration_num is same so it can't be a primary key..
answered by Veteran (12.7k points)  
Der is single tuple bcoz Bank_Account_no stores information regarding primary bank account no only.

Related questions

Top Users Jan 2017
  1. Debashish Deka

    7050 Points

  2. Habibkhan

    4674 Points

  3. Vijay Thakur

    4224 Points

  4. saurabh rai

    4008 Points

  5. sudsho

    3960 Points

  6. Arjun

    3108 Points

  7. GateSet

    3088 Points

  8. santhoshdevulapally

    3004 Points

  9. Bikram

    2976 Points

  10. Sushant Gokhale

    2744 Points

Monthly Topper: Rs. 500 gift card

18,810 questions
23,779 answers
20,128 users