Info

Part II—The Delphi Database Tools complex calls into their application. This chapter will seek to develop this understanding while leaving the API discussion to later chapters.

We will examine the architecture of the BDE first to surface the efficacy of the driver-based design. The drivers and the system of aliases critical to utilizing the engine follow, rounding out the engine discussion in abstract. Putting it to work is next on the agenda, so the utilities including the Database Desktop and the Database Explorer are examined along with a brief discussion of distribution needs of projects using the BDE.

Architecture

The Borland Database Engine utilizes a driver-based architecture. Discrete software drivers provide the specific support and translation layers needed by the specific database product. The engine then uses these drivers to provide a standard set of functions among a disparate variety of database products. Drivers can be specific to a single database, such as the Paradox driver, or a single driver that can support a range of similar database structures such as the dBASE/FoxPro family

The fundamental task of the driver is to implement the specific low-level commands required by the file system of the specific database. In doing so, it serves as a translator between the underlying file structure and the high-level structures and commands needed by the BDE. The database engine, in turn, then provides a transparent interface to the Delphi components that support database access. It is this type of architecture that makes it possible to utilize a single component to access the wide variety of database structures that are available to the developer. Though the architecture seems cumbersome and unwieldy, it is well implemented and highly optimized, giving Delphi its world-renowned flexibility and multi-tier capabilities.

Figure 4.1 isan architectural diagram of the BDE layers. Each layer is responsible for performing a specific function as the database call traverses the engine. A Delphi database access path through the BDE follows these steps:

The application calls a VCL component.

  1. The component passes the call to the BDE.
  2. The BDE in turn calls the specific database driver.
  3. The driver enables direct access to the data tables, performing the specific actions requested.

Part II—The Delphi Database Tools

Chapter 4—The Borland Database Engine and the Database Utilities

Figure 4. I

Borland Database Engine architecture

Single-Tier

Two-Tier

Muiti-Tier-r

Single-Tier

Two-Tier

Muiti-Tier-r

Figure 4. I

Borland Database Engine architecture

Having the database access functions enabled separately from the Delphi code brings numerous benefits. Primarily, the access methods required by various types of data relations are transparent to the Delphi components. This enables the developer to concentrate on building her expertise in areas such as interface issues and manipulative code rather than spreading her attention among the various requirements of the data manipulation commands required by the table. In addition, the command transparency allows a common command set to address a combination of table types, both local and remote simultaneously, in a client/server environment.

Was this article helpful?

0 0

Post a comment