ITP 400-05 – Unit 2 DB
Investigate the Cybrary for information about ADO.NET. What is it? What are its advantages and key components? How will knowing ADO.NET be useful?
ADO .NET (Microsoft ActiveX Data Objects) allows applications to dynamically access and manipulate records from anOLE DB provider for use with client/server and web-based applications. ADO was first released circa 1996 with version 1.0 and the last version was 2.6,which lead the way for ADO .NET (also known as ADO 2.8). There were several problems with ADO such as its “handling of disconnected data stores, and functioning properly and concisely with XML.”1 But with the release of ADO.NET these problems have been rectified, mainly due to the fact that the .NET Framework’s core component is XML.
ADO.NET key components are
- DataSet
- .NET Framework data provider
One of the main advantages of ADO.NET is the DataSet. In older versions of ADO the connection to the data source was constant, but with ADO.NET they are disconnected and distributed thanks to the DataSet. Because database connections are performance wise exspensive, so the ability of ADO.NET to only make a connection when it is getting the data and when it is updating data is a huge advantage. What happens in simple terms is a connection is made to the datasource via a Connection, the DataAdapter then pulls the data from the source and stores it in a dataset for later use, this allows the connection to the database to be closed. The main advantage to this approach is that because the DataSet is independent of the source it can use “multiple and differing data sources, used with XML data, or used to manage data local to the application”2.
The .NET Framework data provider is designed for data manipulation as well as fast forward only, read only access to your data. Its components are as follows
- Connection object – this provides the connectivity to the source
- Command object –this provides the access to the database commands for modifying data, running stored procedures and retrieval or sending of parameters
- DataReader – this enables the high performance stream from the data source
- DataAdapter – this is the bridge between the data source and your DataSet. It uses the Command objects “to execute SQL commands at the data source to both load the DataSet with data, and reconcile changes made to the data in the DataSet back to the data source”3
One final thing I wanted to hit upon is that even though there are scalability issues with the opening and closing of connections, ADO.NET solves these issues by “pooling connections, i.e. while it looks to your application as if you're creating and destroying connections, you're actually borrowing and returning connections from a pool that ADO.NET manages for you”.4 And lastly is the database abstraction that allows you to have one DataSet that is formed from multiple different data sources but provides your applications with all the data access it needs.
As far as why I believe learning ADO.NET will be useful to me is simple. In our current economy jobs are scarce and with outsourcing trends the way they are its even worse. I will be competing with experience, something I can’t replace. But ADO.NET and the .NET Framework itself proves such a huge leap forward in our technology and has such potential that I have no doubt that corporations will readily see the advantages of updating to Visual Studio .NET for its development tool. And this will be my advantage. Most companies have a database of some kind and having the ability to manage that data is always an edge.
References:
1Markatos,Dimitrios.Introduciton to ADO.NET.sitepoint.5-7-04
Microsoft Corporation,Microsoft ActiveX Data Objects (ADO).MSDN.5-7-04
Microsoft Corporation,Overview of ADO.NET.MSDN.5-7-04
(2, 3)Microsoft Corporation,ADO.NET Architecture.MSDN.5-7-04
Microsoft Corporation,ADO.NET DataSet.MSDN.5-7-04
4Top 5 .NET Newbie Q and A.sitepoint.5-7-04