On Jan 2, 2012, at 5:25 PM, Jay A. Kreibich wrote:

>  Oracle has some syntax short-cuts to deal with this, but they're 
> non-standard.

Recursive 'with' clause anyone?

"goodbye Connect By or: the end of hierarchical querying as we know it"
http://technology.amis.nl/blog/6104/oracle-rdbms-11gr2-goodbye-connect-by-or-the-end-of-hierarchical-querying-as-we-know-it

http://docs.oracle.com/cd/E11882_01/server.112/e10592/statements_10002.htm#i2077142


Regarding hierarchical data, in addition to Joe Celkos nice book, here are a 
couple of links summarizing different structures:

Models for hierarchical data
http://www.slideshare.net/billkarwin/models-for-hierarchical-data

What are the Options for Storing Hierarchical Data in a Relational Database?
http://stackoverflow.com/questions/4048151/what-are-the-options-for-storing-hierarchical-data-in-a-relational-database

Aside from the materialized path approach, I personally like so-called "closure 
tables":

http://dirtsimple.org/2010/11/simplest-way-to-do-tree-based-queries.html

And  if you feel ambitious, matrix encoding might be for you:

http://vadimtropashko.files.wordpress.com/2011/07/ch5.pdf

As always, YMMV as to which one of these structures work best for a given 
scenario.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to