You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Nestor Urquiza <ne...@gmail.com> on 2006/05/08 17:33:41 UTC

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

I have to decide for my project if it is worth it to store some of my
objects directly in mysql using iBATIS.

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 iBATIS. 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 iBATIS. I understand this could be done
using an UDF (User Defined Function).

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/

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

Posted by Nestor Urquiza <ne...@gmail.com>.
Oh that sounds good I will need to take a closer look at iBATIS then.
Thanks a lot!

On 5/8/06, Jeff Butler <je...@gmail.com> wrote:
>
> I think maybe you're a little confused about the function if iBATIS.
> iBATIS does not directly store objects in database tables, rather it is used
> to map attributes of classes to relational columns.  So typically there is a
> table for each class and the columns in the table match the attributes of
> the class.
>
> Once the data is in the table, any SQL client should work.
>
> Jeff Butler
>
>
> On 5/8/06, Nestor Urquiza <ne...@gmail.com> wrote:
> >
> > I have to decide for my project if it is worth it to store some of my
> > objects directly in mysql using iBATIS.
> >
> > 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 iBATIS. 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 iBATIS. I understand this could be done
> > using an UDF (User Defined Function).
> >
> > 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/
> >
> >
> >
>
>

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

Posted by Jeff Butler <je...@gmail.com>.
I think maybe you're a little confused about the function if iBATIS.  iBATIS
does not directly store objects in database tables, rather it is used to map
attributes of classes to relational columns.  So typically there is a table
for each class and the columns in the table match the attributes of the
class.

Once the data is in the table, any SQL client should work.

Jeff Butler


On 5/8/06, Nestor Urquiza <ne...@gmail.com> wrote:
>
> I have to decide for my project if it is worth it to store some of my
> objects directly in mysql using iBATIS.
>
> 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 iBATIS. 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 iBATIS. I understand this could be done
> using an UDF (User Defined Function).
>
> 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/
>
>
>