Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I had a small doubt regarding the data providers.

Why we are using different providers like Orcaledb, SqlClient for diferrent database connectivity, I want to know is there any specific reason of using different providers.

Thanks,
Sreekanth
Posted

Because each database system works differently. They are the same general plan, and the same SQL will work (pretty much) unchanged. But the actual interface is different. For example, with an SQLCE database you can't use Stored Procedures. It would be possible to make a "generic" interface, but then you would have to remember which one you are using to get the SQL right.

It's a bit like cars: Left hand drive and right hand drive. They are both driven the same way, but using different hands to change gear and work the handbrake.
 
Share this answer
 
Different providers are maintained by different people and are optimized for their respective RDBM platform.

They cannot be all the same because of different underlying connection semantics such as packets ports etc.

To isolate yourself from these you can use the generic interfaces such as IDBconnection, IDBCommand etc. and pass the implementation at runtime ie change for different RDBMs without changing your code.
 
Share this answer
 
DataProviders works as a Bridge to intract your application with database.
see a picture in
CP Article.
Hope it will clear more.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900