What are the fundamental objects in ADO.NET?

There are two fundamental objects in ADO.NET:

i. DataReader- connected architecture.

ii. DataSet- disconnected architecture.

In ADO.NET, the fundamental objects are:

  1. Connection: Represents a connection to a data source, such as a database. It provides methods for establishing and managing connections to the database.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.