Problem with relations....

  • Thread starter Thread starter Viktor via AccessMonster.com
  • Start date Start date
V

Viktor via AccessMonster.com

Hi all,

I have the following situation:

People
----------
People_id
PeopleName
PeopleLast
......

and
Group
-------------
Group_id
GroupName
.......

Every person can be a member of only one group. However, the number of people
on one group is not known. One group may be empty, while other group may have
many members. Do I need third table between this two tables to store the
neccessary information, or do I do something else?

Thanks,
Viktor Kralevski
 
If each person can only be a member of a single group, then adding Group_id
to the People table as a foreign key is all you need to do.

If, however, there's ever going to be a possibility of one person being in
more than one group, or if you need to know that Person A belonged to Group
1 for the first 6 months of the year, but now belongs to Group 2, then you
will want a 3rd intermediary table to resolve the many-to-many between
People and Group.
 
Back
Top