Results 1 to 4 of 4
  1. #1
    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.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    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?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    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?

  4. #4
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    If CustomerNum -> CustomerName then that suggests CustomerNum ought to be a key somewhere, yes? What relation are you going to put customer attributes in?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •