mutually exclusive subtypes

From: "Olinga K(dot) Abbott" <olingaa(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: mutually exclusive subtypes
Date: 2006-04-13 15:08:37
Message-ID: 20060413150837.70279.qmail@web31802.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Daniel T. Staal 2006-04-13 15:23:28 Re: mutually exclusive subtypes
Previous Message Bruce Momjian 2006-04-13 13:13:06 Re: PostgreSQL a slow DB?