Re: Parts explosion with repeated subtrees

From: David Cressey <david_at_dcressey.com>
Date: Tue, 17 Dec 2002 22:16:27 GMT
Message-ID: <%mNL9.342$0I3.40029_at_petpeeve.ziplink.net>


> Having done that work, this is an Adjacency model and it has the same
> problem my nested set model does. Namely, 'Béarnaise sauce' and
> 'Hollandaise sauce' explosions have to be repeated in EVERY recipe.
> In your model, they will get various level numbers, in mine, they get
> various (lft,rgt) pairs.
>
> What I want is a way for them to appear once in the schema and
> expanded in a VIEW as tehy are used.

Hmmm.... It seems to me that Lisp ran into a similar problem, sometime in the late 1950s.
The way they got around it, IIRC, was to invent "atoms". If there's a difference between "atoms"
and named variables, it eludes me. Maybe it's that with variables, the type goes with the variable, while with atoms the type goes with the value.

Once you have given something a name, you can include it multiple times, by merely naming it
where the expansion would have belonged. Lawyers call this "incorporating by reference".

Maybe a similar thing is what you are looking for. Received on Tue Dec 17 2002 - 23:16:27 CET

Original text of this message