Google News
logo
ADO.NET - Interview Questions
Explain ADO.NET Architecture.
ADO.NET is built on an Object Model, which allows data from a database to be accessed through a data provider. It's a data access technique provided by the Microsoft.Net Framework that allows relational and non-relational systems to communicate using a standard set of components.
The following are the elements of the ADO.NET architecture :
 
Data Provider : This component supplies data to any apps that update the database. The DataSet or DataReader object can be used to access data in the application. A data provider is a collection of objects that includes Command, Connection, DataReader, and DataAdapter. Regardless of the operation, such as Insert, Delete, Select, or Update, Command and Connection objects are required.

Connection : The connection object is required to connect to a database such as SQL Server, MySQL, Oracle, and others. To construct a connection object, you'll need to know the database's location (for example, IP address or machine name) as well as the security credentials (Ex: username and password-based authentication or windows authentication).

Command : The component where the SQL queries will be written is the action object. Using the command object, run the queries over the link. Using the action object and SQL queries, you will be able to fetch data or send data to the database.

DataReader :  DataReader is a forward-only connected read-only RecordSet that can be used to read records.

DataAdapter : Between the dataset and the command object, DataAdapter serves as a link. It takes the command object's data and stores it in the data set.

DataSet : A DataSet is a standalone RecordSet that can be explored in both directions. We can also use the dataset to update the data. DataAdapter is used to populate DataSet.

DataView class : A DataView class allows you to generate numerous data views from a DataTable that may be utilized in data-binding applications. You can use this to display the table in a different sorting order, or to filter the data using a filter expression or by row state, for example.

XML : An XML representation of a dataset can be generated. Data is expressed in XML format in the dataset's XML representation, while the database schema is represented in the XML Schema Definition(XSD) language.
Advertisement