Results of the Define Command

The define command automatically does the following with table names and column names:

  • Data set, data item, and set names are typically converted to lowercase for their equivalent relational database table, column, and index names. For more details on how this actually occurs, see Relational Database Table and Column Names.
  • Secondary table names are constructed by appending an underscore followed by the lowercase data item name (for which the table is constructed) to the primary table name. For example, if a DMSII data item named SALES, which has an OCCURS clause, appears in a data set named CUSTOMERS, the relational database table generated for the OCCURS item is named customers_sales. For more details, see Handling DMSII OCCURS.
  • The suffix _x is appended to all object names that are relational database reserved words. For example, if a DMSII data set is named ORDER, which is a relational database reserved word, the table generated for the ORDER data set is named order_x. Likewise, for a DMSII data item named COUNT, which is also a relational database reserved word, the corresponding column would be named count_x.
  • Some relational databases limit table and index names to 30 characters. However, the DATABridge Client adds two-character prefixes to table names (i_, u_, and d_) when constructing the names of the stored procedures it uses to insert, update, and delete records from these tables. The result is that table names are actually limited to 28 characters.
  • The DATABridge Client checks table and index names to see if they duplicate existing table and index names that DATABridge previously created. DATABridge recognizes only those relational database objects that it has created. When the DATABridge Client finds a duplicate name, it makes the name unique in one of the following ways:
    • Appending a numeric suffix. For a data set named ITEM that must be split into three tables, the resulting table names would be as follows: item, item1, item2.
    • If the name is too long to add a suffix, overwriting as many of the last characters as necessary with numeric characters to make the name unique.