Re: Question on Structuring Product Attributes

From: -CELKO- <jcelko212_at_earthlink.net>
Date: Sat, 15 Oct 2011 17:47:09 -0700 (PDT)
Message-ID: <61d9f470-72d4-4ec7-9dff-2d6b8e33566a_at_q9g2000yqm.googlegroups.com>


In this particular case, the way to do this in full, repeat FULL Standard SQL, is with global CHECK() check constraints. Make and model information is in the VIN so a regular expression can check it.

CREATE TABLE SUV
(vin CHAR(17) NOT NULL PRIMARY KEY,

    REFERENCES Vehicles (vin),
 CONSTRAINT vin_in_motor_pool

      CHECK (EXISTS
            (SELECT *
               FROM Vehicles AS V1
              WHERE V1.vin = SUV.vin),
 CONSTRAINT suv_vin
      CHECK (<< regular expression >>),

 ..
 ); Received on Sun Oct 16 2011 - 02:47:09 CEST

Original text of this message