ODBC Open DataBase Connectivity a standard database access method developed by Microsoft to access data from any application regardless of which database.

Slides:



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

Chapter 10: Designing Databases
1 Chapter 12 Working With Access 2000 on the Internet.
Fundamentals, Design, and Implementation, 9/e Chapter 12 ODBC, OLE DB, ADO, and ASP.
Distributed Application Development B. Ramamurthy.
The ADO Data Control. Universal Data Access Open Database Connectivity (ODBC) –standard for accessing data in databases OLE-DB –allows access to data.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Fundamentals, Design, and Implementation, 9/e COS 346 DAY 22.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
DT228/3 Web Development Databases. Database Almost all web application on the net access a database e.g. shopping sites, message boards, search engines.
Chapter 11 – Database-Oriented Middleware & EAI Database access is the key element to EAI, especially data-level EAI. Database oriented middleware is not.
Database Programming (using ADO) Universal Data Access – Microsoft strategy for providing access to information across the enterprise. – UDA provides high-performance.
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 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
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.
Hands-On Microsoft Windows Server 2008 Chapter 8 Managing Windows Server 2008 Network Services.
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.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
1 ODBC, OLE DB, ADO, and ASP. 2 Introduction  Because database applications today reside in a complicated environment, various standards have been developed.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
Interacting With Data Databases.
Chapter 7 PHP Interacts with Ms. Access (Open DataBase Connectivity (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.
Lecture On Database Analysis and Design By- Jesmin Akhter Lecturer, IIT, Jahangirnagar University.
Database Programming in Java Corresponds with Chapter 32, 33.
Using Visual Basic 6.0 to Create Web-Based Database Applications
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
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.
Database Application Security Models Database Application Security Models 1.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
Designing and Developing WS B. Ramamurthy. Plans We will examine the resources available for development of JAX-WS based web services. We need an IDE,
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.
Universal Data Access and OLE DB. Customer Requirements for Data Access Technologies High-Performance access to data Reliability Vendor Commitment Broad.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Database Architectures Database System Architectures Considerations – Data storage: Where do the data and DBMS reside? – Processing: Where.
What is database?  Any Method for access info into Application from DataBase?  ODBC is standard for Accessing Data.  Problem with ODBC:  Information.
Hands-On Microsoft Windows Server Implementing Microsoft Internet Information Services Microsoft Internet Information Services (IIS) –Software included.
Lesson Overview 3.1 Components of the DBMS 3.1 Components of the DBMS 3.2 Components of The Database Application 3.2 Components of The Database Application.
3-Tier Client/Server Internet Example. TIER 1 - User interface and navigation Labeled Tier 1 in the following graphic, this layer comprises the entire.
Tutorial 91 Databases A database is an organized collection of related information stored in a file on a disk A database allows companies to store information.
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.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
CSI 3125, Preliminaries, page 1 JDBC. CSI 3125, Preliminaries, page 2 JDBC JDBC stands for Java Database Connectivity, which is a standard Java API (application.
Database Connectivity and Server-Side Scripting Chapter 12.
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.
ODBC : Open Database Connectivity SNU OOPSLA Lab. October 2005.
ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases.
JDBC Chapter 1 JDBC Introduction
Introduction Because database applications today reside in a complicated environment, various standards have been developed for accessing database servers.
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.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
ASP.NET Programming with C# and SQL Server First Edition
Data Virtualization Demoette… ODBC Clients
JDBC Database Management Database connectivity
Chapter 3: Windows7 Part 4.
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Chapter 10 ADO.
Introduction of Week 5 Assignment Discussion
Presentation transcript:

ODBC Open DataBase Connectivity a standard database access method developed by Microsoft to access data from any application regardless of which database management system (DBMS) is handling the data. ODBC middle layer- between an application and the DBMS. Translates the application's data queries into commands that the DBMS understands. 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. Central role for SQL

Driver In addition to the ODBC software, a separate module or driver is needed for each database to be accessed. A driver is a program that interacts with a particular device or special kind of software e.g DBMS. The driver contains the special knowledge of the device or special software interface that programs using the driver do not. A driver is often packaged as a dynamic link library (DLL, EXE or VXD) file. -a small program, which can be called by a program and executed when needed Each database management system needs a specific ODBC driver.

ODBC is based on SQL Call-Level Interface standard. It allows programs to use SQL requests that will access databases without having to know the proprietary interfaces to the databases. ODBC handles the SQL request and converts it into a request the individual database system understands. In the distributed object architecture, Common Object Request Broker Architecture (CORBA), the Persistent Object Service (POS) is a superset of both the Call- Level Interface and ODBC. Java Database Connectivity (JDBC), used by Java to reach ODBC-accessible databases.

The ODBC architecture has four components: · 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. · Driver. Processes ODBC function calls, submits SQL requests to a specific data source, and returns results to the application. If necessary, the driver modifies an application's request so that the request conforms to syntax supported by the associated DBMS. · 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.

ODBC Architecture

Multiple drivers and data sources can exist, which allows the application to simultaneously access data from more than one data source. The ODBC Application Program Interface is used in two places: 1.between the application and the Driver Manager, 2.and between the Driver Manager and each driver. The interface between a Driver Manager and drivers is sometimes referred to as the service provider interface, or SPI. For ODBC, the application programming interface (API) and the service provider interface (SPI) are the same;

OLE DB OLE DB and ODBC are Application Program Interfaces that provide access to a range of data sources. e.g. enables a single Visualbasic program to use data from many different databases, maybe from different suppliers. Microsoft designed ODBC to access SQL data and OLE DB to access any type of data. OLE DB has evolved from ODBC. The difference is in the surrounding context and in the generalization of a few main terms;

Commonly used terms and what they mean in ODBC and OLE DB. Data source ODBC-A relational DBMS OLE DB-A module that wraps a data store and exposes its content as a set of rows and columns Table ODBC- A table in a relational database OLE DB- An aggregation of related rows and homogeneous columns

Result set A chunk of client memory that holds a set of records An independent and stand-alone module that exposes a set of records Command A SQL command interpreted by the connected DBMS A text string that the data source can understand

OLE DB accesses all types of information— relational and non-relational, flat and hierarchical, persistent and volatile, based on SQL or on any other query language. Components, called data providers, ‘wrap’ (or encapsulate) a data store. This makes the data store a kind of ‘black box’. Programs that use the data stores do not need to know the internal workings of the data store. They only need to know the detail of the interface to the data store-this is standardised through OLE DB.

The application that accesses the data is called a data consumer e.g. Access 2000, Visual Basic program The program that enables native access to the data is called a database provider e.g. Microsoft OLE DB Provider for SQL Server or Microsoft Jet 4.0 OLE DB Provider. This will be database specific I.e. there will need to be a different data provider for every database. A data link is the connection information that a data consumer uses to access a data source through the OLE DB provider of that data source. Consumer e.g. VB program Link Provider e.g. Oracle, SQL Server

Example Dialogs that create Data Links

Data Link file Typically connect to an OLE DB provider from Microsoft Access using the Data Link Properties dialog box, Can also define connection information for an OLE DB provider in a Microsoft Data Link file (.udl) Microsoft Windows Explorer capable of creating the file (choose Microsoft Data Link from the New menu, create a Microsoft Data Link file, select the file name, right-click on the file name, and then choose Properties).

e.g. file content- a connection string Provider=SQLOLEDB.1; Persist Security Info=False; User ID=u878878; Initial Catalog=car_hireSQL; Data Source=scm-database

When connected to a data provider, a client application (data consumer) always receives a set of records, whether the data provider manages tables from a relational database management system (RDBMS), a directory listing, a text file or whatever. The data provider is responsible for retrieving the data from the physical source and formatting it. The data can reside on a persistent medium (disk files or databases), be kept in memory, or span various machines and platforms. It can be relational or hierarchical, structured or flat, written in a standard or a proprietary format, and accessible or inaccessible through ODBC.

In addition, the result set (called a rowset or a recordset) that OLE DB returns isn't a simple stream of bytes copied into the client application's memory, as with ODBC. It's a stream of data that a standardised module, with a separate programming interface, holds. In other words, the data returned is not simply data. It is data plus the means of manipulating the data –an object. The object is called a RecordSet. Such an object gives you several facilities for manipulating the recordset—sorting, filtering, and scrolling—and it enables concurrent access to the same data from multiple clients. You can set up the data rows to work even when they're disconnected from the data source.

OLE DB is a set of COM-based interfaces that expose data from a variety of sources. OLE DB interfaces provide applications with uniform access to data stored in diverse information sources, or data stores.

DSN Data Source Name. A Data Source Name provides connectivity to a database through an ODBC driver. The DSN contains database name Directory database driver UserID password, and other information. The DSN can be used by an application to call information from the database.

The DSN is a connection made by the ODBC server to a specified database. This connection is assigned a name which can be called by ASP (Active Server Pages), or other programming/scripting languages to manipulate the database. Acts as a Data Link. ASP is the consumer DSN is the link Database is the provider. In the following the term Data Source is the same as Data Link. DSN is often used by Active Server Pages and Visual Basic programs when a database operation is necessary

DSN vs DNS Important not to confuse DSN and DNS A Domain Name Server (DNS) is part of the distributed Internet directory service. A DNS is used to translate between domain names and IP addresses Most Internet services rely on a DNS to work If the DNS fails, web sites cannot be located and delivery stalls.

Types of DSN Three types of DSNs: (1)System DSN (machine data source) -- can be used by anyone who has access to the machine and services, such as Microsoft Windows NT services. DSN info is stored in the registry. (2)User DSN (machine data source) -- created for a specific user. Also stored in the registry. (3)File DSN -- DSN info is stored in a text file with.DSN extension

Machine Data Sources Machine data sources only useable on the computer they are defined on Machine data sources store connection information in the Windows Registry on a specific computer with a user-defined name. A machine data source provides added security, Cannot be copied by a remote user to another computer.

File Data Sources File data sources store connection information in a text file More flexible to use than machine data sources. A file data source can be copied to any computer with the correct ODBC driver

The file data source can be placed on a single server, shared between many computers on the network, and the connection information easily maintained in one location. e.g [ODBC] DRIVER=SQL Server SERVER=scm-database(local) WSID=I5X3L2 DATABASE=bsc2

DSN-less connection Instead of using a DSN to connect to a database, the developer specifies the necessary information in the application. With a DSN-less connection the developer is free to use connection standards other than ODBC, such as OLE DB.

ODBC Data Source Administrator The ODBC Data Source Administrator used to add and configure data sources The ODBC Administrator updates data source connection information. As data sources added the ODBC Administrator updates the registry information.

Summary Application programs can be written and configured so that they can access any source of data (database, file, data stream, directory…..etc) i.e. are physically independent from data sources. Microsoft standard to achieve this is OLE DB. Other suppliers use system software (middleware) with a similar architecture e.g. OMG/CORBA. Programs connect to data sources and receive data in the form of objects (record sets) Connections are established by defining Data Links.