GATE CSE
First time here? Checkout the FAQ!
x
+5 votes
657 views

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 (78.3k points)   | 657 views
plz ans this

3 Answers

+13 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.6k points)  
selected by
Is the reason given for BankAccount_Num correct? Even if we have multiple bank accounts for a single student but we are storing only the primary account number not all.

I understood that answer is A but please clear this doubt?
@Gaurab Ghosh

what happen when two students having joint bank account ??
+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.5k 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..
true.

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 (13k points)  
Der is single tuple bcoz Bank_Account_no stores information regarding primary bank account no only.
Answer:

Related questions



Top Users Jul 2017
  1. Bikram

    5368 Points

  2. manu00x

    3092 Points

  3. Arjun

    1924 Points

  4. joshi_nitish

    1898 Points

  5. Debashish Deka

    1874 Points

  6. pawan kumarln

    1454 Points

  7. Tesla!

    1390 Points

  8. Hemant Parihar

    1314 Points

  9. Shubhanshu

    1136 Points

  10. Arnab Bhadra

    1124 Points


24,141 questions
31,143 answers
70,892 comments
29,467 users