Talk:Candidate key

message: I'm a bit scratchy on my theory here, but I think the following statement is wrong:
Foreign keys, for example, are usually required to reference such a primary key and not any of the other candidate keys.
If I understand candidate keys correctly, then most RDBMS do allows foreign key relationships with any candidate key that has a unique or primary key defined. John Vandenberg 08:50, 20 February 2007 (UTC)
thread_title:  Foreign keys 

message: I am a computer scientist, but still I found this article particularly hard to undertand. I have tried to make the lead section (at least) a bit less opaque, but the following paragraph got me confused:
:Since in some RDBMSs tables may also represent multisets (which strictly means these DBMSs are not relational),
But, the lead paragraph has defined "candidate key" for *relations*.  The lead section also observed that relations are sets, hence they cannot have repeated tuples, hence they always admit a candidate key.  But then, if an RDBMS is not a relation, the definition does not apply, and this observation is false.  So either the RDBMS should not be mentioned here, or the lead paragraph should be rewritten so that the definition can be used for them too.  The paragraph goes on to say
:it is an important design rule to specify explicitly at least one candidate key for each [RDBMS] relation.
But that is obviously impossible if the relation is a multiset!So what shall we make of this? All the best, --Jorge Stolfi (talk) 01:52, 11 August 2009 (UTC)
thread_title:  Incomprehensible sentence about RDBMS 

message: I recommend that this article should be merged with the Unique key article, as a subsection of that article. 69.116.234.82 (talk) 03:01, 27 March 2010 (UTC)
replies: text: I also disagree with the merge. --Wayiran (talk) 02:13, 13 April 2011 (UTC)
thread_title:  Recommend merging with [[Unique key]] 

message: The article intro implies that what possesses a candidate key is a relation.  Whereas the body of the article says that what possesses a candidate key is a relvar - "We have to consider all the relations that might be assigned to a relvar to determine whether a certain set of attributes is a candidate key."
I certainly side with the "relvar" interpretation.  Though confusingly, in Codd's definition of "candidate key" in his "Further Normalization of the Relational Model" article, candidate keys are defined with respect to relations.  (I'm aware the term "relvar" didn't exist back then.)
It's a problem.  We get a lot of discussion-page comments on the NF articles where people express confusion about why the candidate keys in our example tables are what they are, given the data in those tables.  I tell them that the data currently in the tables doesn't matter; you can't deduce candidate keys from that.  And yet Codd's original definition could be seen to reinforce their (from my point of view) mistaken interpretation.
Perhaps the article should acknowledge that this is an area of confusion, and address it explicitly.
--Nabav (talk) 09:17, 15 May 2010 (UTC)
thread_title:  Relation vs. Relvar 

message: The example shown is largely visual in nature, and is incomprehensible to someone using alternate display technology (such as adaptive technology for the blind).  It needs explanatory text added.  — Preceding unsigned comment added by 98.230.61.48 (talk) 02:15, 14 April 2012 (UTC)
thread_title:  poor example 

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