I have a quick question regarding candidate keys and superkeys. Say you have two keys (a, b) where ‘a’ is a primary key and b is a candidate key. Would the combination of these two keys be a superkey ie. would (a,b) be a superkey? Or would it be a candidate key. My assumption is that it would be a superkey because the definition of a candidate key states that it is a irreducible superkey and the combination of the two fields a and b could be reduced to either a or b. Is this logic correct? Or am I missing something here? Thanks!
Share
Yes, it would still uniquely identify rows.
No, it would no longer be minimal.
Almost. Yes it would be a superkey, but not because it can be reduced. It would be a superkey because it is unique.
Every candidate key is superkey, but not every superkey is candidate key. So
{a}is both candidate and superkey,{b}is both candidate and superkey and{a, b}is just superkey.