Hi, I 've seen Lance's ways of implementing hierarchical data on a flat
table... and I think it could be improved adding two index columns as it
says here:
http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/

there you could easily query for example to a complete branch of the tree
or a branch from a certain point at any level of the tree...

this solution is great for querying but it's more expensive for updating as
you 've to update those keys/index columns...

sorry if someone has already mentioned it and that maybe it's quite
off-topic... just thought it was useful information on hierarchy data in
relational databases.

cheers!

Nicolás.-


On Fri, Feb 17, 2012 at 11:13 AM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Fri, 17 Feb 2012 12:07:52 -0200, George Christman <
> gchrist...@cardaddy.com> wrote:
>
>  So what is the final query recommendation? Are we sticking with HQL, or
>> are we converting it to use the Criteria API?
>>
>
> In this case, the structure of the query is static, just the number of
> parameters in the "in" clause is dynamic, so I'd use HQL and
> setParameterList().
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org>
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to