ADO.NET is a .NET class library, which provides a high-level interface to database access. Using ADO.NET, applications have the option of using data providers that are either very specific to their database implementation or more generic for multiple database access. Independent of the actual data provider, an ADO.NET implementation uses a standard set of types to accomplish database access. Figure 15.1 illustrates relationships of the ADO.NET types. Figure 15.1. ADO.NET components. As shown in Figure 15.1, ADO.NET objects from the database up to the application include Connections, Commands, CommandBuilders, DataReaders, DataAdapters, DataSets, and DataViews. Table 15.1 describes what each of these objects is for. Table 15.1. ADO.NET ObjectsNAME | PURPOSE |
---|
Connection | Holds information about the database server; used to open and close database connections. | Command | Facilitates delivering SQL commands to a database; may be used by DataAdapters, DataReaders, or by themselves. | CommandBuilder | Dynamically creates delete, insert, and update queries for a DataAdapter based on the DataAdapter's existing select query. | DataReader | A read-only, fast-forward stream for efficient return of SQL queries. | DataAdapter | Forms a bridge between a database (using the Command and Connection objects) and a DataSet for support of disconnected data scenarios. | DataSet | A disconnected set of tables enabling efficient management of data. | DataView | Permits filtering and sorting of DataSets. | |