Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Nested Sets vs. Nested Intervals

Re: Nested Sets vs. Nested Intervals

From: Vadim Tropashko <vadimtro_invalid_at_yahoo.com>
Date: 16 Nov 2005 13:38:11 -0800
Message-ID: <1132177091.499884.189950@g14g2000cwa.googlegroups.com>


asdf wrote:
> The array of folders for:
>
> http://dir.example.com/Games/Board_Games/Abstract/Chess/Software/Web_Chess_Viewers/
>
> is:
>
> folders[0] = 'Games'
> folders[1] = 'Board Games'
> folders[2] = 'Abstract'
> folders[3] = 'Chess'
> ...
>
> so the id can be queried very efficiently by first getting the ID for
> the row name = 'Games' AND parent = 0, since the main category's id is
> '0'. It then gets the id for the category called 'Games' and continue
> on with name='Board Games' AND parent equals the id for the row named
> 'Board Games', then continues on until it ends on the last element of
> the array. So this is very efficient.

I have difficulty understanding without the schema. Could you please describe what columns do you store in your table (and if there is more than one table, describe them as well).

> It has to do multiple SELECTs.
> Are multiple SELECTs efficient?

Multiple selects can be efficient if they are not inside loops, or recursion. In word, how many of them your application would typically fire?

> Getting the path does not require multiple JOINs, just multiple
> SELECTs, so the speed is equal to getting the id from the path shown
> above.
>
> So what are the advantages for Nested Intervals?
> What are the differences in terms of speed between Nested Intervals and
> LDAP?
> Is this method more efficient than the speed of LDAP?

LDAP has nothing to do with SQL, or Relational Databases for that matter. Received on Wed Nov 16 2005 - 15:38:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US