Database Definition Structure Explained

    Database Definition Structure Explained


    Article summary

    The definition structure shows the relationships between tables in the database, and lets you create soft-keys (foreign key relationships between tables that exist only in Enterprise Test Data, not in the DBMS.

    1. Database Structure

    Begin in the Definition Structure Details pane of the definition you want to work with, by clicking on Data Dictionary in the Master Data Management section of the Navigation Panel. Then select the Definitions Structure tab and select your definition.

    The Definition Structure Details pane opens. Superficially, this looks very similar to the Definition Details pane, however it has Child and Parent buttons next to each table, and a Relationships column. This shows the number of other tables each table is related to.

    Click on a table to expand it by clicking on the arrow button to the left of the table name. The Beneath it, the tables it is related to are displayed, and whether the relationship is a parent or child, and if it is a soft key relationship. In this case the Customer_Bank_Account relationship only exists in Quality Modeller. It doesn’t exist in the DBMS.

    Each relationship can be expanded, showing that table’s foreign keys, and you can keep on expanding deeper into the structure until all the relationships from the root table are shown.


    2. Creating a Soft Key

    There are two places you can create a soft key. You can click on the green Child or Parent buttons,

    Or by selecting the table from the Content section, then in the Foreign Keys section of the Table Details pane, clicking on either of the buttons at the top right.

    The New Foreign Key box appears. Give the foreign key relationship a name, then select the Parent or Child table from the dropdown.

    Finally, click on the blue Add column reference button and select the Local and Referenced columns from the dropdowns, and click on OK.


    3. Deleting a Soft Key

    From either the Definitions or Definitions Structure tabs, select the definition for your database connection, then, in the Content section, click on the table where you created the soft key. The Table Details pane opens. The Soft key column shows a tick if a relationship is a soft one, or a cross if it’s not. Click on the red X button to delete the relationship.

    Note that you can delete hard foreign keys (ones also found in the database) using this method. This doesn’t delete the key in the database, only in Quality Modeller.