Re: [sqlite] Some questions on hierarchical data (nested set model)

2007-04-09 Thread Dennis Cote
Jef Driesen wrote: I want to store a tree in an sqlite database. My first choice was the adjacency list model: CREATE TABLE tree ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, parent_id INTEGER ); But this method requires multiple queries to display the entire tree (or a

[sqlite] Some questions on hierarchical data (nested set model)

2007-04-06 Thread Jef Driesen
I want to store a tree in an sqlite database. My first choice was the adjacency list model: CREATE TABLE tree ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, parent_id INTEGER ); But this method requires multiple queries to display the entire tree (or a subtree) in my GUI (a gtk+

Re: [sqlite] Some questions on hierarchical data (nested set model)

2007-04-06 Thread P Kishor
I am very interested in hearing on this as well. A recommendation has been Joe Celko's book Trees and Hierarchies in SQL for Smarties (http://www.amazon.com/Hierarchies-Smarties-Kaufmann-Management-Systems/dp/1558609202/ref=pd_bbs_sr_2/104-3568363-5991906?ie=UTF8s=booksqid=1175894465sr=8-2. I