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: asdf <xyz91234_at_yahoo.com>
Date: 16 Nov 2005 13:57:33 -0800
Message-ID: <1132178253.760284.88890@g47g2000cwa.googlegroups.com>


I use this method:

CREATE TABLE `web_directory` (

  `id` int(8) unsigned NOT NULL auto_increment,
  `parent` int(8) unsigned NOT NULL default '0',
  `name` varchar(100) NOT NULL default '',
  PRIMARY KEY (`id`),
  KEY `name` (`name`),
  KEY `parent` (`parent`)
);

...

SELECT id
FROM web_directory
WHERE name = 'Web Chess Viewers'
AND parent = (

SELECT id
FROM web_directory
WHERE name = 'Software'
AND parent = (

SELECT id
FROM web_directory
WHERE name = 'Chess'
AND parent = (

SELECT id
FROM web_directory
WHERE name = 'Abstract'
AND parent = (

SELECT id
FROM web_directory
WHERE name = 'Board Games'
AND parent = (

SELECT id
FROM web_directory
WHERE parent =0
AND name = 'Games'
LIMIT 1
)

LIMIT 1
)

LIMIT 1
)

LIMIT 1
)

LIMIT 1
)

LIMIT 1 What are the speed advantages of a web directory built from LDAP be faster than SQL. Received on Wed Nov 16 2005 - 15:57:33 CST

Original text of this message

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