On 08/09/2010 19:23, Gunnlaugur Briem wrote:
http://communities.bmc.com/communities/docs/DOC-9902

Thanks for all of the references, but this one in particular.
Materialized paths looks like its the closest to what I'm after.

However, with materialized paths, I'm wondering with a structure like:

/
/a/
/a/b
/a/b/1
/a/b/2
/a/c
/b/
/b/1
/b/2

How to phrases the sql to answer the question:

"Does the current user have access to anything in /a or below"

...particularly where the user is granted access only to /a/b/1, for example.

and here for links to more than you really want to know on the
subject:

http://troels.arvin.dk/db/rdbms/links/#hierarchical

Hah, excellent, thanks :-)

SQLAlchemy support any of these approaches well enough that I don't
think you need to factor SQLAlchemy into your choice of relational
design at all. Check out /examples/nested_sets/ and /examples/
adjacency_list/ (in the SQLAlchemy distribution) for what are probably
the two most common approaches.

Cool, I'd forgotten about them, although the nested sets example doesn't appear to show the delete or modify implementations, which are the tricky bits ;-)

cheers,

Chris

PS: I appreciate that while I need to get any solution working with SQLAlchemy, this is a "generic relational database question"; if anyone can point me at a more correct forum to ask, I'll be happy to do so there :-)

--
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to