Imagine there is a Java database application utilizing a JDBC Connection to connect to following databases:
- H2 Embedded
- H2 Server
- MS SQL Server.
and more to come.
When it comes to database schema creation we have unique scripts in place. One for each database. Since we have to support more databases in time,
the SQL DDL script must be rewritten for each no database.
It's mandataory to have following features implemented:
- Create table
- drop table
- alter table
- referential integrity - foreign key constraints (on delete cascade, on update cascade)
- create indices
- drop indices
My research brought some approaches to light which may do the job:
- ddlutils: seems to be buggy and under low development
- liquibase. supports all mandatory features
- hibernate. might do it at well: [url removed, login to view]
Due to performance reasons and current design we can't switch to an O/R Mapper like JPA2 / Hibernate. But what I need is to have
the DB Schema properly created for most of the common databases.
For you as freelancers I want you to tell me the most convenient solution for my problem. I.e. which approach to take.