From: Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: check constraint on multiple tables?
Date: Wed, 3 Mar 2010 17:06:59 +0100
Message-ID: <20100303160659.GA22889@apartia.fr> (raw)
In-Reply-To: <A434C531E37AD442815608A769550D805941EBA95F@EGEXCMB01.oww.root.lcl>
References: <20100303150227.GA18661@apartia.fr>
<A434C531E37AD442815608A769550D805941EBA95F@EGEXCMB01.oww.root.lcl>
On Wed, Mar 03, 2010 at 10:03:05AM -0600, Little, Douglas wrote:
> Hello,
>
> I would have designed as ship > cabin (PK of ship_id, Cabin_id)
> And a separate chain of cabin_type > cabin_category > cabin
Ah, now I'm having second thoughts about my schema ;)
> Type, and category are group classifiers and shouldn't be used to
> define the uniqueness of a cabin.
Yes, but some ships have quite unique cabin types and categories.
> Take an example where the cabin category and type are defined globally
> for the entire fleet. Currently you'll have to duplicate the type,
> category defintions for each ship.
Each ship is unique (more or less, a cruise line has several classes of
ships). So are its types and cats so it's not so clear cut.
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: vindex+lists-pgsql-sql@apartia.org
Subject: Re: check constraint on multiple tables?
In-Reply-To: <20100303160659.GA22889@apartia.fr>
* 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