1. What is the full form of ADO?
The full form of ADO is ActiveX Data Object.
2. Explain ADO.NET in brief.
ADO.NET is a very important feature of .NET Framework, which is used to work with data that is stored in structured data sources, such as databases and XML files. The following are some of the important features of ADO.NET:
- Contains a number of classes that provide you with various methods and attributes to manage the communication between your application and data source.
- Enables you to access different data sources, such as Microsoft SQL Server, and XML, as per your requirements.
- Provides a rich set of features, such as connection and commands that can be used to develop robust and highly efficient data services in .NET applications.
- Provides various data providers that are specific to databases produced by various vendors. For example, ADO.NET has a separate provider to access data from Oracle databases; whereas, another provider is used to access data from SQL databases.
3. What are major difference between classic ADO and ADO.NET?
Following are some major differences between both
- In ADO we have recordset and in ADO.NET we have dataset.
- In recordset we can only have one table. If we want to accommodate more than one tables. We need to do inner join and fill the recordset. Dataset can have multiple tables.
- All data persist in XML as compared to classic ADO where data persisted in Binary format also.
4. What are the two fundamental objects in ADO.NET?
DataReader and DataSet are the two fundamental objects in ADO.NET.
5. What are the benefits of using of ADO.NET in .NET 4.0.
The following are the benefits of using ADO.NET in .NET 4.0 are as follows:
- Language-Integrated Query (LINQ) - Adds native data-querying capabilities to .NET languages by using a syntax similar to that of SQL. This means that LINQ simplifies querying by eliminating the need to use a separate query language. LINQ is an innovative technology that was introduced in .NET Framework 3.5.
- LINQ to DataSet - Allows you to implement LINQ queries for disconnected data stored in a dataset. LINQ to DataSet enables you to query data that is cached in a DataSet object. DataSet objects allow you to use a copy of the data stored in the tables of a database, without actually getting connected to the database.
- LINQ to SQL - Allows you to create queries for data stored in SQL server database in your .NET application. You can use the LINQ to SQL technology to translate a query into a SQL query and then use it to retrieve or manipulate data contained in tables of an SQL Server database. LINQ to SQL supports all the key functions that you like to perform while working with SQL, that is, you can insert, update, and delete information from a table.
- SqlClient Support for SQL Server 2008 - Specifies that with the starting of .NET Framework version 3.5 Service Pack (SP) 1, .NET Framework Data Provider for SQL Server (System.Data.SqlClient namespace) includes all the new features that make it fully compatible with SQL Server 2008 Database Engine.
- ADO.NET Data Platform - Specifies that with the release of .NET Framework 3.5 Service Pack (SP) 1, an Entity Framework 3.5 was introduced that provides a set of Entity Data Model (EDM) functions. These functions are supported by all the data providers; thereby, reducing the amount of coding and maintenance in your application. In .NET Framework 4.0, many new functions, such as string, aggregate, mathematical, and date/time functions have been added.
6. Which namespaces are required to enable the use of databases in ASP.NET pages?
The following namespaces are required to enable the use of databases in ASP.NET pages:
- The System.Data namespace.
- The System.Data.OleDb namespace (to use any data provider, such as Access, Oracle, or SQL)
- The System.Data.SQLClient namespace (specifically to use SQL as the data provider)