You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Paolo Salvan <pa...@omitech.it> on 2004/06/03 16:45:30 UTC

OJB, MySql.... how do I create the data structures?

Hi!

Ok, third mail...

I've heard that reverse-db can be the wroing road....

What do you suggest to create the various java, xml and sql db?

Is it more confortable using torque, druid or what? Starting from the .java 
class, some xml file or the sql DB? And how to generate all the remaining files?

Thanks and bye!

Paolo



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: OJB, MySql.... how do I create the data structures?

Posted by "Robert r. Sanders" <ro...@ipov.net>.
I have been using the OJB XDoclet module with good results.  Just put 
some tags in the java files and you get XML mappings, etc... 

Paolo Salvan wrote:

>Hi!
>
>Ok, third mail...
>
>I've heard that reverse-db can be the wroing road....
>
>What do you suggest to create the various java, xml and sql db?
>
>Is it more confortable using torque, druid or what? Starting from the .java 
>class, some xml file or the sql DB? And how to generate all the remaining files?
>
>Thanks and bye!
>
>Paolo
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-user-help@db.apache.org
>
>  
>

-- 
    Robert r. Sanders
    Chief Technologist
    iPOV
    www.ipov.net


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: OJB, MySql.... how do I create the data structures?

Posted by gf...@fys.com.ar.
Give Axgen (http://axgen.sourceforge.net/) a chance.
>From XMI (UML) to java, xml and ddl.

Regards,
Gustavo.


news <ne...@sea.gmane.org> wrote on 03/06/2004 11:45:30 a.m.:

> Hi!
> 
> Ok, third mail...
> 
> I've heard that reverse-db can be the wroing road....
> 
> What do you suggest to create the various java, xml and sql db?
> 
> Is it more confortable using torque, druid or what? Starting from the 
.java 
> class, some xml file or the sql DB? And how to generate all the 
> remaining files?
> 
> Thanks and bye!
> 
> Paolo
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: OJB, MySql.... how do I create the data structures?

Posted by Thomas Dudziak <to...@first.gmd.de>.
On Thu, 3 Jun 2004, Paolo Salvan wrote:

> Hi!
> 
> Ok, third mail...
> 
> I've heard that reverse-db can be the wroing road....
> 
> What do you suggest to create the various java, xml and sql db?
> 
> Is it more confortable using torque, druid or what? Starting from the .java 
> class, some xml file or the sql DB? And how to generate all the remaining files?

This depends on the direction that you'll want to go.

If you have Java classes, and want to create database tables for them,
then the probably easiest way is to use the XDoclet module for
generating the repository descriptor and table schemas, then Torque to
create the tables in the database.

If you have a existing database and want to create Java classes for them,
then you should have a look at Druid (http://druid.sourceforge.net/).

IMO it is generally easier (for a developer) to start with the classes and
generate a matching database structure. This may give you suboptimal
database structures (no normalization) but is easier to maintain. If
however you have time- or load-critical aspects and a couple of database
gurus at hand, you may want to start with the database and tweak the OJB
to that (using customizations like your own row-readers).

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


RE: OJB, MySql.... how do I create the data structures?

Posted by Guillaume Nodet <gu...@deliasystems.com>.
As for us, i first used torque to create statically the sql files
for the different databases that the application supports.

I'm planning to use commons-sql (jakarta sandbox) which has the great 
functionnality of altering the database schema to keep it in sync 
with the wanted one. Commons-sql uses an xml that is the same as 
torque so migration is somewhat easy.  Note that i did not tested
it thoroughly.

To generate the needed things, i use a metamodel in an xml form
and with the help of xslt files, i generate the java classes, 
the repository and the database xml file used by torque.

Guillaume

> -----Message d'origine-----
> De : news [mailto:news@sea.gmane.org]De la part de Paolo Salvan
> Envoye : jeudi 3 juin 2004 16:46
> A : ojb-user@db.apache.org
> Objet : OJB, MySql.... how do I create the data structures?
> 
> 
> Hi!
> 
> Ok, third mail...
> 
> I've heard that reverse-db can be the wroing road....
> 
> What do you suggest to create the various java, xml and sql db?
> 
> Is it more confortable using torque, druid or what? Starting from 
> the .java 
> class, some xml file or the sql DB? And how to generate all the 
> remaining files?
> 
> Thanks and bye!
> 
> Paolo
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org