Attention: We are retiring the ASP.NET Community Blogs. Learn more >

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.

2 Comments

  • 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.

  • 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

Comments have been disabled for this content.