| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

02-10-09, 19:39
|
|
Registered User
|
|
Join Date: Feb 2009
Posts: 4
|
|
Help with Functional Dependencies
|
|
Could anyone tell me what the functional dependencies would be for the following tables?
Part (PartNum, Description, OnHand, Class, Warehouse, Price, (OrderNum, OrderDate, CustomerNum, CustomerName, RepNum, LastName, FirstName, NumOrdered, QuotedPrice))
Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State, Zip, Date, (PartNum, Description, Price, NumShipped))
Book ( BookCode, Title, PublisherCode, PublisherName, (AuthorNum, AuthorLast, AuthorFirst))
Thank you for any help.
|
|

02-11-09, 00:22
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
sorry, we won't do your homework assignment for you
however, we will help you understand the concepts
what have you tried so far? where are you having trouble?
|
|

02-11-09, 00:49
|
|
Registered User
|
|
Join Date: Feb 2009
Posts: 4
|
|
|
|
Well I already turned it in now but I'm still interested in whether I got it remotely right.
Doing the functional dependencies was not the homework itself, I was supposed to turn them from unnormalized to 3NF so I had to do the functional dependencies first.
The first table is the one that confused me the most.
Part (PartNum, Description, OnHand, Class, Warehouse, Price, (OrderNum, OrderDate, CustomerNum, CustomerName, RepNum, LastName, FirstName, NumOrdered, QuotedPrice))
This is what I put for the functional dependencies:
PartNum --> Description, OnHand, Class, Warehouse, Price
OrderNum --> OrderDate, CustomerNum
CustomerNum --> CustomerName, RepNum
RepNum --> LastName, FirstName
PartNum, OrderNum --> NumOrdered, QuotedPrice
I'm not sure if that's even right. Then I got really confused when I went from 1NF to 2NF
Part (PartNum, Description, OnHand, Class, Warehouse, Price)
Order (OrderNum, OrderDate, CustomerNum, CustomerName, RepNum)
PartOrder (PartNum, OrderNum, NumOrdered, QuotedPrice)
The part that confuses me is in Orders I put CustomerName and RepNum and I'm not sure if those belong there but I didn't know where else to put them.
Any help?
|
|

02-11-09, 05:08
|
|
Registered User
|
|
Join Date: Dec 2007
Location: London, UK
Posts: 732
|
|
If CustomerNum -> CustomerName then that suggests CustomerNum ought to be a key somewhere, yes? What relation are you going to put customer attributes in?
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|