INFORMIX
Informix-ESQL/C Programmer's Manual
Chapter 12: Working with the Database Server
Home Contents Index Master Index New Book

The Client-Server Architecture of ESQL/C Applications

When an ESQL/C program executes an SQL statement, it effectively passes the statement to a database server. The database server receives SQL statements from the database application, parses them, optimizes the approach to data retrieval, retrieves the data from the database, and returns the data and status information to the application.

The ESQL/C program and the database server communicate with each other through an interprocess-communication mechanism. The ESQL/C program is the client process in the dialogue because it requests information from the database server. The database server is the server process because it provides information in response to requests from the client. The division of labor between the client and server processes is particularly advantageous in networks where data might not reside on the same computer as the client program that needs it.

When you compile an ESQL/C program, it is automatically equipped to communicate with database servers that reside either on the same computer (local) or over a network on other computers (remote). Figure 12-1 shows a connection between an ESQL/C application and local database servers.

Figure 12-1
ESQL/C Application That Connects to a Local Database Server

Figure 12-2 illustrates an ESQL/C application that connects across a network to a remote database server.

Figure 12-2
ESQL/C Application That Connects to a Remote Database Server

To establish a connection to a database server, your application must take the following actions:




Informix-ESQL/C Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.