Well this is the situation, I am currently studying Computer Science at University and have only studied a little bit of Databases in the past, enough to keep me going when I was doing it, but now I have taken database modules and everyone seems to know what they are doing.
I am really struggling in terms of trying to understand how to normalize a database!?!? I have looked online at so many different examples, but they all seem to say the same thing, but I do not understand...I think this is right:
-To get a database into 2nd Normal Form you need to remove all functional dependencies.
-To get a database into 3rd Normal Form you need to remove all transitive dependencies.
Hopefully I have understood this correct!?!? But the thing is, I understand the concept of this, but I do not understand how to actually apply this...and I have searched and searched on the Internet for just a simple beginners guide to this...and it is driving me mad on how complex some 'simple' guides are??
There was an example given today, which was this...
If we know this:
Relation Name: Contacts
Attributes: Name, Room, Telephone, email
Dependencies: Name -> Telephone
Room -> Telephone
Name -> email
Turn this into 3rd Normal Form. I cannot do this to save my life for some reason...I cannot understand how to know what the functional dependencies are??
I mean, from this i can gather that Name -> Telephone, Email, and that Room -> Telephone, but which ones are partially dependent and how do you tell?
If anyone can please PLEASE explain and talk me through this and give a simple guideline on how to turn a table into a 2NF, given a set of dependencies I will be forever grateful!
note that room does not necessarily determine telephone
it might've, back in the day, when all there was was land lines
but i would venture that a person's contact information might include a cell phone today
as for your question about 2NF, if you don't have a composite primary key, then as long as you don't have any column containing multiple values (like a comma-delimited list), then you're automatically in 2NF
Thank you for the reply, I shall read through that website now for some advice and help on the subject!
I think this was a bad example, there are a couple more that were given today....
Could you please help me identify the "Partial Dependencies"...this is what I cant really seem to do, I now kind of understand what to do, it's just identifying the partial dependencies that i cant do...can someone please talk me through identifying them in this example:
a, b, c, d, e, f, g, h
a -> b
a -> c
d -> e
a -> f
d -> f
f -> g
e -> h
Which ones are partially dependent and why??
How would you organize this into 2nd Normal Form??
Wow in all seriousness I have spent quite a while tryin to get in terms with all of this, and after reading that simple website, I think I am starting to understand it....well when someone replies to my thread if i am right or not it would be a great help to see if i have understood it....
The only thing for me now is....
What on earth do you do for an example like this!?!?
a, b, c
a -> c
b -> c
c -> a
c -> b
Do you simply do:
This is a confusing one, if I have got the first one right, then I think this is the last obstacle to understand! Im looking forward to a reply to help to give myself peace of mind