Re: modelling question

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: modelling question
Дата
Msg-id 1261269415.5364.75.camel@jdavis
обсуждение исходный текст
Ответ на modelling question  (Garry Saddington <garry@schoolteachers.co.uk>)
Список pgsql-general
On Sat, 2009-12-19 at 20:36 +0000, Garry Saddington wrote:
> Anyone have any ideas/suggestions on how to model siblings in a database
> so that it is possible to eg. only send letters to the parents once. In
> this scenario each sibling has the contact parents input separately
> (secretarial input!).

It's best to always iron out a specific organizational policy before
trying to model it as a database. Think carefully about a policy that
works with paper, and often that makes the database model obvious.

If there are already governmental policies regarding the notices, they
probably already tell you exactly when you can eliminate duplicate
notices.

How will you tell that the parents are the same? By name and address?
Just address? Siblings? What about half-siblings and other complicating
situations?

The query you want to use is pretty simple, and might go something like:
  SELECT DISTINCT address FROM student WHERE ...

But it all depends on what the policy actually is. And if the notice is
something simple, such as announcing a fund-raiser, then you should keep
it simple and just send one to each distinct address in the database.

Regards,
    Jeff Davis



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

Предыдущее
От: Christophe Pettus
Дата:
Сообщение: Re: How to use read uncommitted transaction level and set update order
Следующее
От: "Gauthier, Dave"
Дата:
Сообщение: Re: defining yuor own commands in PG ?