Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 94723 invoked from network); 8 May 2006 19:10:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 May 2006 19:10:01 -0000 Received: (qmail 86183 invoked by uid 500); 8 May 2006 19:09:59 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 86163 invoked by uid 500); 8 May 2006 19:09:58 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 86152 invoked by uid 99); 8 May 2006 19:09:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 May 2006 12:09:58 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jeffgbutler@gmail.com designates 66.249.82.198 as permitted sender) Received: from [66.249.82.198] (HELO wx-out-0102.google.com) (66.249.82.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 May 2006 12:09:57 -0700 Received: by wx-out-0102.google.com with SMTP id s17so947439wxc for ; Mon, 08 May 2006 12:09:36 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=l+X1WHvqPabY2bB/k3f/TU/ZH38Uu+KlLu3k1uHA0r25YpkXbvgCCe5P1n90qx9b/iF9FMRRCPw2KqvISJn+XfZRN5Xfl8QOb7iPXKS8F9in43vHEHND8ddP+kyOmD1/xcNAiHF+NGH0qZqLVkXyHukkwUm5bkZgxie+hZW7WwA= Received: by 10.70.109.11 with SMTP id h11mr2767419wxc; Mon, 08 May 2006 12:09:36 -0700 (PDT) Received: by 10.70.69.17 with HTTP; Mon, 8 May 2006 12:09:36 -0700 (PDT) Message-ID: Date: Mon, 8 May 2006 14:09:36 -0500 From: "Jeff Butler" To: user-java@ibatis.apache.org Subject: Re: some ways for storing the states, transitions and any hierarchical structure In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11778_33370144.1147115376707" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_11778_33370144.1147115376707 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I think maybe you're a little confused about the function if iBATIS. iBATI= S does not directly store objects in database tables, rather it is used to ma= p 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 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 an= d > 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 sta= te > to an ending state the application pass several internal states and I nee= d > 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 storin= g > objects directly is a perfect approach. In fact I think ORM is a pretty c= ool > 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/ > > > ------=_Part_11778_33370144.1147115376707 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
I think maybe you're a little confused about the function if iBATIS.&n= bsp; iBATIS does not directly store objects in database tables, rather it i= s used to map attributes of classes to relational columns.  So typical= ly 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, N= estor Urquiza <nestor.ur= quiza@gmail.com> wrote:
I have to decide for my project if it is wort= h 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 dep= ending on given states it executes some code and move the client to a new s= tate (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.=20

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

The real problem arrives when Reporting guys want to query the mysq= l 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 usi= ng an UDF (User Defined Function).=20

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

Thanks a lot!,
Nestor Urquiza

[1] http://jakarta.apache.org/commons/scxml/

 

------=_Part_11778_33370144.1147115376707--