WebSphere Commerce database schema

The WebSphere Commerce database model was designed for data integrity and optimal performance. WebSphere Commerce provides several hundred tables that store WebSphere Commerce instance data. To maintain data integrity, and to ease maintenance referential integrity, constraints are widely used in the database model. Indexes are used carefully on tables to avoid over-indexing and to provide a good balance between data retrieval and data manipulation activities (insert and update). The business rules are implemented at the application level rather than by using database trigger. Triggers, however, are used to facilitate data staging and optimistic locking. A limited number of SQL-based database stored procedures are used for data intensive activities.

We can extend the schema, the following section lists supported extensions to the WebSphere Commerce schema:


Tables

We can change the physical properties of a database table such as the table space, or physical property change. To support new JPA entities, or JSP pages new tables can be added. When you add a table, consider optimistic locking. After you migrate to a new release of WebSphere Commerce, any customized tables must to be reapplied.

Do not drop or rename an existing table. This action can cause code breakage and migration problems. If the database schema includes custom tables and the site supports workspaces, ensure that our custom tables are synchronized between your base schema and workspace schema. Synchronize your tables after you modify a table on your authoring environment, such as to change a column or index, and when creating a table, regardless of whether your new or changed table is content-managed. Use the appropriate Ant task to synchronize your base schema and workspace schema. We can run the update workspaces schema task when you change your base schema, such as to include a new table, or run the update workspace table task when you change only a table, such as when you modify a column. See the following topics:


Columns

We can increase the size of a column or change the data type to another compatible type. There might be a performance impact if the size of the column is increased.

To customize, issue DDL statements, then change all JSP pages that use the columns. Data might need to be moved, for example DB2 long to CLOB.

The following changes to columns are not supported:

The columns that are prefixed " UP_ " are auto-generated columns for DB2 databases to support case-insensitive, Management Center search. These prefixed columns are direct copies of the referenced non-prefixed columns, but with the content of the prefixed column in all uppercase characters for use in non-case-sensitive searches. Do not edit these prefixed columns or the content within the prefixed columns. If the contents of the prefixed and non-prefixed column do not match, an error is thrown.


Primary and foreign keys

Foreign keys can be added between a new custom table and an existing table, or between two custom tables. The cascade delete condition can be changed. If the tables are not used, existing foreign keys can be removed.

The following changes are not supported:


Indexes

The following changes are supported

The following changes are not supported:

Note: The Primary Key name for tables can be system-generated. If this name is system generated it displays in the database table descriptions in the following format:

Previously, the system generated names display in one of the following formats:


Triggers

We can customize triggers by using DDL statements and DB procedural language. Any customization to triggers might have a performance impact as the new triggers could slow down DDL statements on other tables.

Additional staging, performance, and business auditing triggers can be added.

The following changes are not supported:


Stored procedures

We can add new stored procedures for customized code.

The following changes are not supported:


Functions

The WebSphere Commerce schema does not contain any custom functions. Custom functions are not supported.

We can add column functions such as AVG, Max, and Min.