Introduction Because database applications today reside in a complicated environment, various standards have been developed for accessing database servers.

Slides:



Advertisements
Similar presentations
Connecting to a Database through Programs Database Systems.
Advertisements

Chapter 13 © 2000 Prentice Hall Chapter 13 Accessing the Database Server: ODBC, OLE DB, and ADO David M. Kroenke Database Processing © 2000 Prentice Hall.
Database Processing Applications and Business Intelligence Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
COMM 226 Database and content management Chitu Okoli Associate Professor in Business Technology Management John Molson School of Business, Concordia University,
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.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 346 Day 25.
Fundamentals, Design, and Implementation, 9/e Chapter 12 ODBC, OLE DB, ADO, and ASP.
Prentice Hall © COS 346 Day Agenda Capstone Progress report due Assignment 9 not corrected yet Assignment 10 posted (last one!!!) –Due.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 236 Day 23.
14 1 Chapter 14 Database Connectivity and Web Development Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Fundamentals, Design, and Implementation, 9/e COS 346 DAY 22.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 236 Day 24.
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Fundamentals, Design, and Implementation, 9/e Cos 346 Day 23.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 COS 346 Day 22.
Database Processing Applications Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Database Processing Applications Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Client-server database systems and ODBC l Client-server architecture and components l More on reliability and security l ODBC standard.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 1-1 David M. Kroenke’s Database Processing: Fundamentals, Design, and.
Getting Started Chapter One DATABASE CONCEPTS, 7th Edition
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Chapter 14 Database Connectivity and Web Technologies
Objective In this session we will discuss about : What is ADO. NET ?
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 David M. Kroenke’s Chapter Twelve: ODBC Database Processing: Fundamentals,
Overview of Database Access in.Net Josh Bowen CIS 764-FS2008.
ODBC Open DataBase Connectivity a standard database access method developed by Microsoft to access data from any application regardless of which database.
+ Connecting to the Web Week 7, Lecture A. + Midterm Basics Thursday February 28 during Class The lab Tuesday, February 26 is optional review Class on.
CIS 764 – Presentation Somil Chandwani.  With Microsoft Data Access Components (MDAC), developers can connect to and use data from a wide variety of.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
Some Basic Database Terminology
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 David M. Kroenke’s Chapter Twelve: ODBC, OLE DB, ADO, and ASP Part.
1 ODBC, OLE DB, ADO, and ASP. 2 Introduction  Because database applications today reside in a complicated environment, various standards have been developed.
CSS/417 Introduction to Database Management Systems Workshop 5.
David M. Kroenke’s Chapter One: Introduction Part Two Database Processing: Fundamentals, Design, and Implementation.
CHAPTER 14 USING RELATIONAL DATABASES TO PROVIDE OBJECT PERSISTENCE (ONLINE) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database.
Fundamentals of Database Chapter 7 Database Technologies.
Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 David M. Kroenke’s Chapter Thirteen: XML and ADO.NET Part Four Database.
Databases and Data Access  Introduction to ADO.NET  ADO.NET objects  ADP.NET namespaces  Differences between ADO and ADO.NET.
Universal Data Access and OLE DB. Customer Requirements for Data Access Technologies High-Performance access to data Reliability Vendor Commitment Broad.
Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages.
Database, SQL, and ADO.NET- Part 1 Session 11 Mata kuliah: M0874 – Programming II Tahun: 2010.
CSS/417 Introduction to Database Management Systems Workshop 4.
Chapter 5 Database Processing. Neil uses software to query a database, but it has about 25 standard queries that don’t give him all he needs. He imports.
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.
1 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall.
What is database?  Any Method for access info into Application from DataBase?  ODBC is standard for Accessing Data.  Problem with ODBC:  Information.
Fundamentals, Design, and Implementation, 9/e by David M. Kroenke BSA206 Database Management Systems Lecture 21: Databases and the Web Chapters 12, 13.
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:
ADO.NET. ADO.NET is a new, improved, and greatly expanded version of ADO that was developed for the Microsoft.NET initiative It incorporates all of the.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 David M. Kroenke’s Chapter Twelve: ODBC, OLE DB, ADO, and ASP Part.
+ Connecting to the Web Chapter 7. + Chapter Objectives Understand and be able to set up Web database processing Learn the basic concepts of Extensible.
ADO ActiveX Data Object. ActiveX Data Objects (ADO) is Microsoft’s latest database object model. The goal of ADO is to allow VB developers to use a standard.
Database Connectivity with ASP.NET. 2 Introduction Web pages commonly used to: –Gather information stored on a Web server database Most server-side scripting.
ADO.NET Architecture MIS3502: Application Integration and Evaluation David Schuff Adapted from material by Arnold Kurtz, David.
Module 4 Introduction ADO.NET.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Eleven: The Web Server Environment.
Database Processing Applications Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
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.
Database Processing Applications and Business Intelligence
Accessing the Database Server: ODBC, OLE DB, and ADO
Database Connectivity and Web Technologies
Database Processing Applications
Database Management System (DBMS)
Lecture 1: Multi-tier Architecture Overview
Chapter 10 ADO.
Database Processing: David M. Kroenke’s Chapter Twelve: Part One
Presentation transcript:

Introduction Because database applications today reside in a complicated environment, various standards have been developed for accessing database servers. Some of the important standards are: –OBDC (Open Database Connectivity) is the early standard for relational databases. –OLE DB is Microsoft’s older object-oriented interface for relational and other databases. –The.NET Framework and ADO.NET are the current Microsoft “dot NET” data access standards providing easier access to data. –JBDC (Java Database Connectivity) is the Java “equivalent” of ODBC KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

Web Server Data Environment A Web server needs to publish applications that involve different data types KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

The Role of the ODBC Standard 11-3 KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

OBDC The ODBC (Open Database Connectivity) standard provides a DBMS-independent means for processing relational database data. It was developed in the early 1990s by an industry committee and has been implemented by Microsoft and many other vendors. The goal is to allow a developer to create a single application that can access databases supported by different DBMS products without needing to be changed or recompiled KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

ODBC Architecture 11-5 KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

OBDC Components OBDC consists of a data source, an application program, a driver manager, and a DBMS driver. A data source is the database, its associated DBMS, operating system, and network platform. –An ODBC data source can be a relational database, a file server, or a spreadsheet. An applications program issues requests to create a connection with a data source KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

OBDC Components A driver manager determines the type of DBMS for a given ODBC data source and loads that driver in memory. A DBMS driver processes ODBC requests and submits specific SQL statements to a given type of data source. –A single-tier driver processes both ODBC calls and SQL statements. –A multiple-tier driver processes ODBC calls, but passes the SQL requests to the database server KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

ODBC Driver Types: ODBC Single-Tier Driver 11-8 KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

ODBC Driver Types: ODBC Multiple-Tier Driver 11-9 KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

Conformance Levels Levels of conformance balance the scope of the OBDC standard. There are two types of conformance levels: –ODBC conformance levels concern the features and functions that are made available through the driver’s application program interface (API). A driver API is a set of functions that the application can call to receive services. –SQL conformance levels specify which SQL statements, expressions, and data types a driver can process KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

OBDC Conformance Levels KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

SQL Conformance Levels KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

ODBC Data Source A data source is an ODBC data structure that identifies a database and the DBMS that processes it. Three types of data source names: –A file data source is a file that can be shared among database users having the same DBMS driver and privilege. –A system data source is local to a single computer and may be used by the operating system and any user on that system. System data sources are recommended for Web servers. To define a system data source name, the type of driver and the database need to be specified. –A user data source is available only to the user who created it KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

The Microsoft.NET Framework KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

The Role of OLE DB KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

OLE DB OLE DB is an implementation of the Microsoft OLE object standard. –OLE DB objects are COM objects and support all required interfaces for such objects. OLE DB breaks the features and functions of a DBMS into COM objects, making it easier for vendors to implement portions of functionality. –This characteristic overcomes a major disadvantage of ODBC. –With ODBC, a vendor must create an ODBC driver for almost all DBMS features and functions in order to participate in ODBC at all KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

Object-Oriented Concepts An object-oriented programming object is an abstraction that is defined by its properties and methods. –An abstraction is a generalization of something. –A property specifies set of characteristics of an object. –A method refers to actions that an object can perform. –A collection is an object that contains a group of other objects KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

OLE DB Goals Create object interfaces for DBMS functionality pieces: –Query, update, transaction management, etc. Increase flexibility: –Allow data consumers to use only the objects they need –Allow data providers to expose pieces of DBMS functionality –Providers can deliver functionality in multiple interfaces –Interfaces are standardized and extensible Provide object interfaces over any type of data: –Relational and non-relational database, ODBC or native, VSAM and other files, , etc. Do not force data to be converted or moved from where it is KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

OLE DB Basic Constructs There are data consumers and data providers: –Data consumers—users of OLE DB functionality. –Data providers—sources of OLE DB functionality. An interface is a set of objects and the properties and methods they expose in that interface: –Objects may expose different properties and methods in different interfaces. An implementation is how an object accomplishes its tasks: –Implementations are hidden from the outside world and may be changed without impacting the users of the objects KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

OLE DB Data Providers A rowset is equivalent to a cursor. OLE DB has two types of data providers: –Tabular data provider—exposes data via rowsets. Examples: DBMS, spreadsheets, ISAMs. –Service provider—a transformer of data through OLE DB interfaces. It is both a consumer and a provider of transformed data. Examples: query processors, XML document creator KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

Rowset Interfaces KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

The Role of ADO KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

The Role of ADO.NET KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall Data Provider A.NET data provider is a library of classes that provides ADO.NET services. Microsoft’s provides three data providers: –OLE DB data provider can be used to process any OLE DB-compliant data source. –SQLClient data provider is purpose-built for use with SQL Server. –OracleClient data provider is purpose-built for use with Oracle.

KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall Data Provider Components A connection object is similar to the OBDC’s connection object. A command object is created on an established connection. A data reader provides read-only, forward-only, fast access to database data. An application can get and put data to and from the database using the command object. A dataset is an in-memory database that is disconnected from any regular database. –It distinguishes ADO.NET from the previous data access technology.

KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall Data Provider Components

KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall The ADO.NET Dataset A dataset is an in-memory database that is disconnected from any regular database. Datasets can have: –Multiple tables, views, and relationships. Tables may have surrogate key (auto increment columns), primary keys, and be declared as unique. –Referential integrity rules and actions. –The equivalent of triggers. Datasets may be constructed from several different databases and managed by different DBMS.

The ADO.NET Object Model KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall 11-28

The ADO.NET Dataset Object Model KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall 11-29

KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall Dataset Advantages Dataset contents and its XML schema can be easily formatted as an XML document. Also, XML schema documents can be read to create the structure of the dataset, and XML documents can be read to fill the dataset. Datasets are needed to provide a standardized, nonproprietary means to process database views. –This is important for the processing of views with multiple multivalue paths.

KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall Dataset Disadvantages Because dataset data is disconnected from the regular database, only optimistic locking can be used when updating the regular database with the dataset. In the case of conflict, either the dataset must be reprocessed or the data change must be forced onto the database, causing the lost update problem. Thus, datasets cannot be used for applications in which optimistic locking is problematical. –Instead, the ADO.NET command object should be used.