296 views

Ans is 22

getting 10.

source of the question?

@Chandrabhan Vishwa 1 Looks like Geeksforgeeks

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$

Nice approach
edited
This answer is wrong (poor question + Wrong solution). Worst thing .

{state}, {state,pincode} both together you are taking as candidate key,

@raja11sep why u take state and state pincode simultaneously?

Bro read the ans and my comment again. I’m just giving counter-example.
@raja

why u take both values simultaneously this is a possibility  means these are not simultaneoulsy hold  in a relation . like when u toss a coin   then it is head or tail not both

at a time only one

@raja11sep Also once they counted {name}, {state}, {pincode} as candidate key, how can they count superset of these as candidate keys?

This question is so badly framed, it should not even exist.

They are the total candidate keys possible. Need not hold all conditions simultaneously.
Still, the first statement of the best answer is wrong.
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.
yes

subtracting 8 manage it