Re: primary key as subtype discriminator

From: -CELKO- <>
Date: Thu, 4 Sep 2008 13:56:09 -0700 (PDT)
Message-ID: <>

>> Here a Vehicle can be just a Sedan even if 2 subtypes are present (two- door and four-door). This violates the "exhaustive" rule. <<

You can add a constraint to assure that only "leaf nodes" have more than one row in their table. The constraint can be a CREATE ASSERTION if your product has it, a trigger (ugh!) or a constraint on a locking column of the form " lock CHAR(1) DEFAULT 'X' NOT NULL UNIQUE CHECK (lock = 'X'), ". The bad news is that the last one is true for an empty table as well as a single row table. Received on Thu Sep 04 2008 - 22:56:09 CEST

Original text of this message