Module 4 Introduction ADO.NET.

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
1 Introducing SQL Server  A Relational DBMS  A Powerful Client/Server DBMS Utilities range from:  Simple Database Creation/Maintenance To  Datawarehousing,
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.
The ADO Data Control. Universal Data Access Open Database Connectivity (ODBC) –standard for accessing data in databases OLE-DB –allows access to data.
Using ADO.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
1 ADO.NET. 2.NET Framework Data Namespaces System.Data –Base set of classes and interfaces for ADO.NET System.Data.Common –Classes shared by the.NET Data.
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
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.
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 ADO.NET Chapter 1 ADO.NET 4.0 Development.
Overview of Database Access in.Net Josh Bowen CIS 764-FS2008.
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
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 – part II August 2004 [ Marmagna Desai]. CONTENTS ADO vs ADO.NET ADO.NET – Managed providers Connecting to Database SqlConnection Selecting Database.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
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.
Developing Web Applications Using Microsoft ® Visual Studio ® 2008.
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.
Database, SQL, and ADO.NET- Part 1 Session 11 Mata kuliah: M0874 – Programming II Tahun: 2010.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with Disconnected Data The DataSet and SqlDataAdapter ADO.NET - Lesson.
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.
ASP.NET Rina Zviel-Girshin Lecture 5
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.
Introduction to ADO.Net and VS Database Tools and Data Binding ISYS 350.
Module 3: Working with Local Data. Overview Using DataSets Using XML Using SQL Server CE.
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.
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.
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.
.NET Data Access and Manipulation
Integrating Data Lesson 6.
ASP.NET Programming with C# and SQL Server First Edition
Introduction to ADO.NET
Introduction to Database Processing with ADO.NET
Introduction to Database Processing with ADO.NET
ADO.NET Framework.
Programming the Web Using ASP.Net
Lecture 6 VB.Net SQL Server.
ADO.NET Accessing Databases in VS.NET
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Опит в използването на ODP.NET с Oracle 9i
Chapter 10 ADO.
M S COLLEGE OF ART’S, COMM., SCI. & BMS Advance Web Programming
Introduction to Database Programming through ADO. NET
Presentation transcript:

Module 4 Introduction ADO.NET

Objective Explain the role of ADO.NET Describe data access architecture in .NET Differentiate between DAO, RDO, ADO and ADO.NET List the benefits of ADO.NET 2.0 Describe the disconnected data access approach

What is Database ? Database is a collection of related records. The information in DB is stored in such a way that it is easier to access, manage, and update the data. Data from the DB can be accessed using any one of the following architectures: Single-tier architecture Two-tier architecture Three-tier architecture

ADO.NET Is the data access technology, which allows to access data from various data sources. Is a part of .NET Framework: The technology can be used for all .NET-base applications. Supports disconnected data architecture: Connection to the data source is established only required. Use XML to interact with the DB: All the data in the DB is converted into XML format for DB related operations.

ADO.NET Features Asynchronous processing: Enable time-consuming application running in the background. Multiple Active Result Sets (MARS): Allow to execute multiple batches in a connection. XML Data support Bulk copy operations: Allow to copy large files into tables or views Batch processing Tracing: Monitor the excution of code  identify problems when executing code and fix them. Connection pooling control: Collects all the opened DB connections in a connection pool. Get a connection from the pool for client rather than create new one.

Data Access Architecture The two important components of ADO.NET used for processing the data in DB are: Data providers: Provide and maintain connection to the DB Dataset : Is the required portion in database that is extracted and maintained in the form of a table as a local copy in the client system.

Data Access Models

Benefits of ADO.NET Simplified Programming Model Interoperability: XML is the default format used for transmitting datasets across network, any component can read XML format is able to process data. Maintainability Programmability Performance Does not require data-type conversion while transmitting data through the tier. Scalability

Data Access Models of ADO.NET Connected data access: Connection to the DB is established when requested by an application. This connection is kept open till the application is closed. Disconnected data access: Connection to the DB is established when the application forwards a request. Once the request is processed, connection is automatically closed.

Data Access Components ADO.NET provides two components to access and manipulate data: .NET Framework data provider The DataSet The objects associated with ADO.NET technology are: Command Connection DataAdapter DataReader DataSet DataProvider

Data Provider Used for providing and maintaining connection to the database Allows to perform different operations in the database: .NET Framework Data Provider for SQL Server .NET Framework Data Provider for OLE DB .NET Framework Data Provider for ODBC .NET Framework Data Provider for Oracle

DataSet Used to display and update data. Used for retrieving data from multiple sources. Can perform extensive processing on the data without having open connection to the server.

Connection Allows to create a connection between application & DB. In ADO.NET, a connection to SQL Server and OLE DB data source is established using the following connection class: SqlConnection OleDbConnection Properties ConnectionString, State Methods CreateCommand, Open, Close Event StateChange string strConnect = “server=(local);database=pubs;uid=sa;pwd=sa”; SqlConnection con = new SqlConnection(strConnect);

Command Enable to execute a command against a data source: Make a call to a stored procedure Execute SQL statements: INSERT, DELETE, UPDATE and SELECT Is specific to the data provider used in a connection: SqlComand: Specifies the types of operation performed with the SQL Server. OleDbCommand: Specifies statements, stored procedures performed with any data source by using OLE DB provider. Properties CommandText, Connection, CommandType, CommandTimeout Methods ExecuteNonQuery, ExecuteReader, ExecuteScalar, ExecuteXMLReader

DataAdapter A bridge between a DataSet and a DataSource: Fill() method: fill DataSet from DataSource Update() method: INSERT,UPDATE or DELETE data from data source There are many kinds of DataAdapter: OleDbDataAdapter SqlDataAdapter OdbcDataAdapter OracleDataAdapter

DataReader Reads a stream of data from the DB. Provides a forward-only, read-only stream of data : Increases the application performace. However, the DataReader object requires an exclusive use of an open connection object fot its whole life span. SqlDataReader reader = commandObj . ExecuteReader();

Summary ADO.NET is a data access technology – supports disconnected data architecture A data provider establishes and maintains connection to the database. The .NET Framework provides various data providers which are used for SQL Server, OLE DB, ODBC, Oracle data sources. .NET Framework Data Providers and Dataset are used for accessing data source and then storing the retrieved records into tables : Connection, Command, DataAdapter, DataReader