Re: [OJB-developers] Vendor neutral DDL scripting Tool
Brought to you by:
thma
From: Martin P. <mpo...@ma...> - 2002-05-08 09:08:19
|
Joa...@tp... wrote: >Hy, > >you all probably know about the problem with different SQL dialects for >different Databases. The Query part is actually quite ok, but DDLs just >won't work on more than one Database, when any advanced feature is used >(and sometimes "advanced features" are things like text that is longer >than 255 characters). Most of this differences are just different names >for a data type (example from db-setup.sql: LONGVARBINARY, BLOB, >BLOB(32k), LONGBLOB, IMAGE). What I think would be great is a tool that >takes ANSI SQL DDL and executes it on different database, after modifing >the data types to fit the DB vendors idea of the name. While converting it >could output warnings about changed behaviour (for example MySQL not >handling spaces at the end of CLOBs correctly). I think writing such a >tool once is less work than modfing db-setup.sql for each change and it >would be easier to maintain ("Super-DB v36 does support the new >HYPER_GROOVY_BLOB instead of the old PLAIN_BLOB"). Additionally it would >be a great for us, as our product should run on quite some different >databases ;-) > in the near future we will use the database creator from torque. http://jakarta.apache.org/turbine/torque so you'll have to write a db-schema.xml and torque will create the db and the repository.xml for you :-) i'm working on a demo ... will be available shortly btw. the ScriptTool which is currently used is under the Enhydra license (i'm not sure if it is compatible to the Apache license, so the replacement should happen before the movement to apache) > >I would be willing to write such a tool, but I almost can't believe that >there is no such thing out there ('though I didn't find it). Does anybody >know if there are simillar tools somewhere? And if not does anyone know if >there is a nice overview about the DDL of some databases? Especially the >ANSI SQL Datatypes? > that would be nice!! if you find a page with this info, please send the link!! martin |