• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

some ways for storing the states, transitions and any hierarchical structure

 
Nestor Urquiza
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to decide for my project if it is worth it to store some of my objects directly in mysql using Hibernate.

The usecase is just a web application accepting HTTP GET/POST requests and depending on given states it executes some code and move the client to a new state (I am using commons-scxml [1] for this). Moving from a starting state to an ending state the application pass several internal states and I need to store the whole history in a table.

I could use mysql 5 UpdateXML() extractValue() UDF functions to store/retrieve the hierarchical data but as an alternative I think storing objects directly is a perfect approach. In fact I think ORM is a pretty cool alternative to native xml storage.

The real problem arrives when Reporting guys want to query the mysql database for the states I have stored using Hibernate. I saw from Hibernate Tools there is a console plugin for eclipse [2] that allows to query the database using HSQL, however I am wondering if anyone knows about a way of using just plain SQL from a mysql client to query data that is stored using Hibernate. I understand this could be done using an UDF (User Defined Function).

Of course iBATIS or JDO could be considered as well but the important thing is to have the feature for people to be able to query directly the Database and get the hierarchical response in xml or even be able to request directly a node using xpath for example. A combination of mysql UDF new functions and a ORM Engine could be also valid of course.

Any thoughts? Whatever idea you might have could help a lot my storage options/decision.

Thanks a lot!,
Nestor Urquiza

[1] http://jakarta.apache.org/commons/scxml/
[2] http://www.hibernate.org/255.html
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

however I am wondering if anyone knows about a way of using just plain SQL from a mysql client to query data that is stored using Hibernate

I'm not sure I follow the issue here - there is nothing to stop you using SQL directly to query the RDBMS. The involvement of Hibernate (or any other ORM) doesn't change that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic