A UDS/SQL database cannot be accessed by the database application program directly, unlike the data of a conventional file for example. Instead, access to the database is controlled by the Database Handler (DBH), which thus relieves the application program of all administrative duties, e.g. such as arise when data is stored.
The Database Handler exists in two forms:
independent DBH
linked-in DBH.
The independent DBH is implemented as an autonomous task family. It accepts database calls from the application programs, performs accesses to the database and transports the data to be processed between the database and the work area in the application program.
The DBH also monitors all database activities and conducts a dialog with the database administrator, i.e. it reports any errors that occur and receives the database administrator’s instructions.
The independent DBH has multi-database capability, i.e. can manage several databases simultaneously. All databases in the multi-DB configuration can be accessed by a database application program via this DBH, even within a single transaction.
The ONLINE-PRIVACY utility routine is used with the independent DBH.The UDS-ONLINE-UTILITY utility routine can be used with the independent DBH and with the linked-in DBH.
Figure 1: Principle of the independent DBH
The linked-in DBH is not an autonomous program. The modules of the linked-in DBH are linked into the database application program; they run as part of this program. When the program wants to access a database, it invokes the DBH. The DBH accesses the database and writes data from the UWA of the program to the database or delivers data requested from the database to the UWA.
As the task communication which is necessary between the tasks of the task family and the user tasks when the independent DBH is used does not apply in the case of the linked-in DBH, the runtime of an application program which is used individually can be shortened.
The linked-in DBH cannot process SQL statements.
The linked-in DBH has multi-DB capability, i.e. a DB application program that works with the linked-in DBH can access several databases. Unless the DBH opens these databases for read-only access (SHARED-RETRIEVAL), they are barred to all other programs during the linked-in application.
UDS/SQL utility routines that need the DBH in general operate with the linked-in DBH. This also applies to the DDL and SSL compilers, which work with a mono-DB configuration, i.e. always address only a single database.
The UDS-ONLINE-UTILITY utility routine can be used with the linked-in DBH and also with the independent DBH.
Figure 2: Principle of the linked-in DBH