Adding support for mysql, oracle db, sql server, h2, derby and hsql databases.

Also made changes to suport easily switching db providers.