Talk:Superkey: Difference between revisions
Add talk header, assess article to Start-class, assess WikiProject Databases to High-importance, add WikiProject Computer science and assess to Mid-importance, and add WikiProject Software and assess to Low-importance. |
|||
(5 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{Talk header}} |
|||
⚫ | |||
{{WikiProject banner shell|class=Start| |
|||
{{WPDATABASE|class=stub|importance=low}} |
|||
⚫ | |||
⚫ | |||
{{WikiProject Computing|importance=Low|science=yes|science-importance=Mid|software=yes|software-importance=Low}} |
|||
}} |
|||
⚫ | |||
For the example, what is the point of having BLUE and blue? I think this poses confusion without explanation. [[User:JWHPryor|JWHPryor]] 19:26, 13 December 2006 (UTC)JWHPryor |
For the example, what is the point of having BLUE and blue? I think this poses confusion without explanation. [[User:JWHPryor|JWHPryor]] 19:26, 13 December 2006 (UTC)JWHPryor |
||
Line 17: | Line 20: | ||
: 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"? :) |
: 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. [[User:石庭豐|石庭豐]] ([[User talk:石庭豐|talk]]) 18:08, 2 May 2011 (UTC) |
: "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. [[User:石庭豐|石庭豐]] ([[User talk:石庭豐|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. |
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.<ref>Celko, Joe. ''SQL for Smarties'', Fourth Edition. Morgan Kaufmann, 2010, p. 205. ISBN |
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.<ref>Celko, Joe. ''SQL for Smarties'', Fourth Edition. Morgan Kaufmann, 2010, p. 205. {{ISBN|978-0123820228}}</ref>.[[User:LosD|LosD]] ([[User talk:LosD|talk]]) 04:55, 30 August 2013 (UTC) |
||
{{reflist-talk}} |
|||
== Chinese link == |
== Chinese link == |
||
Line 33: | Line 37: | ||
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. --[[User:ColinFine|ColinFine]] ([[User talk:ColinFine|talk]]) 19:04, 3 May 2011 (UTC) |
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. --[[User:ColinFine|ColinFine]] ([[User talk:ColinFine|talk]]) 19:04, 3 May 2011 (UTC) |
||
: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)<ref>google.com.vn/fuck%20me</ref> |
|||
:I'm very busy right now. I'll come back to this discussion later, but to make it short, here are my replies: |
|||
: 1. Please read at least the first paragraph of [http://en.wikipedia.org/wiki/Wikipedia:Redirect#Do_not_.22fix.22_links_to_redirects_that_are_not_broken Do not "fix" links to redirects that are not broken] and abide to this Wikipedia simple rule. |
: 1. Please read at least the first paragraph of [http://en.wikipedia.org/wiki/Wikipedia:Redirect#Do_not_.22fix.22_links_to_redirects_that_are_not_broken 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". |
: 2. 关系键 can be translated as "relational key", which in turn can be interpreted as "database key". So it's NOT "primary key". |
||
Line 50: | Line 54: | ||
Thanks. |
Thanks. |
||
--[[User:AutumnSnow|AutumnSnow]] ([[User talk:AutumnSnow|talk]]) 06:35, 26 October 2011 (UTC) |
--[[User:AutumnSnow|AutumnSnow]] ([[User talk:AutumnSnow|talk]]) 06:35, 26 October 2011 (UTC) |
||
{{reflist-talk}} |
|||
== Trivial Superkey == |
== Trivial Superkey == |
||
Line 56: | Line 62: | ||
:One property of a relation is that there are no duplicate tuples. --[[User:Boson|Boson]] ([[User talk:Boson|talk]]) 09:07, 23 May 2012 (UTC) |
:One property of a relation is that there are no duplicate tuples. --[[User:Boson|Boson]] ([[User talk:Boson|talk]]) 09:07, 23 May 2012 (UTC) |
||
== "Superkey (Template)" listed at [[Wikipedia:Redirects for discussion|Redirects for discussion]] == |
|||
[[File:Information.svg|30px]] |
|||
An editor has identified a potential problem with the redirect [[:Superkey (Template)]] and has thus listed it [[Wikipedia:Redirects for discussion|for discussion]]. This discussion will occur at {{slink|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. <!-- from Template:RFDNote --> [[User:1234qwer1234qwer4|1234qwer]][[User talk:1234qwer1234qwer4|1234qwer]][[Special:Contribs/1234qwer1234qwer4|4]] 14:15, 22 January 2023 (UTC) |
Latest revision as of 16:01, 27 July 2024
This is the talk page for discussing improvements to the Superkey article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||
|
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
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
Chinese link
[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)
- 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)
- 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)
- 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)
- 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)
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)
{{nobots}} were removed. Thanks. --AutumnSnow (talk) 06:35, 26 October 2011 (UTC)
References
- ^ 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)
"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)