There are two fundamental objects in ADO.NET:
i. DataReader- connected architecture.
ii. DataSet- disconnected architecture.
In ADO.NET, the fundamental objects are:
- Connection: Represents a connection to a data source, such as a database. It provides methods for establishing and managing connections to the database.
- Command: Represents a SQL statement or a stored procedure to execute against a database. It can be used to retrieve data, modify data, or perform other database operations.
- DataReader: Provides a forward-only, read-only stream of data from a data source. It is used to efficiently retrieve data from the database when a read-only, forward-only access to data is sufficient.
- DataAdapter: Serves as a bridge between a DataSet and a data source for retrieving and saving data. It populates a DataSet with data from the database and updates the database with changes made to the DataSet.
- DataSet: Represents an in-memory cache of data retrieved from a data source. It can contain multiple DataTable objects, which in turn represent tables of data. The DataSet can be used to manipulate data locally before committing changes back to the database.
- DataTable: Represents a single table of data within a DataSet. It consists of rows and columns, and it can be used to perform operations such as filtering, sorting, and modifying data.
These objects form the core components of ADO.NET and are used to interact with databases in .NET applications.