Re: Question on Structuring Product Attributes

From: Erwin <e.smout_at_myonline.be>
Date: Fri, 21 Oct 2011 08:11:06 -0700 (PDT)
Message-ID: <aa708c7a-8e97-497c-8230-8986dd46be56_at_f11g2000vbm.googlegroups.com>


On 20 okt, 23:07, Kevin Kirkpatrick <kvnkrkpt..._at_gmail.com> wrote:
> This seemed the most appropriate "jumping in" point.

Well, now that we're on the track of working declarative solutions I can't resist jumping in too ...

VAR VEHICLE RELATION {VIN:... , ...} KEY {VIN};
VAR SED RELATION {VIN:... , ...} KEY {VIN};
VAR SUV RELATION {VIN:... , ...} KEY {VIN};

CONSTRAINT ALL_SEDANS_ARE_VEHICLES ISEMPTY(SED NOT MATCHING VEHICLE); CONSTRAINT ALL_SUVS_ARE_VEHICLES ISEMPTY(SUV NOT MATCHING VEHICLE); CONSTRAINT NO_SEDANS_ARE_ALSO_SUVS ISEMPTY(SED {VIN} INTERSECT SUV {VIN});
CONSTRAINT ALL_VEHICLES_ARE_SUV_OR_SEDAN ISEMPTY(VEHICLE NOT MATCHING (SED {VIN} UNION SUV {VIN})); Even without support for "distributed keys", or whatever one might name the concept, a minute or so of writing and you're done. Received on Fri Oct 21 2011 - 17:11:06 CEST

Original text of this message