Page 1 of 1

Normalization Issue

Posted: Sat Jan 11, 2003 2:17 pm
by rfigley
I'm reorganizing a MySQL databse and need to check something. I have rows in a table that have some duplicate field data like gender (male, female) and occupation. The rows (example below) will be retrieved and displayed according to the Grp ID. Would it be necessary to separate these out to eliminate dupication (male, female, occupation) data with that guideline?

Person Name | Gender | Occupation | Car Model | Age | Grp ID


Thanks

Posted: Sat Jan 11, 2003 3:54 pm
by rfigley
A Followup here:


Duplicates are with the Gender field (several of each in the table so those duplicate of course) the occupation and the Grp ID. For some stupid reason I was thinking each name had a unique Grp ID, but of course that is not the case as it is a list of people separated by groups. Fortunatley I have a field not mentioned here that is unique number for each person called "respondent" so I guess that field should be joined with a table to link the groups.

normalization

Posted: Sat Jan 11, 2003 6:06 pm
by fractalvibes
Difficult to say without seeing the structure of the other tables and how they relate, but given that you have 1 table:

Person_ID|Person Name | Gender | Occupation | Car Model | Age | Grp ID

You could have also:

group table
grp_Id | group name | other info special to this group

mbr_group_xref

person_id | group_Id

CarModelDomain
modelID | Model Description

if needed OccupationDOmain

occ_ID | OccupationDescription

so you can change that first table to:
Person_ID|Person Name | Gender | Occ_ID| ModelID | Age | GrpID


Hope this gives you an idea,

Phil J.