Load Definitions Facility

The IDE provides a facility for loading database table definitions from the data dictionary of the selected DBMS into the Uniface model. This is useful when you are creating a Uniface application that is designed to access an existing database. Known as the Load Definitions facility, it is located in the Tables tab of the Project Editor's Resource Browser.

Note:  The Load Definitions facility is not supported for all databases. For more information, see Supported Uniface Database Facilities.

Functionality

The Load Definitions facility reads the data dictionary in your DBMS, and creates or updates the specified application model with entities and fields based on the imported definitions. More specifically:

  • It attempts to create a new entity in the application model for each table retrieved from the DBMS dictionary. The name of the table is converted to uppercase in Uniface. If an entity already exists for that table name, no new entity is created.
  • It assigns each column name to the corresponding entity as a field. The appropriate data type and interface definition are automatically defined for each field property.
  • If possible, it creates key definitions for the indexes on each table. Uniface searches for a unique index to use as the primary key. If the table has multiple unique indexes, for most DBMSs, it creates the primary key based on primary key constraints, but it could also use the first index encountered. Other indexes become candidate keys or indexes.
  • For some databases, it also loads relationships and foreign keys.

Using Load Definitions

Before using the facility, you need to configure Uniface to access the data dictionary of the DBMS. The precise paths and assignments required vary with the DBMS. You must also have the appropriate privileges to read DBMS system tables.

Load Definitions is available in the Uniface IDE—open a Project and go to the Tables tab in the Resource Browser.

For more information, see Import Data Definitions From a DBMS .

Related Topics