ODBC : Open Database Connectivity SNU OOPSLA Lab. October 2005.

Slides:



Advertisements
Similar presentations
Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
Advertisements

Lecture plan Information retrieval (from week 11)
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 Architectures and the Web
Java Database Connectivity (JDBC). 2/24 JDBC (Java DataBase Connectivity) - provides access to relational database systems JDBC is a vendor independent.
Technical Architectures
Fundamentals, Design, and Implementation, 9/e Chapter 12 ODBC, OLE DB, ADO, and ASP.
Distributed Application Development B. Ramamurthy.
Using Visual Basic 6.0 to Create Web-Based Database Applications
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.
1 C. Shahabi Application Programming for Relational Databases Cyrus Shahabi Computer Science Department University of Southern California
Visual Basic Database Access BICS546. Microsoft Universal Data Access OLE DB: The OLE database protocol –Allows a program to access information in any.
Chapter 11 – Database-Oriented Middleware & EAI Database access is the key element to EAI, especially data-level EAI. Database oriented middleware is not.
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.
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Chapter 14 Database Connectivity and Web Technologies
Client/Server Computing. Information processing is distributed among several workstations and servers on a network, with each function being assigned.
Confidential ODBC May 7, Features What is ODBC? Why Create an ODBC Driver for Rochade? How do we Expose Rochade as Relational Transformation.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 David M. Kroenke’s Chapter Twelve: ODBC Database Processing: Fundamentals,
ODBC Open DataBase Connectivity a standard database access method developed by Microsoft to access data from any application regardless of which database.
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
JDBC Vs. Java Blend Presentation by Gopal Manchikanti Shivakumar Balasubramanyam.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
September 6, 2015 Connecting Client Applications to Informix Databases using IBM Informix Connect and ODBC James Edmiston Database Consultant Quest Information.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Interacting With Data Week 8 Connecting to the database Creating recordsets Interacting with the database.
How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward.
Chapter 7 PHP Interacts with Ms. Access (Open DataBase Connectivity (ODBC))
Database Management COP4540, SCS, FIU Programming with ODBC.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
ODBC : Open Database Connectivity SNU OOPSLA Lab. October 2005.
PHP Data Object (PDO) Khaled Al-Sham’aa. What is PDO? PDO is a PHP extension to formalise PHP's database connections by creating a uniform interface.
Lecture On Database Analysis and Design By- Jesmin Akhter Lecturer, IIT, Jahangirnagar University.
Using Visual Basic 6.0 to Create Web-Based Database Applications
DATABASE PROGRAMMING Lecture on 16 – 05 – PREVIOUS LECTURE QUIZ: - Some students were very creative in transforming 2NF to 3NF. Excellent! - Some.
Fundamentals of Database Chapter 7 Database Technologies.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
Universal Data Access and OLE DB. Customer Requirements for Data Access Technologies High-Performance access to data Reliability Vendor Commitment Broad.
2-1 WEB DATABSE INTERFACING Colorado Technical University IT420.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
Database Architectures Database System Architectures Considerations – Data storage: Where do the data and DBMS reside? – Processing: Where.
How to Connect to Database ODBC (Open Database Connectivity) ADO (ActiveX Data Object) ASP Code To Connect to Database Recordset Object Navigating through.
3-Tier Client/Server Internet Example. TIER 1 - User interface and navigation Labeled Tier 1 in the following graphic, this layer comprises the entire.
DB MidWare CSIS 4490 N-Tier Client/Server Dr. Hoganson Database Middleware Early client/server database systems –Two tier –Server does business logic (data.
PHP Workshop ‹#› PHP Data Object (PDO). PHP Workshop ‹#› What is PDO? PDO is a PHP extension to formalise PHP's database connections by creating a uniform.
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.
12/6/2015B.Ramamurthy1 Java Database Connectivity B.Ramamurthy.
Copyright © Curt Hill Connectivity Communicating with the Database.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
PHP Workshop ‹#› أطلق إبداعك 2 أطلق إبداعك 2 مدرس معتمد من مركز زووم PHP Data Object (PDO)
Database Connectivity with ASP.NET. 2 Introduction Web pages commonly used to: –Gather information stored on a Web server database Most server-side scripting.
Basics of JDBC Session 14.
ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases.
JDBC Chapter 1 JDBC Introduction
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.
R EMAINING TOPICS IN JDBC Sagun Dhakhwa. O VERVIEW Introduction to JDBC API Types of JDBC Drivers Introduction to ODBC.
ASP.NET Programming with C# and SQL Server First Edition
Visual Basic Database Access
Accessing the Database Server: ODBC, OLE DB, and ADO
W04 Connecting 3rd Party Application to ODBC
JDBC Database Management Database connectivity
Lecture 6 VB.Net SQL Server.
VISUAL BASIC INTRODUCTION TO DATA CONNECTIVITY.
Java Database Connectivity
Database Processing: David M. Kroenke’s Chapter Twelve: Part One
Presentation transcript:

ODBC : Open Database Connectivity SNU OOPSLA Lab. October 2005

Contents  Introduction  History  Communication with ODBC drivers  DAO, RDO, ADO  ODBC Model  Example  Summary  Online Resources

Introduction(1/2)  ODBC  (pronounced as separate letters) Short for Open DataBase Connectivity  A standard database access method developed by the SQL Access group in 1992  The goal of ODBC  to make it possible to access any data from any application, regardless of which DBMS is handling the data  ODBC manages this by inserting a middle layer, called a database driver, between an application and the DBMS

Introduction(2/2)  Database Driver  The purpose of this layer is to translate the application's data queries into commands that the DBMS understands  For this to work, both the application and the DBMS must be ODBC- compliant  The application must be capable of issuing ODBC commands and the DBMS must be capable of responding to them  ODBC has become so accepted that some vendors like IBM, Informix and Watcom have designed their DBMS native programming interface based on ODBC

ODBC Component(1/2) OracleDB2SybaseAcceess Oracle ODBC Driver DB2 ODBC Driver Sybase ODBC Driver Access ODBC Driver Application (ODBC function calls) Translation of ODBC calls into DBMS native language Driver Manager

ODBC Component(2/2)  Application  Performs processing and calls ODBC functions to submit SQL statements and retrieve results  Driver manager  Loads and unloads drivers on behalf of an application  Processes ODBC function calls or passes them to a driver  ODBC driver  Processes ODBC function calls, submits SQL requests to a specific data source, and returns results to the application  Data source  Consists of the data the user wants to access and its associated operating system, DBMS, and network platform (if any) used to access the DBMS

History

ODBC  Advantages:  no precompile needed; just uses an API  more portable than embedded SQL  current database statistics are used  no need to know the exact SQL statements ahead of time  Disadvantages:  need to know C/C++  need to understand ODBC!  dynamic binding; slower query execution

Application Step SQLAllocEnv SQLDisconnect SQLFreeConnect SQLFreeEnv SQLAllocConnect SQLConnect SQLAllocStmt SQLFreeStmt CLOSE option DROP option Process SQL stmt Receive Result Load driver and connect data source Allocate memory

Communication with ODBC drivers(1/3)  To simplify ODBC driver ’ s communication, Microsoft has developed a variety of different data access technologies:  Data Access Objects (DAO)  Remote Data Objects (RDO)  ActiveX Data Objects (ADO)

Communication with ODBC drivers(2/3)  DAO  Available in most applications that support database connectivity, but cannot support action queries that change content in some databases  RDO  Full-featured, but only available in Microsoft ’ s high-end enterprise-level programming environments  ADO  DAO+RDO  Full-featured, is available in most Microsoft environments, and supports most types of queries

Communication with ODBC drivers(3/3) Microsoft data access architecture using ODBC

ODBC Model  There are different ODBC models (or tiers) each describing the number of layers that must be passed through before the database is reached  The three most common are:  Tier 1  Tier 2  Tier 3

Tier 1 Program Program calls an ODBC function. ODBC Manager ODBC Manager determines what to do. ODBC Driver ODBC Driver performs actual processing. Database File The database file is opened by the driver and data is manipulated.

Tier 2 Program Program calls an ODBC function. ODBC Manager ODBC Manager determines what to do. ODBC Driver ODBC Driver prepares the request and passes it on to the DBMS. Client Database File The DBMS processes the request. DBMS Server Server

Tier 3 Program Program calls an ODBC function. ODBC Manager ODBC Manager determines what to do. ODBC Driver ODBC Driver prepares the request and passes it on to the DBMS. Client Server Gateway Database File The DBMS processes the request. DBMS Server ODBC Manager/Driver Gateway ODBC Manager/Driver pass the request on to the DMBS.

Importing, linking and exporting data  With ODBC  Importing data  Linking data  Exporting data  Ex) Microsoft Access can import (copy in) or link (connect to) data that is in text files, spreadsheets, other Access database, dBASE, Paradox, Microsoft FoxPro, and other SQL database that support ODBC

Importing vs. Linking  Importing  File is relatively small.  Data is not changed frequently by users of other database application.  Data need not to be shared with other database application.  Best performance is desired.  Linking  File is large (i.e., larger than maximum capacity of local Access database [1 GB]).  Data is changed frequently by users of other database application.  Data need to be shared over network with other database applications.  Performance does not matter.

ODBC Link Example(1/4) 1. Open the control Panel, and click the ODBC 2. Select system DSN

ODBC Link Example(2/4) 3. Select the driver for the type of database you want to add and press the Finish button 4. Enter a Data Source Name

ODBC Link Example(3/4) 5. Select the database you want to connect to and Press the OK button 6. Press the OK button

ODBC Link Example(4/4) 7. Now you should see your new ODBC link in the list Press the OK button to finish

Summary  ODBC  A standard database access method  Access any data from any application  ODBC Component  Application, driver manager, ODBC driver, data source  ODBC model  3 tier  With ODBC  Importing, linking and exporting data

Online Resources  For ODBC development reference  n-us/odbc/htm/dasdkodbcoverview.asp n-us/odbc/htm/dasdkodbcoverview.asp  For ODBC driver information  us/odbc/htm/odbc_drivers_overview.asp?frame=true us/odbc/htm/odbc_drivers_overview.asp?frame=true  For ODBC error message reference  ocs/diag/part3/75528c16.asp?frame=true ocs/diag/part3/75528c16.asp?frame=true