On Jul 28, 12:17 pm, David Gardner <dgard...@creatureshop.com> wrote:
> Just thought I would toss in my 2-cents here, since I have lots of
> hierarchical data and have
> at one time or another used most of the below methods.
>
> Choice #1 is the option that I have found that works the best.
> I Use a file path-like primary key (actually I am storing data about
> files), this allows me to easily do
> things like:
> nodes=session.query(Node).filter(Node.path.like('root/path/sub/%')).order_by(Node.path).all()
>
> Choice #3 works well with Choice #1, especially if you are interested in
> a particular node, and know ahead of time
> you also want that node's grandparent.
>
>

I've read up a bit on the suggested links.  Thank you for the leads.


If I am understanding this, it seems that choice #1 is very much like
the materialised path method as mentioned in:

http://sqlamp.angri.ru/  , and
http://www.dbazine.com/oracle/or-articles/tropashko4

I will experiment some and report back.     (My max depth is about 10
levels with under 1000 total nodes.)


Thank you,
:)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@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