Uniface Database I/O

Uniface allows you to access data in multiple DBMSs in a uniform way, simultaneously. The term DBMS is used generically here to describe any structured form of data storage that Uniface understands. According to this definition, a record management system is also a DBMS. All the actions carried out on database tables or files occur via the DBMS interface.

DBMS Interface

DBMS Interface communicates with DBMS connectors

The DBMS interface comprises a standard set of calls that handle every action you want to carry out. For example, the DBMS interface generates a select call when a user tries to retrieve data from the database and a write call for inserting data into the database.

DML and DDL

The DBMS interface accesses a DBMS via a DBMS connector, which translates the Uniface calls into the Data Definition Language (DDL) or Data Manipulation Language (DML) of whichever DBMS you are using.

For example, a user can retrieve data from a database by clicking a button that invokes the ^RETRIEVE structure editor function. This initiates the following sequence of events:

  1. The ^RETRIEVE function activates the retrieve trigger ProcScript module for the component.

  2. The retrieve ProcScript statement in the <Retrieve> trigger activates the read trigger for every entity in the component.

  3. The read ProcScript statement in the read trigger of each entity causes the DBMS interface to issue the S (Select) call to the DBMS connector in the path, for each retrieved occurrence of each entity.

  4. The DBMS connector selects the required data from the database using the correct DML.

Provided you do not use DBMS-specific functionality such as SQL code (with the sql ProcScript instruction), you can port your Uniface application to drive many different DBMSs without recoding. The calls from Uniface always remain the same, although the implementation can differ between DBMSs.