Jump to content

Talk:Superkey

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Remark

[edit]

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[reply]

wouldn't all columns together also be a superkey? By the definition given in this article? --Avl 15:49, 20 February 2007 (UTC)[reply]

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)[reply]

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)[reply]

I changed the example so as to remove the ambiguity. --Nabav 14:13, 16 April 2007 (UTC)[reply]

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)[reply]

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)[reply]

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)[reply]

References

  1. ^ Celko, Joe. SQL for Smarties, Fourth Edition. Morgan Kaufmann, 2010, p. 205. ISBN 978-0123820228
[edit]

Three times now User:石庭豐 has reverted a change by Wikitanvirbot and Wikitanvir, to place an interwiki link to zh:超鍵. Twice the bot removed this and the user reinstated it; the third time User:Wikitanvir replaced the link by zh:关系键, and 石庭豐 changed it back.

If you follow these links, you will find that zh:超鍵 is a WP:REDIRECT in the Chinese Wikipedia, to zh:关系键. I don't read Chinese, but judging by its interwiki links, it seems that zh:关系键 does indeed mean "primary key", and User:石庭豐 may well be right that 超鍵 is the correct translation of "superkey".

However, as long as the Chinese Wikipedia has this redirect (which is wrong, if User:石庭豐 is correct) it is unhelpful to link to 超鍵, because that will immediately redirect to 关系键. I am guessing that that is why the bot removed the interlink, and then Wikitanvir attempted to replace it by a link to its destination.

So, 石庭豐, I suggest that until zh:超鍵 is an article itself, and not a redirect to what you think is the wrong page, the interwiki link should not be here. If you are able to fix the Chinese entries, then of course it is worth reinstating. --ColinFine (talk) 19:04, 3 May 2011 (UTC)[reply]

I'm very busy right now. Hihihihi i love you —————————°′§07:10, 24 October 2017 (UTC)07:10, 24 October 2017 (UTC)07:10, 24 October 2017 (UTC)07:10, 24 October 2017 (UTC)[1]
1. Please read at least the first paragraph of Do not "fix" links to redirects that are not broken and abide to this Wikipedia simple rule.
2. 关系键 can be translated as "relational key", which in turn can be interpreted as "database key". So it's NOT "primary key".
石庭豐 (talk) 11:11, 4 May 2011 (UTC)[reply]
Redirects do not harm, they are quite okay when they are in article body, but an inter-wiki should not be placed to a redirect page. The policy link you were referring to was not about using redirect page as inter-wiki link. The bot will automatically remove/modify that that link which is linked to a redirect page. It is not applicable to my bot, but also for others. As ColinFine said above, try to renaming the Chinese article, then come back here to change the inter-wiki. Thanks! — Tanvir | Talk ] 12:53, 4 May 2011 (UTC)[reply]
As Tanvir says, the policy you are citing does not obviously apply to interwiki links. What the Bot did was to remove your links, not bypass them: I think that Tanvir then bypassed the link to try and satisfy you.
If the Chinese article existed, there would be no problem; but if (as I think you are indicating) 关系键 doesn't mean "superkey" anyway, I don't understand why you are so insistent on linking to a Chinese redirect to 关系键.
And by the way, referring to editors' obviously good-faith edits as "vandalism" is not welcome. --ColinFine (talk) 18:49, 4 May 2011 (UTC)[reply]

I would like to remove {{nobots}} from this article, Candidate key and Foreign key. It blocks useful bot edits. --AutumnSnow (talk) 05:13, 31 August 2011 (UTC)[reply]

{{nobots}} were removed. Thanks. --AutumnSnow (talk) 06:35, 26 October 2011 (UTC)[reply]

References

  1. ^ google.com.vn/fuck%20me

Trivial Superkey

[edit]

I don't think this comment in the article is correct: "Note that the set of all attributes is a trivial superkey." If a table does not have a primary key, it may not have any superkey.

One property of a relation is that there are no duplicate tuples. --Boson (talk) 09:07, 23 May 2012 (UTC)[reply]

"Superkey (Template)" listed at Redirects for discussion

[edit]

An editor has identified a potential problem with the redirect Superkey (Template) and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2023 January 22 § Superkey (Template) until a consensus is reached, and readers of this page are welcome to contribute to the discussion. 1234qwer1234qwer4 14:15, 22 January 2023 (UTC)[reply]