Tuesday, December 30, 2008

ADO .Net Namespaces, Providers and use of XML

ADO Data Provider:


A data provider is a set of ADO.NET classes that allows you to access a specific database, execute SQL commands, and retrieve data. Essentially, a data provider is a bridge between your application and a data source.


The classes that make up a data provider include the following:


Connection: You use this object to establish a connection to a data source.
Command: You use this object to execute SQL commands and stored procedures.
DataReader: This object provides fast read-only, forward-only access to the data retrieved from a query.
DataAdapter: This object performs two tasks. First, you can use it to fill a DataSet (a disconnected collection of tables and relationships) with information extracted from a data source. Second, you can use it to apply changes to a data source, according to the modifications you’ve made in a DataSet.



XML and ADO.NET:


ADO.NET leverages the power of XML to provide disconnected access to data. ADO.NET was designed hand-in-hand with the XML classes in the .NET Framework — both are components of a single architecture.


ADO.NET and the XML classes in the .NET Framework converge in the DataSet object.

The DataSet can be populated with data from an XML source, whether it is a file or an XML stream.

The DataSet can be written as World Wide Web Consortium (W3C) compliant XML, including its schema as XML Schema definition language (XSD) schema, regardless of the source of the data in the DataSet.


Because the native serialization format of the DataSet is XML, it is an excellent medium for moving data between tiers making the DataSet an optimal choice for remoting data and schema context to and from an XML Web service.



ADO Namespaces:


Below are few namespaces those are used in ADO .Net for making connections to database, playing with different databases e.g. SQL, Oracle.


System.Data: Contains the key data container classes that model columns, relations, tables, datasets, rows, views, and constraints. In addition, contains the key interfaces that are implemented by the connection-based data objects.


System.Data.Common: Contains base, mostly abstract classes that implement some of the interfaces from System.Data and define the core ADO.NET functionality. Data providers inherit from these classes to create their own specialized versions.


System.Data.OleDb: Contains the classes used to connect to an OLE DB provider, including OleDbCommand, OleDbConnection, and OleDbDataAdapter. These classes support most OLE DB providers but not those that require OLE DB version 2.5 interfaces.


System.Data.SqlClient: Contains the classes you use to connect to a Microsoft SQL Server database, including SqlDbCommand, SqlDbConnection, and SqlDBDataAdapter. These classes are optimized to use the TDS interface to SQL Server.


System.Data.OracleClient: Contains the classes required to connect to an Oracle database (version 8.1.7 or later), including OracleCommand, OracleConnection, and OracleDataAdapter. These classes are using the optimized Oracle Call Interface (OCI).


System.Data.Odbc: Contains the classes required to connect to most ODBC drivers. These classes include OdbcCommand, OdbcConnection, and OdbcDataAdapter. ODBC drivers are included for all kinds of data sources and are configured through the Data Sources icon in the Control Panel.


System.Data.SqlTypes: Contains structures that match the native data types in SQL Server. These classes aren’t required but provide an alternative to using standard .NET data types, which require automatic conversion.



Thanks & Regards,


Paresh Bhole

Hello

Thanks for checking out my post...

... Paresh Bhole