Implement Referential Integrity in the Database

For some database systems, you can have the DBMS (instead of Uniface) manage referential integrity. To do so you need to execute the scripts created by the Create Script facility of the IDE in the target database.

To run the scripts:

  1. Edit the scripts to specify the target database name.
  2. Execute the validate RI scripts.
  3. Investigate and resolve any reported violations of referential integrity.
  4. Execute the create RI scripts to enforce referential integrity.
  5. Edit the application assignment file to configure the connector for database referential integrity support.

    DBMS connectors that support referential integrity in the database use a connector option to disable or enable Uniface referential integrity. The name of this option is DBMS-specific and the default state depends on the DBMS connector used. See the relevant documentation for the options available for your DBMS connector.

    For example, for a Microsoft SQL database, add MSS settings to the assignment file, including the dbms ri option to disable Uniface referential integrity.

    [DRIVER_SETTINGS]
    MSS     U5.2
    USYS$MSS_PARAMS identifiers = quoted, procedures=on, dbms ri

    See the relevant connector documentation for your DBMS connector.

Related Topics