From: Andreas <maps.on@gmx.net>
To: Jean-Luc Lachance <jllachan@sympatico.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Multitable uniqueness ?
Date: Thu, 27 May 2004 09:07:38 +0200
Message-ID: <40B593BA.6090502@gmx.net> (raw)
In-Reply-To: <40B4A2FD.8030004@sympatico.ca>
References: <40B40B4A.4050908@gmx.net>
<40B4A2FD.8030004@sympatico.ca>
Jean-Luc Lachance schrieb:
> Do you really need MANY-TO-MANY between customers and projects?
> I can see customers owning many projects, but do you really have
> projects belonging to many customers?
In this case yes.
projects (
1, 'x-fair 2003';
2, 'y-fair 2003';
3, 'x-fair 2004')
customer (
1, 'X ltd';
2, 'Y';
3, 'Z')
maybe all 3 have a stall on project 1.
c1 and c2 attend project 2 where c2 has 2 stalls one inside and one
outside the hall.
I have the cust_project relation to tie other objects like proposals and
letters to something small and common for all the communication to a
customer.
> If not, fold cust_proj into projects.
> Otherwise, UNIQUE (cp_id, stall_no) on stalls should be enough.
cp_id implies uniquness of (customer, project) couples.
So with UNIQUE (cp_id, stall_no) we get
--> UNIQUE (c_id, p_id, stall_no)
This'd be too much. Stall_no is the number of the cubicles the customers
rent.
It needs to be unique within on project so that we can relate on a
specific spot on the area to send visitors when they ask us and we print
those numbers in the flyer.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: maps.on@gmx.net, jllachan@sympatico.ca
Subject: Re: Multitable uniqueness ?
In-Reply-To: <40B593BA.6090502@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox