> # Introduction

> ## Introducing the the Easysoft ODBC-ODBC Bridge

> Easysoft Data Access 2000 is a suite of programs that add significant value to your investment in ODBC. With Easysoft software you can connect applications on more platforms to more database systems than ever before.

> The Easysoft Data Access 2000 ODBC-ODBC Bridge (OOB) enables ODBC calls to be made across the network from any Windows or Unix system to an ODBC data source running under Windows or Unix, permitting heterogeneous client-server operation and allowing single-client access to data wherever it is stored.

> ### Chapter Guide

> - Why ODBC?
> - Three Benefits of Driver Managers
> - Why the Easysoft ODBC-ODBC Bridge?
> - Where the Bridge Fits In

> ### Why ODBC?

> Historically, corporate data was held on large, centralised computing resources that performed all the processing required on it. Changes to the business practice meant changes had to be made to the corporate mainframe system. Worse still was the problem of integrating two or more of these highly individual systems, for example in the event of a corporate merger.

> As the desktop computer improved in power, users began to want to access corporate data in order to process it on their own desktop. The client-server architecture became a popular goal: the central computing resource (server) would produce a subset of its data for a user-friendly tool (client). The client would use desktop computing power to format and present the data.

> Database application writers and their customers found themselves with a key problem: it was necessary to produce one version of a piece of software for each Data Base Management System (DBMS) they wished to use it with.

> Relational databases and SQL went part way toward alleviating the problem. For the first time there was a defined, open, standard language for querying databases. In theory at least, it was possible to use the same language in dealing with databases from a variety of manufacturers. The X/Open consortium went on to define a Call Level Interface (CLI) so that programmers could effectively use SQL within their own programs.

> ODBC is an API definition, compliant with ANSI SQL and X/Open's SQL CLI. It allows an application to be written without considering the intricacies of the particular database engine it connects to -- An ODBC driver takes care of all the database-specific code, if necessary transforming the structure of the underlying system into a relational framework. Figure 1.1 illustrates the principle of separating the driver from the application.

> Figure 1.1: Before and after ODBC.

> Before ODBC, even if App1 and App2 were functionally equivalent, there had to be two programs, one for each Data Base Management System (DBMS) -- See left-hand side of Figure 1.1.

> ODBC permits the DBMS-specific parts of the program to be separated from the part that fulfils the functional requirement (Right-hand side of Figure 1.1). The result is that the completed application can be attached to any DBMS that has a corresponding driver -- currently there are over fifty DataBase Management Systems supported in this way.

> ### Three Benefits of Driver Managers

> ODBC on its own does not provide much -- without drivers, it does nothing at all! Even with drivers, it would still be necessary to re-link an application's object code with a specific driver in order to access a given DBMS. In order to allow off-the-shelf software to take advantage of ODBC, Microsoft provide a Driver Manager with their operating systems. The driver manager is essentially a dynamic linker, allowing the user to pair up application and driver in a clean and user-friendly manner.

> Figure 1.2: Driver Manager as Dynamic Linker.

> This approach provides three key results:

> - Once developers have written applications to satisfy a business requirement, the application can be `plugged in' to whatever database management system satisfies the technical demands.
> - Administrators can connect a variety of applications (such as generic query tools) to their databases to browse and investigate the data.
> - Data access middleware can be inserted between the ODBC client and server to add strategic functionality such as joining heterogeneous databases into one datasource or bridging a network.

> ### Why the Easysoft ODBC-ODBC Bridge?

> The ODBC-ODBC bridge from Easysoft (the OOB) is data access middleware that allows an application running on one platform to access an ODBC datasource on another platform. A typical business requirement is outlined below.

> #### Example Business Requirement

> The company's marketing coordinator has a PC running Windows NT, with a Microsoft Access database. The coordinator uses Access queries to generate statistical reports for higher management, and enjoys the consistent user interface and flexibility of the Windows system.

> The company also has a website running on an Apache server under Linux, which tracks the progress of users and collects profile data. The system administrator values the round-the-clock stability of the Linux platform and the ability to freely tailor and tune the server software.

> At present, the website administrator collates the figures at the end of each week, and emails them to the marketing coordinator, who pastes them into Access. The web administrator has set up some scripts to generate the figures, but is often too busy to deliver the figures by the end of the week. The marketing coordinator has to take care that the columns in the Access table are displayed in the right order, or the paste operation results in figures appearing in the wrong columns.

> #### A Solution using the OOB

> The ODBC-ODBC Bridge (OOB) allows a script on the web server to run an SQL update query directly on the NT machine, removing the need for regular human intervention. A small script along with a very simple client program submit SQL to the bridge, which passes it across to the database software on the NT machine. The script is set up to trigger automatically at the end of the week, and pasting errors are removed because the SQL query explicitly names the destination columns.

> ### Where the Bridge Fits In

> The Easysoft ODBC-ODBC Bridge comes in two parts -- a client and a server. The bridge client appears to the ODBC client program just as any other ODBC driver, and the bridge server connects to the database engine as an ODBC client application. This terminology may seem a little confusing at first, so we will take it step by step.

> First, Figure 1.3 shows the typical ODBC set up. The client application ("App") connects through a driver manager to an ODBC driver, which interfaces to the DBMS. The interface between the Driver Manager and the Driver is defined by the ODBC API.

> Figure 1.3: The typical ODBC configuration.

> Imagine that the ODBC-ODBC Bridge is a black box that takes ODBC calls in at the top and passes them straight out again at the bottom. We can insert this box at A and as far as the application or the database are concerned, nothing has changed.

> What has changed however, is that the application and the database no longer need to be on the same machine or software platform.

> NB | Connecting an ODBC application to a networked database is not new -- Microsoft's SQL Server allows ODBC client applications to connect to a remote SQL Server datasource. With the OOB however, the database can be any ODBC datasource (not just SQL server) and the client may be on Windows, Linux, Solaris or any other supported platform.

> Inside this `black box' we have a client-server pair that handle all the network operations, passing function references and parameters one way and return values the other (Figure 1.4).

> Figure 1.4: The ODBC-ODBC Bridge.

> Figure 1.5 shows the system set up across a network. Compare it with the model in Figure 1.3 -- the client side fits, except that the database is replaced by a network connection; and the server side fits, with the OOB Server in the place of the ODBC client.

> Figure 1.5: Bridging the network with the OOB.

> REF | For the definitive SQL CLI document consult Open Group CAE Specification C451, ISBN 1-85912-081-4. Microsoft ODBC 3.0 Programmer's Reference, ISBN 1-57231-516-4 explains the utilisation of ODBC in some detail.

> [Top] | [Contents] | [Previous] | [Next] | [Index]

| Easysoft - The Home of Data Access |