ADO .NET from. ADO .NET from “ADO .Net” Evolution/History of ADO.NET MICROSOFT .NET “ADO .Net” Evolution/History of ADO.NET History: Most applications.

Slides:



Advertisements
Similar presentations
17. Data Access ADO.Net Architecture New Features of ADO.NET
Advertisements

Database Connections with ASP.Net
By Chris Pascucci and FLF
Chapter 10 ADO. What is ADO? ADO is a Microsoft technology ADO stands for ActiveX Data Objects ADO is a programming interface to access data in a database.
Introduction to Database Processing with ADO.NET.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
ADO. NET. What is “ADO.Net”? ADO.Net is a new object model for dealing with databases in.Net. Although some of the concepts are similar to the classical.
14 1 Chapter 14 Database Connectivity and Web Development Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Chapter 14 Database Connectivity and Web Technologies
Programming in ADO.NET: Data-Centric Applications and ADO.NET Original copyright by Microsoft, 2002, with minor modifications by Dan Eaves, 2005.
Objective In this session we will discuss about : What is ADO. NET ?
Overview of Database Access in.Net Josh Bowen CIS 764-FS2008.
Computer Science 317 Database Management Introduction to Web Access to Databases.
ADO.NET – part II August 2004 [ Marmagna Desai]. CONTENTS ADO vs ADO.NET ADO.NET – Managed providers Connecting to Database SqlConnection Selecting Database.
ADO.NET. ADO.NET deals with accessing and manipulating databases.it comprises of many namespaces and classes to do so. ADO.NET provides access to datasources.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
Fundamentals of Database Chapter 7 Database Technologies.
Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig.
Developing Web Applications Using Microsoft ® Visual Studio ® 2008.
A Simple Introduction. What is ADO.net? First the word ADO stands for ActiveX Data Objects And it is an integral part of.Net Framework of Microsoft hence.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Needs for Accessing Database To make your web site more dynamic and maintainable, you can display information on your web pages that are retrieved from.
Databases and Data Access  Introduction to ADO.NET  ADO.NET objects  ADP.NET namespaces  Differences between ADO and ADO.NET.
.NET Data Access and Manipulation ADO.NET. Overview What is ADO.NET? Disconnected vs. connected data access models ADO.NET Architecture ADO.NET Core Objects.
1 Introduction to ADO.NET Microsoft ADO.NET 2.0 Step by Step Rebecca M Riordan Microsoft Press, 2006.
Chapter 3 Introduction to ADO.NET 3.1 The ADO and ADO.NET ActiveX Data Object (ADO) is developed based on Object Linking and Embedding (OLE) and Component.
File Processing Concepts – Field – combination of 1 or more characters that is the smallest unit of data to be accessed – Record – group of related fields.
Database, SQL, and ADO.NET- Part 1 Session 11 Mata kuliah: M0874 – Programming II Tahun: 2010.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL ADO.Net Basics Ruwan Wijesinghe Trainer.
Objectives In this lesson, you will learn to: *Identify the need for ADO.NET *Identify the features of ADO.NET *Identify the components of the ADO.NET.
Module 9: Accessing Relational Data Using Microsoft Visual Studio.NET.
Session 8: ADO.NET. Overview Overview of ADO.NET What is ADO.NET? Using Namespaces The ADO.NET Object Model What is a DataSet? Accessing Data with ADO.NET.
Module 7: Accessing Data by Using ADO.NET
Christopher M. Pascucci.NET Programming: Databases & ADO.NET.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Introduction to ADO.NET ADO.NET - Lesson 01  Training time: 10 minutes  Author:
3-Tier Client/Server Internet Example. TIER 1 - User interface and navigation Labeled Tier 1 in the following graphic, this layer comprises the entire.
Presented by Joseph J. Sarna Jr. JJS Systems, LLC
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
An Introduction to ADO.Net Marmagna Desai.NET Seminar, Fall-2003.
The Problems HTTP is disconnected So many database vendors Create a simple consistent versatile interface on the data Look at ADO.NET classes OleDb SQL.
Mauricio Featherman, Ph.D. Washington St. University
HNDIT Rapid Application Development
Database Connectivity with ASP.NET. 2 Introduction Web pages commonly used to: –Gather information stored on a Web server database Most server-side scripting.
Module 4 Introduction ADO.NET.
C# .NET Software Development
Introduction Because database applications today reside in a complicated environment, various standards have been developed for accessing database servers.
Active Data Objects Using.Net ADO.Net Farooq Ahmed Amna Umber Summayya Shehzad.
Module 5 Data Classes DataView – DataGridView Control 1.
Module 2: Using ADO.NET to Access Data. Overview ADO.NET Architecture Creating an Application That Uses ADO.NET to Access Data Changing Database Records.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 The SqlCommand Object ADO.NET - Lesson 03  Training time: 15 minutes  Author:
Data Access. ADO.NET ADO.NET is the primary library for building database solutions within the.NET Framework. ADO.NET does not replace ADO. ADO and OLEDB.
.NET Data Access and Manipulation
 ADO.NET is an object-oriented set of libraries that allows you to interact with data sources  Commonly, the data source is a database, but it could.
Integrating Data Lesson 6.
ASP.NET Programming with C# and SQL Server First Edition
Data Access with ADO.NET
Introduction to ADO.NET
Introduction to Database Processing with ADO.NET
Introduction to Database Processing with ADO.NET
Business Intelligence
ADO.NET Framework.
Programming the Web Using ASP.Net
Lecture 6 VB.Net SQL Server.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Database Objects 1/12/2019 See scm-intranet.
Chapter 10 ADO.
M S COLLEGE OF ART’S, COMM., SCI. & BMS Advance Web Programming
Introduction to Database Programming through ADO. NET
Presentation transcript:

ADO .NET from

“ADO .Net” Evolution/History of ADO.NET MICROSOFT .NET “ADO .Net” Evolution/History of ADO.NET History: Most applications need data access from some data Source, make data accessing a crucial component for applications. Data access is making the application to interact with a database, where all the data is stored. Different applications have different requirements for accessing different database.

“ADO .Net” Evolution/History of ADO.NET MICROSOFT .NET “ADO .Net” Evolution/History of ADO.NET History: The first data access model, DAO (Data Access object) was created for local databases which had performance and functionality issues. Next came RDO (Remote Data Object) and ADO (ActiveX Data Object) which were designed for Client Server architectures but soon ADO took over RDO. ADO was a good architecture but was a connected data access model, which means that when a connection to the database is established, the connection remains open until the application is closed.

MICROSOFT .NET “ADO .Net” History: Leaving the connection open for the lifetime of the application raises concerns about database security and network traffic. Also, as databases are becoming increasingly important and as they are serving more people, a connected data access model makes us think about its productivity. For example, an application with connected data access may do well when connected to two clients, the same may do poorly when connected to 10 and might be unusable when connected to 100 or more. Also, open database connections use system resources to a maximum extent making the system performance less effective.

MICROSOFT .NET “ADO .Net” History: To cope up with the problem mentioned last, Dot.Net introduce ADO .NET. ADO .NET addresses the above mentioned problems by maintaining a disconnected database access model which means, when an application interacts with the database, the connection is opened to serve the request of the application and is closed as soon as the request is completed. Likewise, if a database is Updated, the connection is opened only long enough to complete the Update operation and is closed as soon as the operation is completed.

MICROSOFT .NET “ADO .Net” History: By keeping connections open for only a minimum period of time, ADO .NET conserves system resources and provides maximum security for databases and also has less impact on system performance. Also, ADO .NET when interacting with  the database uses XML and converts all the data into XML format for database related operations making them more efficient.

“ADO .Net” Definitions: MICROSOFT .NET “ADO .Net” Definitions: ADO.NET is an object-oriented set of library classes in .Net that allows you to interact with data sources.  Commonly, the data source is a database (Microsoft SQL Server, Microsoft Access, Oracle etc), but it could also be a text file, an Excel spreadsheet, or an XML file. 

MICROSOFT .NET “ADO .Net” ADO.NET is generally considered as a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also access data in non-relational sources. Note: ADO.NET is sometimes considered an evolution of ActiveX Data Objects (ADO) technology, but was changed so extensively that it can be considered an entirely new product from microsoft.

“ADO .Net Data Providers” MICROSOFT .NET “ADO .Net Data Providers” ADO.NET allows us to interact with different types of data sources and different types of databases. However, there is not a single set of classes that allow you to accomplish this universally. Since different data sources expose different protocols, we need a way to communicate with the right data source using the right protocol. Then what is Protocol?

ADO.NET Data Source/Service Providers Provider Name Protocol Data Source Description ODBC Data Provider Odbc Data Sources with an ODBC interface. Normally older data bases OleDb Data Provider OleDbData Sources that expose an OleDb interface, i.e. Access or Excel. Oracle Data Provider Oracle For Oracle Databases. SQL Data Provider Sql For interacting with Microsoft SQL Server. Borland Data Provider Bdp Access to many databases such as SQL Server and Oracle

MICROSOFT .NET ADO.NET Objects ADO.NET includes many objects (classes) you can use to work with data. The objects below are the ones you must know. Learning about them will give you an idea of the types of things you can do with data when using ADO.NET. The Connection Object To interact with a database, you must have a connection to it. The connection helps identify the database server, the database name, user name, password, and other parameters that are required for connecting to the data base.

MICROSOFT .NET Microsoft Visual Studio .NET provides two types of Connection classes in its base class library: The SqlConnection object, which is designed specifically to connect to Microsoft SQL Servers. The OleDbConnection object, which can provide connections to a wide range of database types like Access and Oracle. The Connection object contains all of the information required to open a connection to the database. A connection object is used by command objects so that command object will know on which database the command is to execute.

The Command object is represented by two corresponding classes: MICROSOFT .NET The Command Object: The process of interacting with a database means that you must specify the actions you want to occur. This is done with a command object. You use a command object to send SQL statements to the database. A command object uses a command string(insert, delete, update select) and a connection object to figure out which database to communicate with. The Command object is represented by two corresponding classes: SqlCommand OleDbCommand

ExecuteScalar: Returns a single value from a database query. MICROSOFT .NET The Command objects can be used to execute stored procedures on the database, SQL commands, or return complete tables directly. Command objects provide three methods that are used to execute commands on the database: ExecuteNonQuery: Executes commands that have no return values such as INSERT, UPDATE or DELETE. ExecuteScalar: Returns a single value from a database query. ExecuteReader: Returns a result set (collection of rows or columns or both).

MICROSOFT .NET The DataReader Object Many data operations require that you only get a stream of data for reading. The data reader object allows you to obtain the results of a SELECT statement from a command object.  For performance reasons, the data returned from a data reader is a fast forward-only stream of data. This means that you can only pull the data from the stream in a sequential and connected manner for reading. This is good for speed, but if you need to manipulation /alteration in data, then a Data Set with Data Adopter is a better object to work with.

The DataAdapter Object MICROSOFT .NET The DataAdapter Object Sometimes you need to caching data in memory to minimize the number of database calls for data. The data adapter makes it easy for you to accomplish these things by helping to manage data in a disconnected mode. The data adapter adopts the data and fills a DataSet object.

MICROSOFT .NET The Dataset Object “The dataset is a disconnected, in-memory representation of data and the data in it can be manipulated and updated independent of the database”. When the use of this DataSet is finished, changes can be made back to the central database for updating. The data in DataSet can be loaded from any valid data source like Microsoft SQL server database, an Oracle database or from a Microsoft Access database. The DataSet is specifically designed to help manage data in memory and to support disconnected operations on data.

MICROSOFT .NET DataSet can be considered as a local copy of the relevant portions of the database. They contain multiple Datatable objects, which contain columns and rows, just like normal database tables.  You can even define relations between Data tables to create parent-child relationships in a dataset.

Summary: ADO.NET is the .NET technology for interacting with data sources. You have several Data Providers, which allow communication with different data sources, depending on what the database is. Regardless, of which Data Provider used, you'll use a similar set of objects to interact with a data source. The SqlConnection object lets you manage a connection to a data Source. SqlCommand objects allow you to talk to a data source and send commands to it.  To have fast forward-only read access to data, use the SqlDataReader. If you want to work with disconnected data, use a DataSet and implement reading and writing to/from the data source with the help of a SqlDataAdapter. MICROSOFT .NET

MICROSOFT .NET Any Query?