Re: [sqlite] Managing trees in the database

2006-02-19 Thread Andrew Piskorski
On Sat, Feb 18, 2006 at 05:34:45PM -0800, Jim Dodgen wrote: > I really miss the oracle "connect by" operator. I first used it for a > postal application back in 1992. I am surprised that this feature has > not made it into to the standard or any other RDBMS. Maybe we should Although

Re: [sqlite] Managing trees in the database

2006-02-19 Thread Jim Dodgen
Jim C. Nasby wrote: On Thu, Feb 16, 2006 at 08:23:43PM +0100, Philipp Kn?sel wrote: SanjayK schrieb: Since SQLite is perfect for use in single-user desktop utility applications and since such applications typically store hierarchial data (tree) in a single table, it would be nice to

Re: [sqlite] Managing trees in the database

2006-02-18 Thread Jim C. Nasby
On Thu, Feb 16, 2006 at 08:23:43PM +0100, Philipp Kn?sel wrote: > SanjayK schrieb: > >Since SQLite is perfect for use in single-user desktop utility applications > >and since such applications typically store hierarchial data (tree) in a > >single table, it would be nice to have support for

Re: [sqlite] Managing trees in the database

2006-02-17 Thread SanjayK
Dennis, I understand what you are saying. My problem is specific to only the sorting. Given the tree: P1 C1 GC1 C2 GC2 GC3 C3 P2 C4 C5 GC4 C6 P3 This structure is perfect for my use. In fact, this is the way I want it. The

Re: [sqlite] Managing trees in the database

2006-02-17 Thread Dennis Cote
SanjayK wrote: This path is a nice idea to keep it simple for what I want to do. But I have a question: Suppose the database is like this: id, parentid, data 1, 0, parent 2, 1, son B 3, 1, son A 4, 1, daughter A 5, 1, daughter B 6, 2, grandchild B 7, 2, grandchild A Using the path

Re: [sqlite] Managing trees in the database

2006-02-17 Thread Andrew Piskorski
On Thu, Feb 16, 2006 at 09:22:13PM -0800, SanjayK wrote: > > Fascinating! I got another reply too by email pointing to the book by Joe > Celko. Also try searching the SQLite archives, e.g.: http://www.mail-archive.com/sqlite-users@sqlite.org/msg05235.html There are probably many other

Re: [sqlite] Managing trees in the database

2006-02-16 Thread SanjayK
I think I gave a wrong example. This simple tree will probably sort ok with "order by path, data." But if I introduce more children with subchildren, say, at level 1, the problem of clubbing will be apparent. -- View this message in context:

Re: [sqlite] Managing trees in the database

2006-02-16 Thread SanjayK
This path is a nice idea to keep it simple for what I want to do. But I have a question: Suppose the database is like this: id, parentid, data 1, 0, parent 2, 1, son B 3, 1, son A 4, 1, daughter A 5, 1, daughter B 6, 2, grandchild B 7, 2, grandchild A Using the path approach, how can I sort

Re: [sqlite] Managing trees in the database

2006-02-16 Thread SanjayK
Fascinating! I got another reply too by email pointing to the book by Joe Celko. Thanks, Sanjay -- View this message in context: http://www.nabble.com/Managing-trees-in-the-database-t113.html#a2983825 Sent from the SQLite forum at Nabble.com.

Re: [sqlite] Managing trees in the database

2006-02-16 Thread Dennis Cote
Philipp Knüsel wrote: SanjayK schrieb: Since SQLite is perfect for use in single-user desktop utility applications and since such applications typically store hierarchial data (tree) in a single table, it would be nice to have support for special features like connect by of oracle. See:

Re: [sqlite] Managing trees in the database

2006-02-16 Thread Philipp Knüsel
SanjayK schrieb: Since SQLite is perfect for use in single-user desktop utility applications and since such applications typically store hierarchial data (tree) in a single table, it would be nice to have support for special features like connect by of oracle. See:

[sqlite] Managing trees in the database

2006-02-16 Thread SanjayK
Since SQLite is perfect for use in single-user desktop utility applications and since such applications typically store hierarchial data (tree) in a single table, it would be nice to have support for special features like connect by of oracle. See: