Re: check constraint on multiple tables?

Поиск
Список
Период
Сортировка
От Little, Douglas
Тема Re: check constraint on multiple tables?
Дата
Msg-id A434C531E37AD442815608A769550D805941EBA985@EGEXCMB01.oww.root.lcl
обсуждение исходный текст
Ответ на Re: check constraint on multiple tables?  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
Ответы Re: check constraint on multiple tables?  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
Список pgsql-sql
Hey Louis,

Ship rooms are just like Hotel rooms.  There are lots of ways to describe. But there needs to be some consistency
betweenthe classifiers for them to have any meaning.  

A junior suite should mean the same thing regardless of the ship it's on.

Doug




-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Louis-David Mitterrand
Sent: Wednesday, March 03, 2010 10:07 AM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] check constraint on multiple tables?

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.

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


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

Предыдущее
От: Louis-David Mitterrand
Дата:
Сообщение: Re: check constraint on multiple tables?
Следующее
От: Louis-David Mitterrand
Дата:
Сообщение: Re: check constraint on multiple tables?