Re: check constraint on multiple tables?

Поиск
Список
Период
Сортировка
От Louis-David Mitterrand
Тема Re: check constraint on multiple tables?
Дата
Msg-id 20100303160659.GA22889@apartia.fr
обсуждение исходный текст
Ответ на Re: check constraint on multiple tables?  ("Little, Douglas" <DOUGLAS.LITTLE@orbitz.com>)
Ответы Re: check constraint on multiple tables?  ("Little, Douglas" <DOUGLAS.LITTLE@orbitz.com>)
Список pgsql-sql
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.


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

Предыдущее
От: "Oliveiros"
Дата:
Сообщение: Re: check constraint on multiple tables?
Следующее
От: "Little, Douglas"
Дата:
Сообщение: Re: check constraint on multiple tables?