views:

82

answers:

4

Hi guys, i'm struggling with these normalization. I was asked to convert relational database tables into 1NF, 2NF and 3NF. Please help me! I've tried to Google around for answers and explanation and still don't really understand it. Here are the questions:

1/ When is a relational database table said to be in first normal form. Study the Branch table below and convert it to 1NF. stat

2/ Explain why the following table is not in Second Normal Form. Convert the table to 2NF. alt text

3/ The following relational table is not in Third Normal Form. Why is this so? Convert the table to 3NF. alt text

Please help! I really don't understand it.

I've read through this post:

http://stackoverflow.com/questions/723998/can-someone-please-give-an-example-of-1nf-2nf-and-3nf-in-plain-english

But still don't understand.

Really appreciate for any help!

A: 

Normalization is all about eliminating redundant data: a quick glance at the tables will tell you that a lot of fields are repeated.

Take for example the second table: by mixing staff and branch details, we end up repeating a lot of stuff. Obviously a person always has a fixed name, and a branch has a fixed address, so put this information into a separate staff table and a separate branch table. Then the original table will have only pairs of staff no. and branch no., and any information unique to each pair, such as hours per week.

I hope you get the idea, and that you can answer the rest of the problem by yourself.

casablanca
A: 

Here's what's i've got for Question 1 there. Don't know if this is right or not. Please do correct me. alt text

James1
That's right. . .
Larry Lustig
@Larry: can i do it this way though? is this alright? http://i396.photobucket.com/albums/pp44/yoyoyaya_2008/Capture1-3.jpg
James1
Definitely not! What happens if a branch changes its name? Three updates! Your first attempt, above, is correct.
Larry Lustig
A: 
Marcelo Cantos
@Marcelo: thanks a lot for your explanations, but it's still kinda a puzzle to me though. Would you mind covert those tables into 1NF, 2NF and 3NF, maybe its easier for me to understand? Although, i think i've got question 1 answered there. the answer at the bottom there.
James1
I've read some websites about this and it says there are 3 golden rules to do this thing: 1NF: No repeating elements or groups of elements, 2NF: No partial dependencies on a concatenated key and 3NF: No dependencies on non-key attributes but i'm still not sure how to convert those tables.
James1
Yes I would mind showing you the answer. You need to do your own homework. I have, however, appended some further advice to my answer. It may be quite different to what you've read in your text books, but if you get your head around the concepts as I describe them, you'll come away with a much better understanding of what normalization theory is all about.
Marcelo Cantos
A: 

Here is the answer the my question 2 above. Please guys, help me to correct this. This is what i've come up so far. alt text

James1

related questions