Brian Ritchie's Blog

My ramblings on .NET & other development topics

News



Twitter

Blog Roll

Connect with me

SharpDbSchema 0.1 available

ADO.NET is missing an extensible architecture for accessing database schema information.  While there are ways to get this information using the OLE provider, or importing the old ADO COM libraries, there doesn't seem to be a pure managed code method.

Hopefully, the new SharpDBSchema library changes this.  It is designed using a provider pattern which will allow each database provider to implement a method for collecting schema information.  The initial version includes the basic interfaces, factory-based provider creation using a configuration file, and a MS SQL Server schema provider.

Any feedback would be appreciated.
Posted: May 09 2004, 10:46 PM by brian_ritchie | with 3 comment(s)
Filed under:

Comments

M. Keith Warren said:

You could go along way to building this thing out if you used INFORMATION_SCHEMA. It is a SQL92 standard for what you are trying to do.

Check it out here

http://www.devx.com/getHelpOn/10MinuteSolution/20561

# May 9, 2004 11:44 PM

Frans Bouma said:

INFORMATION_SCHEMA is not useful. Not only does SqlServer contain a huge bug in INFORMATION_SCHEMA which will make it impossible to retrieve for example constraint information of objects in other schemas in a catalog than dbo, other major databases do not support these views. Furthermore, the views contain information you don't want to know and lack information you DO want to know. For example, there is no index information and if you want all unique constraints, you need a lot of joins. The views do not contain essential information like which column is a sequenced field etc. and to retrieve all PK columns requires again a lot of joins, and again will leave you in the dark with tables in other schemas in a catalog. (besides that, SqlServer 7 lacks some INFORMATION_SCHEMA views, SqlServer 2000 has)

Oracle has a *huge* set of views which offer you a lot of information than INFORMATION_SCHEMA will ever be able to offer you.
# May 10, 2004 4:05 AM

Matthijs ter Woord (meddochat) said:

Brian,

Nice work. but please check out the NDal project. it is a data abstraction layer. it also let you get database definitions(except views for now due to the lack of a good sql parser).

Matthijs
# May 22, 2004 12:28 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)