ADO .NET Class Hierarchy



All ADO.NET functionality in the .NET Runtime class library comes in three general namespaces and n number of provider-specific namespaces. The three general namespaces are System.Data, System.Data.Common and System.Data.SqlTypes. Some of the provider-specific namespaces are System.Data.OleDb, Microsoft.Data.Odbc and System.Data.SqlClient.

The System.Data namespace defines classes that you can use with all the data providers or without data providers at all. This namespace also defines interfaces that are base classes for the data provider classes. Figure below shows the System.Data namespace's Class hierarchy.

Figure1.gif

Figure: The System.Data namespace class hierarchy

The System.Data.Common namespace defines classes common to all data providers. Figure below shows the System.Data.Common namespace hierarchy.

Figure2.gif

Figure: The System.Data.Common namespace hierarchy

The System.Data.SqlTypes namespace defines classes for native SQL server data types that provide type-safe conversion between the .NET data types and the SQL server native data types. Figure below shows the System.Data.SqlTypes namespace hierarchy.

Figure3.gif

Figure: The System.Data.SqlTypes namespace hierarchy.

Besides these three namespaces, ADO.NET defines n number of provider specific namespace. The class hierarchy models of all of these namespace are similar except for the name of the class. The classes defined in the provider specific namespaces start with the data provider name. For example, the Sql data provider classes start with Sql, and the OleDb data provider classes start with OleDb. The Command object classes of the Sql and OleDb data providers are SqlCommand and OleDbCommand, respectively.

In this section you're going to see only the System.Data.OleDb namespace class hierarchy because all the data providers (including System.Data.Sql and Microsoft.Data.Odbc) implement the same class hierarchy model. Figure below shows the System.Data.OleDb namespace hierarchy. Figure4.gif
Figure: The System.Data.OleDb namespace hierarchy

Conclusion

Hope this article would have helped you in understanding ADO.NET class hierarchy provided by the .NET Runtime class library. See my other articles on the website on ADO.NET.

Up Next
    Ebook Download
    View all
    Learn
    View all