For the example, what is the point of having BLUE and blue? I think this poses confusion without explanation. JWHPryor 19:26, 13 December 2006 (UTC)JWHPryor
wouldn't all columns together also be a superkey? By the definition given in this article? --Avl 15:49, 20 February 2007 (UTC)
Yes, as long as the table or view you consider does not contain duplicate rows. 151.46.130.95 18:00, 8 March 2007 (UTC)
Aha, so the provided example does not list ALL superkeys? I think perhaps this should be made explicit, as it is written now, one may be given the impression that only the sets of columns listed constitute superkeys, when in fact, there are many more superkeys. --Avl 18:15, 26 March 2007 (UTC)
- I changed the example so as to remove the ambiguity. --Nabav 14:13, 16 April 2007 (UTC)
Where did this term even come from? As far as I know, PostgreSQL, MySQL, Oracle, and Microsoft all use "primary key" to mean the ... primary key of a table. Without attribution, it seems like someone just made this up. Mephistopheles (talk) 15:45, 21 October 2009 (UTC)
- By "this term", you mean "superkey"? Well, I've learnt this in database course many many years ago and I'm pretty sure "nobody just made this up", well... except those guys who were "fathers" of modern database relational models who were about ... 40 years ago. Is "40 years" qualified for "just"? :)
- "Superkey" is different, far different, from "primary key". A primary key is necessarily a superkey, but a superkey is not necessarily a primary key. You must have confused superkey with candidate key. A primary key is the candidate key that you want to assign to database table for practical reason. 石庭豐 (talk) 18:08, 2 May 2011 (UTC)
I must say that the language in this article could be improved a lot. Compared to the simple explanation in the about.com article (http://databases.about.com/cs/administration/g/superkey.htm) the first sentence is just unnecessarily complex.
The sentence In a real database we do not need values for all of those attributes to identify a tuple. We only need, per our example, the set {employeeID}. This is a minimal superkey – that is, a minimal set of attributes that can be used to identify a single tuple is a bit misleading. Many tables, if properly designed, does not need an id-style primary key, but uses a compound key (natural key). That compound key would be the candidate key.[1].LosD (talk) 04:55, 30 August 2013 (UTC)
References
Celko, Joe. SQL for Smarties, Fourth Edition. Morgan Kaufmann, 2010, p. 205. ISBN 978-0123820228