Define your database structure and relations once using the ZsqlML (Zenark's SQL Markup Language) XML DTD, and then generate mulitple vendor-specific SQL scripts, thereby solving the issue of SQL script variances across multiple platforms.
spag4j is a code generator written in Java to produce Javacode for accessing a stored procedure layer from a database. Currently it supports stored procedures written in an Oracle. It produces either an EJB3 Java layer or simple static access methods.