简体   繁体   中英

Database servers for development purposes

I'm looking for a multiple database server environment, for switching between different server types and versions.

I have a .Net app which must handle multiple database servers, defined by their connection strings, but I don't want to handle all server installations/configurations by myself.

I'm thinking of something like the standard Northwind database, but hosted on different servers like MySql, Oracle, Sql Server 2005, Sql Server 2008 and so on...

In order to handle all connections locally, I was thinking about having some sort of proxy client, which takes a connectionString and providername and executes the query through a specified communication protocol.

Does anyone have any ideas if such services exist? (free and/or commercial)

Thanks

In order to handle all connections locally, I was thinking about having some sort of proxy client, which takes a connectionString and providername and executes the query through a specified communication protocol.

For this at least, ADO allows you to make connections in a fairly generic fashion. Your mileage may vary though, as the different databases all speak different dialects of SQL.

You might be better with an SQL DSL that dynamically builds SQL for all your platforms.

Factory Model Overview (ADO.NET)

ADO.NET 2.0 also introduced abstract base classes, which enable a developer to write generic data access code that does not depend on a specific data provider.

...

The programming model for writing provider-independent code is based on the use of the "factory" design pattern, which uses a single API to access databases across multiple providers. This pattern is aptly named, as it calls for the use of a specialized object solely to create other objects, much like a real-world factory.

DbProviderFactories.GetFactoryClasses understands:

  • System.Data.Odbc
  • System.Data.OleDb
  • System.Data.OracleClient
  • System.Data.SqlClient
  • System.Data.SqlServerCe.3.5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM