BaanERP supports a three-tier architecture consisting of a user interface tier, an application tier, and a database tier. The user interface tier provides presentation and input services for user interaction. The application tier consists of the BaanERP application server and the application programs. The database tier includes the BaanERP database driver and a third party RDBMS product that acts as the database server.
Figure 1 depicts the BaanERP architecture. The emphasis of this document is the BaanERP database driver. The database driver is the interface between the BaanERP applications and the RDBMS server. The database driver translates database requests from the BaanERP application server to RDBMS specific SQL requests that it sends to the database server. After the database server retrieves the requested information, the database driver then passes the data back to the BaanERP application server.
Figure 1: BaanERP three-tier architecture:
User Interface Tier
The user interface tier consists of the BaanERP user interface for Microsoft Windows (called 'BW') and for Internet browsers (called 'BI'). Data input from the user through BW or BI is relayed to the BaanERP application server; data returned from the BaanERP application server is displayed to the user in graphical form by the user interface.
The application tier includes both the application programs and the BaanERP application server. Together, the application programs and the application server provide much of the functionality of BaanERP. The application programs include the compiled BaanERP applications and the data dictionary. The BaanERP applications are written in the Baan 4GL programming language with embedded SQL using the development environment provided by the BaanERP Tools package.
The BaanERP application server schedules and runs the application programs, sends and receives information to and from the user interface server, and initiates an instance of the database driver as necessary for communication with the database server. A running database driver can support multiple connections to a single RDBMS instance. If a BaanERP installation stores data tables in multiple databases, the application server must start one instance of the database driver for each database with which it must communicate. The BaanERP application server has traditionally been called `Baan shell' or simply `bshell'. Throughout the remainder of this document, it is referred to as the BaanERP application server or the application server.
The database tier consists of the BaanERP database driver and the database server. The database driver provides a common interface between the BaanERP application server and the database server. Communication between the application server and the database driver is the same, no matter which RDBMS product is used as the database server. There is one database driver for each of the RDBMS products that BaanERP supports. Communication between the database driver and the database server is tailored to the RDBMS being used. The database driver communicates with the RDBMS through structured query language (SQL) statements and the native application programming interface (API) of the RDBMS.
The database server consists of one of five third party RDBMS products: Oracle, Informix, Sybase, DB2, or Microsoft SQL Server. All BaanERP application data is stored in a relational database managed by an RDBMS. It is possible to have multiple RDBMS products in one BaanERP installation, with some data residing in one database server and other data residing in another.
Data Flow through the BaanERP Architecture
Note that the database driver provides an interface between the BaanERP application server and the specific DBMS server being used. The flow of data through the system is described below.
When a user performs an operation at a GUI workstation, the user interface server interprets the input and sends the information to the BaanERP application virtual machine. Based on the information it receives, the application server causes the appropriate application object to be executed.
When a running application object requires information that is stored in the database, the application server sends the request to the database driver. Data requests from the client applications are RDBMS independent and are made using BaanERP SQL, an RDBMS independent SQL language.
When the application server executes a database query from an application program, it first determines whether or not there is a running database driver available to process the query. If there is no database driver running, or if the running database driver instances are communicating with a database server other than the one storing the needed data, the application server starts a new instance of the database driver. The application server parses the BaanERP SQL database query it receives from the application object and sends an internal representation of the query to the database driver. The internal representation of the query that the database driver receives is still RDBMS independent.
The database driver translates the database query into an appropriate query using SQL statements compatible with the specific RDBMS being used. Each database driver takes advantage of the design of the particular RDBMS that it supports so that the resulting SQL statements are valid for the RDBMS and provide the best possible performance. The RDBMS specific SQL statements are then submitted to the RDBMS server, which processes the data request. When the RDBMS has processed the query, it returns the data to the database driver. Any error conditions are caught and handled by the database driver. The database driver then returns the data and status information to the application server, where it provides the information to the application that requested it. The application server may also send a message to the user interface server, which displays an appropriate message on the users workstation.
BaanERP Hardware Configurations
Several hardware configurations are supported for a BaanERP implementation. These configurations include standalone mode and many variations of client/server mode. Available hardware, data storage requirements, and performance expectations determine the most appropriate hardware configuration.
Standalone mode refers to a configuration where all components of the BaanERP architecture run on a single machine. In standalone mode, an end user can work from the host machine or from a thin client machine, such as an X-Terminal running BI. The standalone mode configuration is illustrated in Figure 2.
Figure 2.: Standalone mode configuration:
In a client/server configuration, the components of the BaanERP architecture are distributed over two or more machines. There are many client/server configurations. The most common configurations are described here. The simplest client/server configuration is sometimes thought of as a variation of standalone mode. In this configuration, the application tier, database driver and RDBMS are on one machine, while the display drivers are distributed among the user workstations. An instance of the application server and at least one instance of the database driver is started for each user. All users have access to the same application programs and database servers. This configuration is illustrated in Figure 3.
When two machines are available to be used as servers, the application tier is placed on one server, while the database driver and the database server are placed on another. As with the previous configuration, an instance of the application server and at least one instance of the database driver is started for each user. All users have access to the same application programs and database servers. This client/server configuration is illustrated in Figure 4. This configuration uses the BaanERP method of client/server access between the application server and the database server.
Figure 3: Application and Database Server on the same computer:
Figure 4.: Application and Database Server on different computters: