Re: [Dbix-class] Representing directory structures

2013-04-08 Thread Len Jaffe
On Sun, Apr 7, 2013 at 6:19 PM, Bill Moseley mose...@hank.org wrote: On Sun, Apr 7, 2013 at 12:40 PM, Len Jaffe lenja...@jaffesystems.comwrote: In my opinion, the best way to model a tree in an RDBMS is to use Materialized Path. I found the amount of work involved in each insert/delete of

Re: [Dbix-class] Representing directory structures

2013-04-08 Thread Dave Howorth
Bill Moseley wrote: Anyone using DBIC to represent hierarchal directory (folder) structures? Essentially just like a file system, except users each have their own root. To add to the complexity, I need to be able to share folders and all child elements to other users. Just a thought, and

Re: [Dbix-class] Representing directory structures

2013-04-08 Thread Peter Rabbitson
On Mon, Apr 08, 2013 at 02:43:12AM -0400, Len Jaffe wrote: On Sun, Apr 7, 2013 at 6:19 PM, Bill Moseley mose...@hank.org wrote: On Sun, Apr 7, 2013 at 12:40 PM, Len Jaffe lenja...@jaffesystems.comwrote: In my opinion, the best way to model a tree in an RDBMS is to use Materialized

Re: [Dbix-class] Representing directory structures

2013-04-08 Thread Bill Moseley
On Mon, Apr 8, 2013 at 1:30 AM, Dave Howorth dhowo...@mrc-lmb.cam.ac.ukwrote: Bill Moseley wrote: Anyone using DBIC to represent hierarchal directory (folder) structures? Essentially just like a file system, except users each have their own root. To add to the complexity, I need to be

Re: [Dbix-class] Representing directory structures

2013-04-07 Thread Peter Rabbitson
On Sun, Apr 07, 2013 at 11:42:01AM -0700, Bill Moseley wrote: Postgresql has WITH RECURSIVE which DBIC has no support for (other than virtual views): I do not have a coherent opinion/advice on your actual question, however some pointers on the above statement. Perhaps you can cleanup the

Re: [Dbix-class] Representing directory structures

2013-04-07 Thread Len Jaffe
In my opinion, the best way to model a tree in an RDBMS is to use Materialized Path. I found the amount of work involved in each insert/delete of a nested set to be too great, and adjacency lists (parent pointer) fails to allow for retrieving all of a tree or subtree with one round-trip to the

Re: [Dbix-class] Representing directory structures

2013-04-07 Thread Bill Moseley
On Sun, Apr 7, 2013 at 12:40 PM, Len Jaffe lenja...@jaffesystems.comwrote: In my opinion, the best way to model a tree in an RDBMS is to use Materialized Path. I found the amount of work involved in each insert/delete of a nested set to be too great, and adjacency lists (parent pointer)

Re: [Dbix-class] Representing directory structures

2013-04-07 Thread Ben Tilly
http://www.ibase.ru/devinfo/DBMSTrees/sqltrees.html is a good read for anyone who wants to construct hierarchical data structures. It would need some modification to handle shared folders. On Sun, Apr 7, 2013 at 11:42 AM, Bill Moseley mose...@hank.org wrote: Anyone using DBIC to represent