How to find candidate keys in this relation?

  • Comp Sci
  • Thread starter shivajikobardan
  • Start date
  • Tags
    Relation
In summary, a candidate key is a set of attributes in a relation that uniquely identifies each tuple. To determine candidate keys, functional dependencies of attributes must be analyzed. Relations can have multiple candidate keys, which are known as alternate or secondary keys. The primary key is a chosen candidate key used for identification, while a candidate key can potentially serve as a primary key. However, not all candidate keys are equally good and it is important to carefully consider and evaluate them before selecting a primary key.
  • #1
shivajikobardan
674
54
Homework Statement
finding candidate keys
Relevant Equations
none
These are the FDs:
AB=>CD
C=>A
D=>B

My method of finding candidate keys is:

1) Look at RHS
2) Whatever isn't there could be a candidate key. (Find its closure).
But here everything is in RHS. So, I'm confused.
Can you share a better method to find candidate keys without getting too verbose(DBMS is too verbose).
 
Physics news on Phys.org
  • #2
my issue fixed after watching this video Qno.3
 

1. What is a candidate key in a relation?

A candidate key is a set of attributes in a relation that can uniquely identify each tuple. It means that no two tuples in the relation can have the same combination of values for the candidate key attributes.

2. How do you determine the candidate keys in a relation?

To determine the candidate keys in a relation, you need to identify all the possible combinations of attributes that can uniquely identify each tuple. These combinations are then evaluated for their uniqueness, and the ones that satisfy the uniqueness criteria are considered as candidate keys.

3. What is the difference between a primary key and a candidate key?

A primary key is a candidate key that has been chosen to uniquely identify each tuple in a relation. It is the key that is used for referencing and linking to other tables in a database. On the other hand, a candidate key is any set of attributes that can uniquely identify each tuple, but it may not have been chosen as the primary key.

4. Can a relation have more than one candidate key?

Yes, a relation can have more than one candidate key. In fact, it is common for a relation to have multiple candidate keys. However, only one of these candidate keys can be chosen as the primary key.

5. How do you choose the primary key from the candidate keys in a relation?

The primary key is usually chosen based on certain criteria, such as simplicity, stability, and familiarity. It should be a single attribute or a combination of attributes that is easy to understand and will not change frequently. It should also be a familiar attribute that is commonly used to identify tuples in the relation.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
655
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
606
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Special and General Relativity
Replies
16
Views
672
  • Introductory Physics Homework Help
Replies
11
Views
847
Replies
15
Views
2K
  • Special and General Relativity
Replies
20
Views
805
  • Special and General Relativity
Replies
2
Views
632
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Science and Math Textbooks
Replies
6
Views
2K
Back
Top