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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With