File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Nested set from SQL to Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Nested set from SQL to Java" Watch "Nested set from SQL to Java" New topic
Author

Nested set from SQL to Java

Knolf Moervenson
Greenhorn

Joined: Jul 25, 2008
Posts: 12
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)?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Nested set from SQL to Java
 
Similar Threads
Run dynamic sql in stored procedure problem
SetNull in a PreparedStatement
Store Data in Tree Node
procedure return resultset
Out of Memory Exception