tags:

views:

115

answers:

3

When creating an app with Multi-database support,what are the advantages and disadvantages of using Enterprise Library vs using a generic object of type OleDb?

A: 

bumping up this question

In general, it's looked upon more favorably if you "bump" your question by editing it and adding some more detail. For example, things you've tried or resources you've found, as it shows that you're also actively researching it yourself.
rwmnau
You can delete this answer which will prevent others from down voting you
Michael Prewecki
+1  A: 

Without really knowing what "Enterprise Library" is versus "generic OleDb", I would suggest that you be very very careful before embarking on developing an application that will work against many databases. Sure it's nice to create some interfaces so people don't know what they are calling against, but all databases are not the same, not even close. In the end, you will end up writing code to the "lowest common denominator", and thereby depriving your application from the benefits of modern databases. There are also serious application logic issues that you have to deal with, for example some databases writers block readers where in others readers never lock. Assumptions about how concurrent processes interact with the database can go way past your nice encapsulated interfaces and may be difficult to debug.

My suggestions:

a) If you use database for simple persistence and want it to "run anywhere", just release your app with it's own multi-platform database (flatfiles, sqllite etc).

b) If you really want to run against "any database", just use a hibernate-type interface and make sure all project participants realize the semantic differences that will arise when their code is executed against different platforms, and go out of your way to make better databases act like the crummier ones.

c) (Preferred) - Abandon the initiative, pick a good database and write the app against it, fully leveraging the databases abilities.

I've been down this road a number of times.

A: 

There are no real advantages or disadvantages if you choose to develop your own multi-db DAL or use Enterprise Library. If you use Enterprise Library it would give u a jump start but also do more than you require and have a lot more code. In situations like this look very closely at building an XMLish config file for your app that you can tailor to fit one or more type of databases. If working on multiple db is not the primary concern, making multi-db work will take up loads of time.

Perpetualcoder