Questions tagged [candidate-key]

A key is a set of attributes that is irreducibly unique and non-nullable within a table. Irreducible means that all the attributes of the key are necessary to guarantee uniqueness - remove any one attribute and the uniqueness property would be lost. A key may consist of zero, one or more attributes and a relational table (relation variable) must have at least one key and may have more than one.

A key is a set of attributes that is irreducibly unique and non-nullable within a table. Irreducible means that all the attributes of the key are necessary to guarantee uniqueness - remove any one attribute and the uniqueness property would be lost. A key may consist of zero, one or more attributes and a relational table (relation variable) must have at least one key and may have more than one.

97 questions
2
votes
2 answers

How can I determine the candidate keys in this relation

I have the relation R(ABCDEF) and the functional dependencies F{AC->B, BD->F, F->CE} I have to find all the candidate keys for the relation(Armstrong axioms). I did this: A->A, B->B, C->C, D->D, E->E, F->F From F->CE => F->C and F->E And then: 1.…
2
votes
1 answer

Can trivial superkey be considered as candidate key?

Suppose relation R(A,B,C,D) exists with no functional dependency. So what should be considered as its candidate key? Clearly any individual attribute or proper subset of all attributes cannot be a candidate key because by no means they can identify…
Mohit Jain
  • 733
  • 3
  • 9
  • 24
1
vote
3 answers

Candidate Key Identification with Functional Dependencies

I'm having trouble understanding how to identify keys in functional dependencies. I've been looking at examples, for example: Given a relation ABCD, find all keys not including superkeys of the A -> BC, C -> D, CD -> AB. This gives keys C and A.…
1
vote
1 answer

How does this relation produce candidate keys?

Given relation R(a,b,c) and that there are no functional dependencies: How are candidate keys computed?
nicomp
  • 4,344
  • 4
  • 27
  • 60
1
vote
0 answers

Data normalisation into third normal form

I have done data normalization on dummy data and would like to know if I did it correctly. If it is done correctly, I would also like to ask two things below, because it is about 3NF. 1NF: This table should be…
1
vote
0 answers

Is normalisation done on the primary key or on the candidate keys?

Im not sure about the correct definitions for normalisations, as primary key and candidate key are used interchangeably. I have come across these 2 definitions when trying to find a definition for 2NF and 3NF. Definitions 1: 2NF: "And every…
1
vote
0 answers

find candidate key from fd

Hi I need a little help with finding candidate key with FD: given relation : R{x,y,z,s,t,u,w} FD: {s->x , t->y , x->y ,xy->tuz} is the candidate key {s,w} ?
1
vote
1 answer

How do primary keys work in junction tables for a DBMS? How can a composite key be a primary key?

In a DBMS we have Superkey - An attribute or a set of attributes that uniquely identifies a row in a table. Candidate Key - An attribute or set of attributes that uniquely identify identifies a row in a table. The difference between the superkey…
1
vote
1 answer

Determining candidate keys by common-sense?

I have following table: Book_Name Author Edition Year DB_fundamentals Navathe 4 2004 DB_fundamentals Elmasri 4 2004 DB_fundamentals Elmasri 5 2007 DB_fundamentals Navathe 5 2007 Without any knowledge I have to…
1
vote
2 answers

Candidate keys after canonical cover

I have a set of functional dependencies: V = {ABCDEF} F = {AB → CD,ABDE → F,BC → A,C → DF} Candidate keys are: {ABE, BCE} Canonical cover is: {AB→ C, BC→ A, C→ DF} [This is what I think, might be wrong] However, as you can see an attribute of…
user8814439
1
vote
1 answer

In which normal form are these FDs?

I've been trying to figure out the difference between the 2nd and 3rd Normal Form using this example. The definitions didn't do the trick for me... These are the functional dependencies: A is the candidate key. (A --> A,B,C,D) FDs: A --> CD AC -->…
1
vote
2 answers

Can a relation have Candidate Keys with different lengths?

We can have more than one candidate key in a relation. But can we have two candidate keys in a relation different in length? Suppose I have a relation R(A,B,C,D,E) and we have only two sets of attributes which uniquely identify a tuple in the…
NARAYAN
  • 21
  • 1
  • 5
1
vote
2 answers

finding largest number of candidate keys that a relation has?

I am trying to solve this question which has to do with candidate keys in a relation. This is the question: Consider table R with attributes A, B, C, D, and E. What is the largest number of candidate keys that R could simultaneously have? the…
user3676224
  • 863
  • 2
  • 11
  • 25
1
vote
1 answer

Do we check Candidate Key in 1st Normal Form Table ONLY?

I am little confused in understanding Candidate Keys. Do we check Candidate Keys in 1st Normal Form tables only? As we know, a Candidate Key simply consists of a column or group of columns which can take the place of a Primary Key. If there are…
1
vote
1 answer

Example of when you should use a foreign key that points to a candidate key, not a primary key?

I've read in several different books and sources that: A foreign key must point to a candidate key (or primary) A foreign key almost always points to a primary key The authors of the sources always say something along the lines of, "while foreign…
J doh
  • 105
  • 1
  • 1
  • 11