I don’t think there is a “generic SQL provider”.
In our store, we need to support both DB2 and SQL Server, so we decided to implement a layer template that creates the Model, Data Access, and Business Logic classes. The data access layer processes the connection to various DBMSs and loads model classes, passing them back to business logic. Business logic and model classes have no idea where the level of access to data receives data.
SQL differences are handled because the data access layer invokes stored procedures in the database. We have stored procedures implemented with the appropriate syntax in both systems. If we need to switch to another database, all we need to do is implement the necessary procedures for the new DBMS, and everything should just work.
Marc tidd
source share