Note that the database driver provides an interface between the Baan ERP application server and the specifi c RDBMS 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 Baan ERP application virtual ma- chine. 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.