ADO.NET
ADO.NET is an object-oriented set of libraries that allows you to interact with data sources. ADO.NET is a set of classes that expose data access services .ADO.NET is also a part of the .NET Framework. Commonly, ADO.NET is used to handle data access As you are probably aware, there are many different types of databases available. For example, there is Microsoft SQL Server, Microsoft Access, Oracle, Borland Interbase and IBM DB2, just to name a few.Data Providers
We know that ADO.NET allows us to interact with different types of data sources and different types of databases. However, there isn't a single set of classes that allow you to accomplish this universally
Since different data sources expose different protocols, we need a way to communicate with the right data source using the right protocol Some older data sources use the ODBC protocol, many newer data sources use the OleDb protocol, and there are more data sources every day that allow you to communicate with them directly through .NET ADO.NET class libraries
ADO.NET provides a relatively common way to interact with data sources, but comes in different sets of libraries for each way you can talk to a data source. These libraries are called Data Providers and are usually named for the protocol or data source type they allow you to interact with.
Below Table lists ADO.NET Data Providers are class libraries that allow a common way to interact with specific data sources or protocols. The library APIs have prefixes that indicate which provider they support
Since different data sources expose different protocols, we need a way to communicate with the right data source using the right protocol Some older data sources use the ODBC protocol, many newer data sources use the OleDb protocol, and there are more data sources every day that allow you to communicate with them directly through .NET ADO.NET class libraries
ADO.NET provides a relatively common way to interact with data sources, but comes in different sets of libraries for each way you can talk to a data source. These libraries are called Data Providers and are usually named for the protocol or data source type they allow you to interact with.
Below Table lists ADO.NET Data Providers are class libraries that allow a common way to interact with specific data sources or protocols. The library APIs have prefixes that indicate which provider they support
Provider Name
|
API Prefix
|
Data Source
Description
|
ODBC Data Provider
|
ODBC
|
Data Sources with an ODBC interface.Normally older databases
|
OLEDB Data Provider
|
OleDb
|
Data Sources that exposes an OledDb Interface, i.e,Acess or Excel
|
Oracle Data Provider
|
Oracle |
For Oracle Databases
|
SQL Data Provider
|
Sql | For Interacting with Sql Server |
| Borland Data Provider |
Bdp
|
Generic Access to Many Databases such as Interbase,Sql Server,Oracle and IBM DB2
|
There are two fundamental objects in ADO.NET
The ADO Connection Object is used to create an open connection to a data source. Through this connection, you can access and manipulate a database.
- Data reader - Connected architecture
- Dataset - Disconnected architecture
The ADO Connection Object is used to create an open connection to a data source. Through this connection, you can access and manipulate a database.
![]() |
| ADO.NET ARCHITECTURE |
Data Source : Data Source was the initial name for Microsoft SQL Server
Connection: Connection class can be set as “Open” or “Close”, with notes “Open” was used for Operation that directly access to Data source.
DataReader: Data Reader was the best solution for “Forward Streaming” In another words, DataReader was the most appropriate to “SELECT” Database Query Command, because it processed faster.
DataCommand : DataCommand has property “SELECT COMMAND“, “INSERT COMMAND“,”UPDATE COMMAND“, and “DELETE COMMAND“,these properties can be filled in by “Command” class
DataAdapter: DataAdapter will definitely fill in DataSets With “fill ()” method unless you did not specify the custom method. DataCommand has “SELECT COMMAND“ property
DataSet: Equal to DataReader as temporary data storage, even though Dataset Can be filled in by DataAdapter. DataSet object can hold more than one table (in other words more than one rowset) from the same data source as well as the relationships between them
DataBound : ASP component that support object binding will do “bound” to the data that’s stored on “DataSet”, “DataReader” and another object that store data collection.
ADO.NET offers several advantages over previous versions of ADO and over other data access components. These benefits fall into the following categories:
- Interoperability
- Maintainability
- Programmability
- Performance
- Scalability

No comments:
Post a Comment