Accessing a Remote Database

Team-Fly    

 
Sams Teach Yourself SQL in 24 Hours, Third Edition
By Ronald R. Plew, Ryan K. Stephens
Table of Contents
Hour 23.  Extending SQL to the Enterprise, the Internet, and the Intranet


graphics/newterm_icon.gif

Sometimes the database you are accessing is a local database, one to which you are directly connected. For the most part, you will probably access some form of a remote database. A remote database is one that is non-local, or located on a server other than the server to which you are currently connected, meaning that you must utilize the network and some network protocol in order to interface with the database.

There are several ways to access a remote database. From a broad perspective, a remote database is accessed via the network or Internet connection using a middleware product (ODBC, a standard middleware, is discussed in the next section). Figure 23.2 shows three scenarios for accessing a remote database.

Figure 23.2. Accessing a remote database.

graphics/23fig02.gif

This figure shows access to a remote server from another local database server, a local front-end application, and a local host server. The local database server and local host server are often the same because the database normally resides on a local host server. However, you can usually connect to a remote database from a local server without a current local database connection. For the end user , the front-end application is the most typical method of remote database access. All methods must route their database requests through the network.

ODBC

graphics/newterm_icon.gif

Open Database Connectivity (ODBC) allows connections to remote databases through a library driver. An ODBC driver is used by a front-end application to interface with a back-end database. A network driver may also be required for a connection to a remote database. An application calls the ODBC functions, and a driver manager loads the ODBC driver. The ODBC driver processes the call, submits the SQL request, and returns the results from the database. ODBC is now a standard and is used by several products, such as Sybase's PowerBuilder, FoxPro, Visual C++, Visual Basic, Borland's Delphi, Microsoft Access, and many more.

As a part of ODBC, all the RDBMS vendors have an Application Programming Interface (API) with their database. Oracle's Open Call Interface (OCI) and Centura's SQLGateway and SQLRouter are some of the available products.

JDBC

JDBC is Java Database Connectivity. Like ODBC, JDBC allows connections to remote databases through a Java library driver. The JDBC driver is used by a front-end Java application to interface with a back-end database.

Vendor Connectivity Products

In addition to an ODBC driver, many vendors have their own products that allow a user to connect to a remote database. Each of these vendor products is specific to the particular vendor implementation and may not be portable to other types of database servers.

Oracle Corporation has a product called Net8, which allows for remote database connectivity. Net8 can be used with almost all the major network products, such as TCP/IP, OSI, SPX/IPX, and more. In addition, Net8 runs on most of the major operating systems.

Sybase has a product called Open Client/C Developers Kit, which supports other vendor products such as Oracle's Net8.


Team-Fly    
Top
 


Sams Teach Yourself SQL in 24 Hours
Sams Teach Yourself SQL in 24 Hours (5th Edition) (Sams Teach Yourself -- Hours)
ISBN: 0672335417
EAN: 2147483647
Year: 2002
Pages: 275

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net