Last post Aug 11, 2011 08:59 PM by rajdeep.in
Aug 11, 2011 08:25 PM|elferone|LINK
I have been asked to develop an ASP.NET application that must support multiple database type (SQL Server, Oracle, MySQL, Access etc...). The thing is that all these database type does not speak all the same language so I'm wondering wich kind of approach
should I take building and N-tier application...
Anyone can give some insight about this?
Aug 11, 2011 08:59 PM|rajdeep.in|LINK
Easiest way to achieve this is to use the first Picture and use
Enterprise Library Data Access Application Block (DAAB). This can support multiple DB type for your DAL. It can support SQL Server Oracle primarily.
Also it can support MySQL but you have to rebuild it. But Ms Access I am not sure. Probaly you have to
extend the DAAB.
If you do not use DAAB you can definitely use your second picture. Create different layers for different database type. But I guess you already planned to create a common interface layer (IDatabaseLayer) and the different database layers shall implement
it. I suggest to use factory pattern and .NET reflection to achieve this.
Hope this helps.