in Databases retagged by
274 views
0 votes
0 votes

Please explain   

Ans is 22

in Databases retagged by
274 views

3 Comments

getting 10.
0
0

@Amit Mehta  

source of the question?

0
0

@Chandrabhan Vishwa 1 Looks like Geeksforgeeks

0
0

1 Answer

1 vote
1 vote
Best answer
Total Keys Possible = $2^5$ = 32

Candidate Key is Minimal Super Key. There can be multiple CK’s.

We select any one key of our choice from CK’s and call it as primary key of the table.

Candidate Keys:

CITY => not possible (As CITY,COUNTRY is a candidate key already)

COUNTRY => not possible(same reason)

Anything added with CITY,COUNTRY is also not possible as we want minimal superkey. Here, we have 8 possibilities.

Possible Candidate Keys = $32 – 2 – 8 = 22$
selected by

4 Comments

I guess the total number of keys possible would be 31. From the formula $2^{^{n}}-1$ for the total number of superkeys possible with $n$ attributes.
1
1
yes
0
0

@Vishal_kumar98 

subtracting 8 manage it

0
0