Sams Teach Yourself SQL in 24 Hours
- Table of Contents
- Copyright
- About the Authors
- Acknowledgments
- Tell Us What You Think!
- Introduction
- Part I: A SQL Concepts Overview
- Hour 1. Welcome to the World of SQL
- Part II: Building Your Database
- Hour 2. Defining Data Structures
- Hour 3. Managing Database Objects
- Hour 4. The Normalization Process
- Hour 5. Manipulating Data
- Hour 6. Managing Database Transactions
- Part III: Getting Effective Results from Queries
- Hour 7. Introduction to the Database Query
- Hour 8. Using Operators to Categorize Data
- Hour 9. Summarizing Data Results from a Query
- Hour 10. Sorting and Grouping Data
- Hour 11. Restructuring the Appearance of Data
- Hour 12. Understanding Dates and Times
- Part IV: Building Sophisticated Database Queries
- Hour 13. Joining Tables in Queries
- Hour 14. Using Subqueries to Define Unknown Data
- Hour 15. Combining Multiple Queries into One
- Part V: SQL Performance Tuning
- Hour 16. Using Indexes to Improve Performance
- Hour 17. Improving Database Performance
- Part VI: Using SQL to Manage Users and Security
- Hour 18. Managing Database Users
- Hour 19. Managing Database Security
- Part VII: Summarized Data Structures
- Hour 20. Creating and Using Views and Synonyms
- Hour 21. Working with the System Catalog
- Part VIII: Applying SQL Fundamentals in Today's World
- Hour 22. Advanced SQL Topics
- Hour 23. Extending SQL to the Enterprise, the Internet, and the Intranet
- Hour 24. Extensions to Standard SQL
- Part IX: Appendixes
- Appendix A. Common SQL Commands
- Appendix B. Using MySQL for Exercises
- Appendix C. Answers to Quizzes and Exercises
- Appendix D. CREATE TABLE Statements for Book Examples
- Appendix E. INSERT Statements for Data in Book Examples
- Appendix F. Glossary
- Appendix G. Bonus Exercises
Accessing a Remote Database
|
|
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.
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
|
|
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.
Accessing a Remote Database Through a Web Interface | Next Section

Account Sign In
View your cart