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.

 
Go Back  dBforums > General > Database Concepts & Design > Help with Functional Dependencies

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-10-09, 19:39
MDrey85 MDrey85 is offline
Registered User
 
Join Date: Feb 2009
Posts: 4
Question 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.
Reply With Quote
  #2 (permalink)  
Old 02-11-09, 00:22
r937 r937 is offline
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?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 02-11-09, 00:49
MDrey85 MDrey85 is offline
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?
Reply With Quote
  #4 (permalink)  
Old 02-11-09, 05:08
dportas dportas is offline
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?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On