# Why is a set of attributes X not a key if X → Y holds but there exists a strict subset V of X where V → Y?

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.

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$.
• 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. – Dave Feb 11 '17 at 19:58