D
Damon Heron
This is sort of a general question- I have a list of members, each member
has a type, and each member has one, and only one skill. So I have a member
table, with ID, Name, TypeID, and SkillID. Then a TypeTable with TypeID and
TypeName. Then a SkillTable with SkillID and SkillName.
Now I want to group the members... with these rules:
1. A member can only belong to one group at a time and all of the members
of the group have the common skill.
2. A member can move from one group to another if it meets the conditions
of common skill.
3. A group can be empty.
4. New Groups can be created, some with the same skill as others
(duplicates).
5. A Group can be deleted.
Now the question: I could design this so the Member table, the type and
skill table are all that would be needed by adding a field to the member
table called GroupID. Then when a new group is created, it is added to the
Member table with ID, Name(GroupName), Type(group), SkillID, and GroupID
which equals the ID. Then members could be added by putting the Group ID in
their field.
Alternatively, I could create a new Group table that would have ID, Name,
SkillID and link it to the Member table by GroupID.
Those are the two choices as I see it. My question is, is there anything in
either that makes it preferable to the other, and would coding, maintenance,
queries be easier or harder with either?
Thanks for reading this far!
has a type, and each member has one, and only one skill. So I have a member
table, with ID, Name, TypeID, and SkillID. Then a TypeTable with TypeID and
TypeName. Then a SkillTable with SkillID and SkillName.
Now I want to group the members... with these rules:
1. A member can only belong to one group at a time and all of the members
of the group have the common skill.
2. A member can move from one group to another if it meets the conditions
of common skill.
3. A group can be empty.
4. New Groups can be created, some with the same skill as others
(duplicates).
5. A Group can be deleted.
Now the question: I could design this so the Member table, the type and
skill table are all that would be needed by adding a field to the member
table called GroupID. Then when a new group is created, it is added to the
Member table with ID, Name(GroupName), Type(group), SkillID, and GroupID
which equals the ID. Then members could be added by putting the Group ID in
their field.
Alternatively, I could create a new Group table that would have ID, Name,
SkillID and link it to the Member table by GroupID.
Those are the two choices as I see it. My question is, is there anything in
either that makes it preferable to the other, and would coding, maintenance,
queries be easier or harder with either?
Thanks for reading this far!