Re: Other tree representations in SQL

From: Alfredo Novoa <alfredo_at_ncs.es>
Date: 4 Dec 2002 12:53:00 -0800
Message-ID: <e4330f45.0212041252.505d024_at_posting.google.com>


"Carl Rosenberger" <carl_at_db4o.com> wrote in message news:<askvnj$pr9$03$1_at_news.t-online.com>...

> I challenge any relational system to provide the same functionality with
> an equally small number of lines of code. I challenge any relational
> system for a performance race on any kind of tree search or tree traversal.

I have counted 131 lines.

This is a solution using Tutorial D:

var Tree = real relation { N Char, P Char } key { N, P };
Tree := relation { tuple { 'A', 'A' }, tuple { 'B', 'A' }, tuple { 'C', 'A' },
                   tuple { 'D', 'B' }, tuple { 'E', 'B' }, tuple { 'F', 'C' },
                   tuple { 'G', 'C' } };
TClose(Tree);

Regards,
  Alfredo Received on Wed Dec 04 2002 - 21:53:00 CET

Original text of this message