Best approach to maintain a single set of DDLs and DMLs for multiple database type In our application, we support multiple types of databases namely Oracle, IBM DB2 (both UDB and ZOS), postgresql and So on. Currently we are maintaining separate DDLs and DMLs for each of these different databases.

It is difficult to maintain these multiple set of DDLs/DMLs and moreover in future our application might support few more database type.

What will be the best approach if we want to maintain a single set of DDLs/DMLs?
The best way to support multiple database types is to optimize the sql statements for each on of them. Otherwise you will one day end up with huge performance problems on one or the other database types.

Additionally to that it's unfair for your customers to tell them "I support Oracle, DB2, MSSQL, etc.) and not optimizing the SQL for each one of them. Why? Because your customer pays a lot for the database and your application does not use the advantages and features the database provides.