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! Normalisation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-29-10, 09:02
Aaron09 Aaron09 is offline
Registered User
 
Join Date: Oct 2010
Posts: 4
Help! Normalisation

Im a student and we have been given a task of normalising the following information. Im not asking for the answers im just looking for a point in the right direction as im really struggling.

Normalise the following relation to 3rd Normalform:

Retail( rID, rlocation, (staffID, staffName, staffPhNumber), (productID, productName, amount));

These are the functional dependencies:

staffID -> staffName
staffID -> staffPhNumber
rID -> rlocation
productID -> productName

Your solution should show the relations, steps and justifications for 1NF, 2NF and 3NF.

Can you tell me if im anywhere near the right answer with this solution

1NF ( No repeating groups)

Retail( rID, rlocation)
Staff (rID, staffID, staffName, staffPhNumber)
Prouduct (staffID, productID, productName, amount)

2NF ( No repeating groups and no partial key dependencies)

Retail( rID, rlocation)
Staff (rID, staffID)
Name ( staffID, staffName, staffPhNumber)
Prouduct (staffID, productID, productName)
Pname ( productID, productName, amount)

3NF ( contains no repeating groups, no partial functional dependencies, and no transitive functional dependencies )

Retail( rID, rlocation)
Staff (rID, staffID)
Name ( staffID, staffName, staffPhNumber)
Phone ( staffName, staffPhNumber )
Prouduct (staffID, productID, productName)
Pname ( productID, productName, amount)

Any help with this would be greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old 10-29-10, 09:06
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by Aaron09 View Post
Any help with this would be greatly appreciated.
would you like us just to correct your work for you?

or did you have a question about anything in particular?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 10-29-10, 09:10
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
There are errors.

You should identify your keys at each stage. Without the keys, how do you identify partial dependencies, or transitive dependencies between non-prime attributes?
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #4 (permalink)  
Old 10-29-10, 10:54
Aaron09 Aaron09 is offline
Registered User
 
Join Date: Oct 2010
Posts: 4
Smile

Im not asking for the answers i would just like to know what area i need to be looking in, i.e is 1NF ok? but 2NF isnt
Reply With Quote
  #5 (permalink)  
Old 10-29-10, 10:58
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Well, if you look at the requirement for 1NF you need a primary key, so no.

You must identify your keys - everything is driven by keys and dependencies.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #6 (permalink)  
Old 10-29-10, 11:19
Aaron09 Aaron09 is offline
Registered User
 
Join Date: Oct 2010
Posts: 4
suldowd often

1NF ( No repeating groups)

Retail( rID, rlocation)
Staff (rID, staffID, staffName, staffPhNumber)
Prouduct (staffID, productID, productName, amount)

2NF ( No repeating groups and no partial key dependencies)

Retail( rID, rlocation)
Staff (rID, staffID)
Name ( staffID, staffName, staffPhNumber)
Prouduct (staffID, productID, productName)
Pname ( productID, productName, amount)

3NF ( contains no repeating groups, no partial functional dependencies, and no transitive functional dependencies )

Retail( rID, rlocation)
Staff (rID, staffID)
Name ( staffID, staffName, staffPhNumber)
Phone ( staffName, staffPhNumber )
Prouduct (staffID, productID, productName)
Pname ( productID, productName, amount)

Everything in bold and underlined being my primary keys or composite keys. sorry if i seem really dumb but i have only been doing this subject for about 4 weeks and im finding it quite tough.
Reply With Quote
  #7 (permalink)  
Old 10-29-10, 11:21
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
No that's fine.
EDIT:
1NF is wrong (so are 2NF and 3NF).
All you need for 1NF is to identify a key. You don't actually need to decompose your tables in to three. It is a more useful exercise when learning to not do so.

So, for 1NF just copy and paste what you have been given and identify a key.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.

Last edited by pootle flump; 10-29-10 at 11:26.
Reply With Quote
  #8 (permalink)  
Old 10-29-10, 11:29
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
I'm muddying the waters here a bit but I've just looked at the original assignment a little deeper.
Is there any more accompanying text? It doesn't make complete sense to me.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #9 (permalink)  
Old 10-29-10, 11:38
Aaron09 Aaron09 is offline
Registered User
 
Join Date: Oct 2010
Posts: 4
Thanks for your quick replies. No there is no more text with the question. its funny you say its confusing, I spoke to another lecturer at my uni and he didnt think it was a great question and was confused himself.

The reason i have decomposed the tables to get into 1NF is because that is how we were shown and the lecturers want us to show each individual step.
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