Multiple database support
-
Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.
-
Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.
Colin Angus Mackay has nice series about building DAL that supports multiple databases. Swithing from one database to another is a matter of changing configuration file so you don't need to recompile application. You can find the first part here: What is a DAL? [^]
Giorgi Dalakishvili #region signature My Articles / My Latest Article[^] / My blog[^] #endregion
-
Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.
With most OR mappers this is a change in the configuration file. Yes, yes I know, if you have performance optimizations in your code, then it's not that easy ;)
-^-^-^-^-^-^-^- no risk no funk
-
Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.
Here is an article that shows how you can do it: Provider Design Patterns in NET 2.0[^]
Giorgi Dalakishvili #region signature My Articles / My Latest Article[^] / My blog[^]
-
Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.
heyitsAtul wrote:
Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.
It can be done in several ways. First of all you need to have an abstraction layer. That layer needs to be a generic layer that matches the interface for both databases. Secondarily, I'll recommend that use a factory. Try to take a look at the following link for inspiration Connection pool[^] Hth
-- Jess Nielsen, b.sc. Security Analyst http://jessn.blogspot.com/
-
Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.
heyitsAtul wrote:
Hi, Can anyone suggest how to design application, which support multiple databases (like SQL Server, Oracle) and with minimum change, we can shift database from one to another. Thanks.
It can be done in several ways. First of all you need to have an abstraction layer. That layer needs to be a generic layer that matches the interface for both databases. Secondly, I'll recommend that use a factory. Try to take a look at the following link for inspiration: Connection pool[^] HTH
-- Jess Nielsen, b.sc. Security Analyst http://jessn.blogspot.com/
modified on Monday, November 8, 2010 3:20 AM