Custom table space names

There are two types of tables: static tables and runtime tables. The Product Master creates tables by two methods.

Static tables
These tables are created during installation phase when you run the create_schema.sh script.
Runtime tables
These tables are created during run time when the following functions are used:
  • Creating user-defined logs
  • Deleting a catalog
  • Importing items
  • Integrity verification scripts
  • Docstore Maintenance script
By default, table spaces USERS, INDX, and BLOB_TBL_DATA are used for creating Product Master database tables. Table space name customization for overriding default table space names is available in the following section.

This custom table space function addresses the deployment issues and is for new installations only, so there are no migration issues. If you have an existing system that is deployed, your DBA must manually change the table space names for all tables under Product Master database schema on an appropriate maintenance window. Also, the table space parameter in the common.properties file must be updated to new table space names where you want the runtime tables to be created.

Table space names for static tables

Product Master creates tables during installation phase by using default table space names: USERS, INDX, and BLOB_TBL_DATA.

A table space mapping file can be used to define custom table space names instead of the default table space names that are mentioned previously. This file is a comma-delimited text file that maps the tables, table spaces, and index table spaces together. This file is used as a parameter for the create_schema.sh script, for example:

$TOP/bin/db/create_schema.sh --tablespace=<table space name mapping file>

The table space name mapping file has the following format for each line:

table_name,(table_tablespace_name), (index_tablespace_name)
As shown previously, both table_tablespace_name and index_tablespace_name are optional. For example:
tctg_sel_selection,ctg_tables,
tctg_dys_dynamic_selection,ctg_tables,
tctg_itm_item,
tctg_itd_item_detail,ctg_tables,ctg_indx
tctg_ita_item_attributes,ctg_tables,ctg_indx

The table space name mapping file includes the following properties:
  • If any of the table_tablespace_name and index_tablespace_name are not specified, the default table space names are used.
  • All the tables that are used by Product Master is not included in the mapping file, use the default table space names.
  • Blank lines are ignored.
  • Lines that start with # are considered as comment lines and are ignored, for example:
    #----------------------------
    # This is a comment line
    #----------------------------
A default mapping file is in: $TOP/src/db/schema/gen/ tablespace_name_mapping_file.txt

This file follows the format that is specified previously and it can be used as a template for customizing table space names. It includes all required table spaces that are created during installation phase of Product Master.

In production environments, it is ideal to use the table spaces as outlined in the table space requirements section, so highly used tables such as itd, ita, itm, icm, and lck are stored in separate table spaces and buffer pools. This separation helps to improve overall performance. To do so, you need to create a table space mapping file with the following contents:

tctg_itd_item_detail,itd_data,itd_ix
tctg_ita_item_attributes,ita_data,ita_ix
tctg_itm_item,itm_data,itm_ix
tctg_icm_item_category_map,icm_data,icm_ix
tutil_lck_lock,lck_data,lck_ix

Table space names for runtime tables

IBM® Product Master creates tables during run time by using default table space names: USERS and INDX.

The default table space names can be changed through the $TOP/etc/default/common.properties file.

You can change these default table space names on these parameters in the user_tablespace_name and index_tablespace_name file. For example,

user_tablespace_name=data
index_tablespace_name=index
In this example data and index replaces USERS and INDX table spaces. These table spaces are used for tables that are created during run time.

Important: These properties are optional. If any of them is not defined, the hardcoded default values are used.
Note: The properties user_tablespace_name and index_tablespace_name are not listed in the $TOP/etc/default/common.properties directory. If you intend to change your table space names, then you need to add these properties to the $TOP/etc/default/common.properties directory and set the required values.

After you modify the table space name parameters, Product Master must be restarted. You must ensure that the table spaces are created and usable by Product Master database user before you restart.