Search Postgresql Archives

Re: modelling question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux