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.

My assumption is this would involve a single table where each row can
represent either a directory entry (e.g. a "file") or a sub-directory that
references its parent.

Postgresql has "WITH RECURSIVE" which DBIC has no support for (other than
virtual views):

But, Adjacency Lists and Nested Sets are (were?) often discussed as
solutions for hierarchal data in the database.  I asked on the Pg list back
in 2007:

but, so far, I've happily avoided using these approaches of representing
hierarchal data in the database.

BTW -- I have recently written a "tag"-based system (like the familiar
gmail) which is easy to represent in a highly normalized schema but is a
fundamentally different approach.

Bill Moseley
Searchable Archive:

Reply via email to