NDBC - .NET Database Connectivity
NDBC is a complete replacement for Microsoft's ADO.NET database
connection classes.
Why create a new database connection library?
Here are a few dislikes
I have of ADO.NET.
- ADO.NET does not support generic databases. Other than the very
limited support provided by the IDb??? classes, there is no support
in ADO.NET to simply change database vendors. The current solution
is to use the minimal support provided by IDb. Almost every
database driver added to ADO.NET has extra features and they're
implemented in different ways.
- ADO.NET does not provide a common exception interface. Each
ADO.NET driver derives exceptions either from SystemException
or Exception. There is no common exception for simplifying code
accross database vendors.
- ADO.NET provides no real support for querying the database
schema. The only support they provide is on result sets. You
have no ability to find out what columns are available before you
run your query.
- ADO.NET is tightly tied around it's DataSet architecture. Not all
programs need to use full datasets to simply get a row or two of
information and update them.
- Microsoft ships with Microsoft SQL Server and OLEDB support. You
have to add on support for ODBC and Oracle. There is no support
for other databases like PostgreSQL, MySQL, Interbase, etc. Teams
are working on these for the Mono
project but other than a couple, they are not being designed to
use outside of Mono.
The alternatives?
- Create a new ADO.NET driver that encapsulates all other ADO.NET
drivers.
- Provide an all-new interface based on the working standard JDBC.
I've decided to implement the second alternative after trying the first
one twice. Each time I ran into the same issues of trying to get database
information where there was none.
Here are the reasons for basing the new work on JDBC.
- The JDBC metadata classes provide a great deal of information about
databases.
- Changing database vendors is as simple as changing your connection
string.
- One mechanism for catching exceptions.
- One set of methods for accessing the database. You don't need to
no what each library provides at development time. Software can
work around database types at runtime.
Goals of this project
- Implement the JDBC standard as close as possible. Changes are
being made to replace the thousands of get/set methods with
C# properties.
- Provide support for as many database vendors as possible. TDS based
MSSQL and Sybase are already started.
- Code as much in C# as possible.
- Produce a library that works with Microsoft .NET and Mono.
- Optionally provide a ADO.NET interface on top so that people can
still use their DataSet's and the like.
How can you help?
Pick a database you like to work with and create a driver for it. If you
have already done a driver for ADO.NET, then adding a new interface should
not be that hard.