Re: Mapping one to many

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Mapping one to many
Дата
Msg-id 402462.32723.qm@web31803.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: Mapping one to many  (Nabil <Nabil@kramer-smilko.com>)
Ответы Re: Mapping one to many  (Nabil <Nabil@kramer-smilko.com>)
Список pgsql-novice
--- Nabil <Nabil@kramer-smilko.com> wrote:

> Ahh but groups dont know about there members. It it was implemented
> the way that it has been suggested to me (a table for each users,
> groups and mapping user to groups) you would end up with a many to
> many relationship. The way I wanted to do it was just map user to
> groups without mapping groups to users. In other words map one user
> to many groups, the groups know nothing about the users.

What will you do when you have that you have to add more groups and delete other groups?  Are you
going to redefine the dimementions of your array and the assignment of your array indexes as
records are added and deleted to your groups table?

A "many to many" table is really a relationship between two or more entity tables.  The groups
table would know nothing about members and members would know nothing about groups.  They way to
determine the relationship between members and groups is to query across the relationship table.

This is a time test any univerally accepted model for (Relational) database systems.

Regards,
Richard Broersma Jr.

В списке pgsql-novice по дате отправления:

Предыдущее
От: Nabil
Дата:
Сообщение: Re: Mapping one to many
Следующее
От: Nabil
Дата:
Сообщение: Re: Mapping one to many