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
Normalization Issue
Moderator: General Moderators
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.
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.
-
fractalvibes
- Forum Contributor
- Posts: 335
- Joined: Thu Sep 26, 2002 6:14 pm
- Location: Waco, Texas
normalization
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.
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.