You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Anthony BOUQUET <An...@cabinet-logic.com> on 2010/12/06 20:44:04 UTC

Looking for database creation script built from a real database

I guys,

I'm looking for some kind of plugin able to generate Database create script from a real database (based in an integration server)
I looked after dbunit but it seems it only create schema with an already existing file.

I want to achieve this in our test phase:

*         Retrieve real scheme from our integration server (We use MySQL)

*         Use db unit to create schema dtd

*         Create (by hand) some sample datas with the aid of dtd generated file

*         Create an in memory database (HSQL for example)  with the retrieve scheme

*         Test dao classes with some samples data injected by dbunit

Has anyone developed such a plugin ?

Regards,

Anthony BOUQUET

LOGIC
47-49 rue Gutenberg
42100 SAINT-ETIENNE
[cid:image001.jpg@01CB9586.521D7690]





Re: Looking for database creation script built from a real database

Posted by Mark Eggers <md...@gmail.com>.
On Mon, 06 Dec 2010 23:06:35 +0100, Dennis Lundberg wrote:

> On 2010-12-06 20:44, Anthony BOUQUET wrote:
>> I guys,
>> 
>> 
>>  
>> I’m looking for some kind of plugin able to generate Database create
>> script from a real database (based in an integration server)
>> 
>> I looked after dbunit but it seems it only create schema with an
>> already existing file.
> 
> That's how I understand it as well. I've only used a little.
> 
> 
> 
>> I want to achieve this in our test phase:
>> 
>> ·         Retrieve real scheme from our integration server (We use
>> MySQL)
>> 
>> ·         Use db unit to create schema dtd
>> 
>> ·         Create (by hand) some sample datas with the aid of dtd
>> generated file
>> 
>> ·         Create an in memory database (HSQL for example)  with the
>> retrieve scheme
>> 
>> ·         Test dao classes with some samples data injected by dbunit
>> 
>> 
>>  
>> Has anyone developed such a plugin ?
> 
> Not that I have heard of.
> 
> I'm curious though, why do you want to create the schema file from a
> database? It seems backwards to me.
> 
> We use a schema file that is checked into version control to set up our
> database (Apache Derby) for unit testing DAO classes. That same file can
> be used to set up the database on an integration server or a production
> server.
> 
> If you want to capture the schema from a live database you can use the
> excellent Squirrel SQL client.

You might be able to use ddlutils and antrun. Some people have talked 
about this already on this list (for example: http://
maven.40175.n5.nabble.com/Ant-maven-antrun-ddlutils-td127191.html).

Also, there seems to be at least two plugins for ddlutils:

http://talisman.sourceforge.jp/maven-ddlutils-plugin/download.html
http://jira.codehaus.org/browse/MOJO-1121

I don't know what the status of either are.

Link to the ddlutils: http://db.apache.org/ddlutils/

I haven't used these with Maven yet, but I'm working on a project where 
they (at least one of the tools) has potential.

. . . . just my two cents.

/mde/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Looking for database creation script built from a real database

Posted by Ron Wheeler <rw...@artifact-software.com>.
On 06/12/2010 5:46 PM, Laird Nelson wrote:
> On Mon, Dec 6, 2010 at 5:06 PM, Dennis Lundberg<de...@apache.org>  wrote:
>
>> On 2010-12-06 20:44, Anthony BOUQUET wrote:
>>> I’m looking for some kind of plugin able to generate Database create
>>> script from a real database (based in an integration server)
>> Not that I have heard of.
>>
> Have a look at http://www.liquibase.org.
>
> Best,
> Laird
>
I think that the MySQL Workbench will do reverse engineering of a database.

Also DBDesigner from http://www.fabforce.net/

Ron

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Looking for database creation script built from a real database

Posted by Laird Nelson <lj...@gmail.com>.
On Mon, Dec 6, 2010 at 5:06 PM, Dennis Lundberg <de...@apache.org> wrote:

> On 2010-12-06 20:44, Anthony BOUQUET wrote:
> > I’m looking for some kind of plugin able to generate Database create
> > script from a real database (based in an integration server)
>
> Not that I have heard of.
>

Have a look at http://www.liquibase.org.

Best,
Laird

Re: Looking for database creation script built from a real database

Posted by Dennis Lundberg <de...@apache.org>.
On 2010-12-06 20:44, Anthony BOUQUET wrote:
> I guys,
> 
>  
> 
> I’m looking for some kind of plugin able to generate Database create
> script from a real database (based in an integration server)
> 
> I looked after dbunit but it seems it only create schema with an already
> existing file.

That's how I understand it as well. I've only used a little.


> 
> I want to achieve this in our test phase:
> 
> ·         Retrieve real scheme from our integration server (We use MySQL)
> 
> ·         Use db unit to create schema dtd
> 
> ·         Create (by hand) some sample datas with the aid of dtd
> generated file
> 
> ·         Create an in memory database (HSQL for example)  with the
> retrieve scheme
> 
> ·         Test dao classes with some samples data injected by dbunit
> 
>  
> 
> Has anyone developed such a plugin ?

Not that I have heard of.

I'm curious though, why do you want to create the schema file from a
database? It seems backwards to me.

We use a schema file that is checked into version control to set up our
database (Apache Derby) for unit testing DAO classes. That same file can
be used to set up the database on an integration server or a production
server.

If you want to capture the schema from a live database you can use the
excellent Squirrel SQL client.


>  
> 
> Regards,
> 
>  
> 
> Anthony BOUQUET
> 
>  
> 
> LOGIC
> 
> 47-49 rue Gutenberg
> 
> 42100 SAINT-ETIENNE
> 
> Logo LOG.I.C br.jpg
> 
>  
> 
>  
> 
>  
> 
>  
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org