Apologies if I butchered the question, I wasn't quite sure how to word it.

In the Ramakrishnan text (2nd edition) on page 423 (in the section on functional dependencies) this statement is made:

If $X \rightarrow Y$ holds, where [$X$ is the set of key attributes and] $Y$ is the set of all attributes, and there is some subset $V$ of $X$ such that $V \rightarrow Y$ holds, then $X$ is a superkey; if $V$ is a strict subset of $X$, then $X$ is not a key.

I got the basic idea here (that if $X$ contains some $V$ where $V \rightarrow Y$ then $X$ is a key that contains a smaller key), but I must be misunderstanding something on the second case. Why isn't $X$ a key in the second case? It would seem that a strict subset would be a stronger case for being a "key within a key" which is how I understand a superkey to be structured.


1 Answer 1


Generally, you want to define a key as a superkey that is minimal with respect to inclusion; if $X$ is a superkey, $V$ is a superkey and $V \subset X$, then $X$ can't be minimal.

The intuitive idea behind the definition is that we don't want keys to contain "useless" attributes. For instance, imagine a table that contains a list of people, each of which has a unique number $K$, a name $N$ and a surname $S$. $K$ would be a key to that table, because it functionally determines all other attributes in the relation. The pair of attributes $\{K, S\}$ also functionally determines the entire relation, but attribute $S$ is "useless" in that respect, because it is itself determined by $K$.

  • $\begingroup$ Ok thanks for the answer. I was wondering if it was along these lines but wasn't sure just based on the reading. Your clarification regarding $X$ not being minimal cleared it up. $\endgroup$
    – Dave
    Commented Feb 11, 2017 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.