Re: Problem with Nested Sets

From: Neo <neo55592_at_hotmail.com>
Date: 25 Feb 2005 13:17:39 -0800
Message-ID: <1109366259.706232.12180_at_l41g2000cwc.googlegroups.com>


> > The script below models/queries forums with [XDb2]
>
> It is probably interesting but I need to do that with regular DBMS.

The equivalent of the script can be implemented with a regular DBMS however it may require some level of generic modelling which may not be your first choice. In that case, CELKO's solutions are probably the most practical.

The script below models/queries forums with an even more experimental db (XDb3).

// Create forums.
(CREATE dir item *forum)
(CREATE forum inst *root)
(CREATE forum inst *math)
(CREATE forum inst *algebra)
(CREATE forum inst *trig)
(CREATE forum inst *calc)
(CREATE forum inst *science)
(CREATE forum inst *physics)
(CREATE forum inst *newtonian)
(CREATE forum inst *quantum)
(CREATE forum inst *chemistry)
(CREATE forum inst *organic)

// Create verb \ to relate forums.
(CREATE verb inst *\)

// Create forum structure.
(CREATE root \ math \ algebra)
(CREATE root \ math \ trig)
(CREATE root \ math \ calc)
(CREATE root \ science \ physics \ newtonian)
(CREATE root \ science \ physics \ quantum)
(CREATE root \ science \ chemistry \ organic)

// Two methods of finding forum named quantum.
(SELECT forum inst * & * name 'quantum')
(SELECT root \ science \ physics \ quantum)

// Two methods of finding forum named organic.
(SELECT forum inst * & * name 'organic')
(SELECT root \ science \ chemistry \ organic)
Received on Fri Feb 25 2005 - 22:17:39 CET

Original text of this message