Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Let's say I have the following contrived schema:

mode_ID serial
model_number text

mode_ID int FK
operational_ceiling nt

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.


pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group