View Single Post
Old 12-01-2007, 03:28 PM   #4 (permalink)
Karl
The Reckoner
Advanced Programmer Top Contributor 
 
Karl's Avatar
 
Join Date: Sep 2007
Posts: 437
Thanks: 22
Karl is on a distinguished road
Default

Dr John, I think the join table was omitted in an effort to make the information easier to read and understand. I also don't see how you can say the example is wrong, maybe a little basic, but I wouldn't say it's wrong.

Storing the genre_id in the movies table and then moving the genres to their own table is normalisation, storing the genre name in the same table as the movie is not. If you were to do that, you'd be potentially repeating data time and time again.

As your quire rightly mentioned storing the id isn't much use to the user, i.e. "genre - 7" doesn't make much sense to me or you, but as you already stated, the user wouldn't see that and in all honesty, thats got nothing to do with normalisation and is therefore irrelevant to this topic.

"Normalisation should be done based on functional dependancies to remove redundant repetative data and multi-valued data"

So how is the genre name not repetitive data? If I were to add Matrix 1-3, I would have

Matrix - Action
Matrix 2 - Action
Matrix 3 - Action

Giving me 3 pieces of repeated data.
__________________
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
Karl is offline  
Reply With Quote