normalization question

raffers

access newbie
Local time
Today, 08:59
Joined
Aug 6, 2007
Messages
7
Hi again,
I have a question about normalization of a database.
I'm new to access and just trying to learn the theory while building basic databases to help me learn the basics before I start my class.
I think I understand the basic principles of normalization, in that it's trying to eliminate any duplicate fields across tables, and keeping things organised in the best way, but I see a few examples and things in database guides online which confuse me.
Now I'm reading a few tutorials, and about relationships and stuff. I understand the primary and foreign key stuff, but I see a few examples like the one below of tables.
This pic is used as an example on a website tutorial I have been looking at.
relationships3.gif


Now, correct me if I misunderstand this, but surely having the names repeated in the two tables goes against what normalization achieves.
The picture is taken from an example talking about relationships, but I just want to make sure that I should only have the name of a person in one table only, so if I have a table called students, and a table called finacial for their payments and stuff, that I would only have their names in one table and use the primary and foreign keys to define what student the data is relevant to.
 
You have it correct and the example is poor. It is not necessary to have the name fields repeated and in fact is a violation of normalization rules.
 
ahhh thanks!
 
Unless there is a chance that the person entering data into one of the tables and the person entering data in the other of the tables could (A) do their work separately and (B) are recording, say, the name on the test vs. the registered name of the student. In that specific case, you have what is called a "sanity check" that can be reviewed by a third party.

There are always exceptions to every rule (including this one... ;) ) and the example you found COULD be demonstrating one of the exceptions. The only way to know what was intended would be to read the accompanying text that explains the example.

As RG points out, if there is nothing "funny" going on, then you are ABSOLUTELY correct - the relationship makes the name data in Table 1 obsolete or redundant or both.

By the way, that example is bad in another way...

Look carefull in table 1 and you will see ANOTHER normalization no-no. Grade 1 and Grade 2 look suspiciously like REPEATING GROUPS - which violates 1NF (whereas the repetition of the student's name violates 2NF.)

Are you sure that the example you were looking at wasn't a "BEFORE" from a "BEFORE and AFTER" type of case study?
 
We always appreciate your comments and expertise Doc. Thanks.
 
Hi doc man and thanks for the response.

The example I posted was just showing specifically an example of a relationship, very basic stuff. It had previously mentioned normalisation but the article that picture is taken from had nothing to do with that, just basic relationships.
I just wanted to make sure there wasn't something I was missing out on by not repeating fields but it seems the way I've done things is the normalised way :)

Many thanks.
Stu
 
I would take that website off my favorites list and search for a site that shows valid examples.
 
Yeah as the doc man says, there are repeating groups there.

A better way to do that would be to eliminate Table 1 - unless there is other info there now shown. But as it is, you could just have a Student table with an ID, name, etc. A Grades table with an ID which relates to the ID in the student table, with a one-to-many relationship. i.e. one student ID to many grades.
 

Users who are viewing this thread

Back
Top Bottom