Guidelines When Editing Case Model Database Scripts

Data Admin enables you to obtain the CREATE/UPDATE/DROP database scripts created from the successful deployment of an application that uses case data.

Although editing the scripts is possible, TIBCO does not recommend this unless it is essential and there are only a few changes that you are allowed to make.

Note:
  • No validation is performed on the scripts when you edit them in Data Admin. This means it is possible to make invalid changes to your scripts.
  • If the CREATE script is changed (for example, index or foreign key names), then you must edit the UPDATE/DROP scripts, to reflect the changes.
  • If you have edited an UPDATE script and the business object model is updated, then the new UPDATE script that is generated restores the original values and settings. This means you must manually edit the newly generated UPDATE script with your changes.
If a change is not listed in the table below, you cannot make that change to the script.
Item Description
Comments The addition of comments using either single line comments ("--") or multiple line comments ("/* ... */") is supported. Note that:
  • Oracle REMARK and REM comments are not supported.
  • if a business object model is updated and deployed, then all of the comments in the previous database scripts are lost.
Splitting the script over several lines You can split the database over several lines (for example, by adding carriage returns). Note that:
  • the meaning of the script cannot be changed.
  • each statement must be delimited by a semi-colon.
Changing a Foreign Key Name You can change the name of a foreign key. However, the new name assigned to the foreign key must not start with the BDS table prefix value (BDS_ by default) or the BDS index prefix value (IDX_ by default).
Changing an Index Name You can change the name of an Index. However, the new name assigned to the index must not start with the BDS table prefix value (BDS_ by default) or the BDS index prefix value (IDX_ by default).
Increasing the Size of a String Column You can increase the size of a string column in the database (but not to a CLOB). However, if you specified a data size in the business object model, any process instances that reference the business object model will use the size limit specified in the business object model until a new version of the business object model is deployed.
Increasing the Size of a Number Column You can increase the size of a number column in the database. However, if you specified a data size in the business object model, any process instances that reference the business object model will use the size limit specified in the business object model until a new version of the business object model is deployed.
Adding Additional Indexes You can add an additional index (either, unique or composite). Note that:
  • the index must not break the integrity of the database representation of the business object model.
  • the index must not start with the BDS table prefix value (BDS_ by default) or the BDS index prefix value (IDX_ by default).
  • If you are adding an index to the CREATE script then you must manually remove the index from the DROP script so that the table can be dropped successfully.
Adding Check Constraints You can add CHECK constraints to a table for force compliance to a given requirement. For example:
ALTER TABLE table_name 
           ADD CONSTRAINT constraint_name CHECK (predicate)
 
Note that:
  • The name of this constraint must not start with the BDS table prefix value (BDS_ by default) or the BDS index prefix value (IDX_ by default).
  • If you are adding a constraint to the CREATE script then you must manually remove the constraint from the DROP script so that the table can be dropped successfully.
  • The constraint must still abide by the restrictions defined in the business object model. This is to ensure that any data that is valid against the business object model, can still be inserted into the altered table.
Refining Indexes

You can refine an index that has been created in the default database scripts. You can do this by editing the CREATE/UPDATE script before it is run, or by running an ALTER INDEX command on the database directly.

This allows you to edit an index to include such things as storage, unique, clustered, non-clustered and so on. Any changes you make to the index must match the design of the business object model used to generate the original scripts.

Changing Default Tablespace You can change the default tablespace when installing TIBCO ActiveMatrix BPM by supplying the new tablespace name as part of the BDS Global Data installation.