How to find candidate keys here in DBMS?

  • Comp Sci
  • Thread starter shivajikobardan
  • Start date
In summary, the given relation has a primary key of Sname and Sno, with functional dependencies of Sno,Pno -> Qty, Sname,Pno -> Qty, Sno -> Sname, and Sname->Sno. To find the other primary key, you can use a candidate key calculator. However, there may still be some uncertainty due to missing information.
  • #1
shivajikobardan
674
54
Homework Statement
find candidate keys
Relevant Equations
Normalization in database
Consider a relation given below SP(Sno,Sname,Pno,Qty). Here Sname is considered unique for each Sno. So, FD of above relation is:

Sno,Pno -> Qty
Sname,Pno -> Qty
Sno ->Sname
Sname->Sno

Sname,Sno is one primary key(it's worded in question). What's the other? How to find it is my question. I've heard about taking closures but here there are 2 attributes in the LHS so I can't see a way to do closures.
 
Physics news on Phys.org
  • #2
It's hard to say much without more information, but I have some questions. You say that "Sname is considered unique for each Sno", but that does not necessarily mean that Sno is unique for each Sname. Is that true?
Does 'S' mean supplier? Does 'Sno' mean the Supplier part number for a part, or is it a number that you have given uniquely to each supplier?
Why do you need both Sname and Sno for a primary key?
Are you sure about Sname ->Sno? Are you saying that there can't be things from two different suppliers with the same name but different part numbers?

IMO, there is a lot left to guess at.
 

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
747
  • Engineering and Comp Sci Homework Help
Replies
1
Views
665
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
659
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
674
  • Engineering and Comp Sci Homework Help
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
Replies
12
Views
1K
  • Feedback and Announcements
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
968
  • Special and General Relativity
Replies
10
Views
2K
Back
Top