If I have a web application which I want to sell, but leave the choice of back end database to the user, restricting the selection to mySQL, MS SQL or Oracle, can hibernate be used to reference all three platforms (assuming they have the same table/field and as far as possible data types defined). I don't want to have 3 versions of the application. I would like to deploy it in such a manner that the user can pick the database backend during the configuration phase.
I have a home brew solution that does this now so I am aware of the subtle differences in SQL data types and SQL syntax between the 3 database platforms ?
I'm sure someone must have done this so are there any pointers or suggestions on the best approach ?
You will have to have some way of remembering their selections (other than storing it in a database) so that you can configure it on start-up. The only difference from one to the next is probably going to be the Dialect, make sure you use a generation strategy that is compatible with all types (like Table).