Machine-translated by Google. Questions are authored in English.
Top

Discussion

For a relation R(A, B, C) with three attributes A, B and C, what is the maximum number of possible composite keys ?

  • A.3
  • B.4
  • C.7
  • D.9

Answer: B

The maximum number of composite keys is 4.

A composite key is a key made of two or more attributes. From three attributes the possible combinations of two or more are:

\[ \begin{aligned} &\{A,B\},\ \{A,C\},\ \{B,C\} \\ &\{A,B,C\} \end{aligned} \]

That is \(\binom{3}{2} + \binom{3}{3} = 3 + 1 = 4\). 3 counts only the two-attribute pairs, 7 counts every non-empty subset including the three single attributes, which are not composite, and 9 matches no count.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.