Re: check constraint on multiple tables?

Поиск
Список
Период
Сортировка
От Richard Broersma
Тема Re: check constraint on multiple tables?
Дата
Msg-id 396486431003030757q115b977lde82c4bf443f4b0d@mail.gmail.com
обсуждение исходный текст
Ответ на Re: check constraint on multiple tables?  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
Список pgsql-sql
On Wed, Mar 3, 2010 at 7:38 AM, Louis-David Mitterrand
<vindex+lists-pgsql-sql@apartia.org> wrote:

> Each ship is different and has specific cabin types and categories. Of
> course there is some overlap between ships but I thought it simpler (or
> more elegant) to use that hierarchy. Maybe my schema is wrong?

I'm probably ignorant about ships, but are ships like air planes in
that all ships belong to a similar class/construction?   i.e. all
Bowing 747 are essentially configured that same.  Can you define ship
classes that each ship belongs?   You describe cabin_category as if it
is actually an area of this ship,  would all ships of a class have
nearly identical ship_areas/cabin_categories?

> I could add an id_ship to 'cabin' but that would make two (potentialy
> conflicting) relations to 'ship'.

It true that more refinement is necessary.  As you've mentioned that
this hierarchy will have overlap, this is an indication of a violation
of the second normal form (I believe).



-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug


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

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