• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Nested set from SQL to Java

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there!
In a Java application I am using an SQL table in Nested Set structure for saving a XML tree. The nested set structure is said to be able to rebuild the tree structure very quickly (just one select), which is exactly what I need.
Now, I am trying to get the tree structure out of the database table and put the result in a Java tree. In the web there are excellent examples for that quick select statement, but sorry, the result is not a tree but as a matter of select statements in general the result is ofcourse always a list. Has anyone experiences with getting a Nested Set Tree from an SQL table back in a Java tree? Do I have to rebuild the tree structure in Java on my own or is it possible to get a tree structure directly out of the MySQL datatable using a certain statement (so that the result set is not a list but a tree)?

 
reply
    Bookmark Topic Watch Topic
  • New Topic