Can a relation have Candidate Keys with different lengths?
问题 We can have more than one candidate key in a relation. But can we have two candidate keys in a relation different in length? Suppose I have a relation R(A,B,C,D,E) and we have only two sets of attributes which uniquely identify a tuple in the relation: {A,B,C} and {D,E}. So can we say both {A,B,C} and {D,E} are candidate keys? 回答1: But can we have two candidate keys in a relation different in length? Yes. A CK (candidate key) is a superkey (unique column set) that doesn't contain a smaller