Re: mutually exclusive subtypes

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: mutually exclusive subtypes
Дата
Msg-id 20060413170556.41760.qmail@web31804.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на mutually exclusive subtypes  ("Olinga K. Abbott" <olingaa@yahoo.com>)
Список pgsql-novice
The easiest way might be to use table inheritance.

--- "Olinga K. Abbott" <olingaa@yahoo.com> wrote:

> Let's say I have the following contrived schema:
>
> TRANSPORTATION_MODE
> mode_ID serial
> model_number text
>
> AIRPLANE
> mode_ID int FK
> operational_ceiling nt
>
> AUTOMOBILE
> mode_ID int FK
> cruising range int
>
>
> Of course, being an airplane and being an automobile are mutually exclusive.
> How does one program the mutual exclusivity in PostgreSQL? I've studied using
> check contraints, triggers, and rules, but I'm not finding any obvious way to
> program this.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
>


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

Предыдущее
От: "Daniel T. Staal"
Дата:
Сообщение: Re: mutually exclusive subtypes
Следующее
От: Ennio-Sr
Дата:
Сообщение: Colors/bold chars in a select?