Hey Larry,

How many children does each node have?  does each node have 2 or some other
constant number or does it vary?

----- Original Message ----- 
From: "Lawrence Lustig" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, July 11, 2004 8:43 AM
Subject: [RBASE-L] - Representing a tree in a table.


> I'm dealing with the issue of trying to represent a
> tree in a table.  In my case, it's nested Expense
> codes for an accounting system.  I've set the table up
> with a self-referencing FK/PK relationship to get the
> parent of any row.
>
> My problem is, what's the easiest and "cheapest" way
> to get the entire parentage of a given child row in
> the table.  I'm willing to limit myself to some
> reasonable level of nesting -- say four ancestors for
> a row.
>
> I could do this in a single query if R:Base allowed
> multiple outer joins in the SELECT syntax, but it
> doesn't.  My tendency would be to write a stored
> procedure to do sequential queries to get the parents,
> but I think this would be pretty expensive in terms of
> time.
>
> I recall a discussion of this issue some time ago.
> Anyone have any suggestions?
> --
> Larry
>
> --- RBASE-L
> ================================================
> TO POST A MESSAGE TO ALL MEMBERS:
> Send a plain text email to [EMAIL PROTECTED]
>
> (Don't use any of these words as your Subject:
> INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
> REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message SUBJECT, put just one word: INTRO
> ================================================
> TO UNSUBSCRIBE:
> Send a plain text email to [EMAIL PROTECTED]
> In the message SUBJECT, put just one word: UNSUBSCRIBE
> ================================================
> TO SEARCH ARCHIVES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message SUBJECT, put just one word: SEARCH-n
> (where n is the number of days). In the message body,
> place any
> text to search for.
> ================================================
>

Reply via email to