New answers tagged java
Use JPA and make sure you avoid any DB secific SQL wherever possible. This does not provide 100% compatibility accross all DB types, but gets you close. Depending on your needs you are left with some lines of DB specific code. After all you have to do integration testing against all supported DBs to make sure your application really works.
Top 50 recent answers are included