Tutorials > Content management > Create a content-managed resource > Creating the new resource

< Previous | Next >


Create a new table

In this step we will create a new table to represent the new resource.


Procedure

  1. In WebSphere Commerce Developer, switch to the Server view.

  2. Open a browser and type the following URL: http://localhost/webapp/wcs/admin/servlet/db.jsp

  3. In the input box, enter the following SQL statement to create the EXTCATALOGDSC table.

    create table EXTCATALOGDSC (
        CATALOG_ID BIGINT NOT NULL,
        LANGUAGE_ID INTEGER NOT NULL, 
        LASTMODIFIED TIMESTAMP, 
        FRONTIMG VARCHAR(254), 
        BACKIMG VARCHAR(254), 
        SIDEIMG VARCHAR(254),
        TOPIMG VARCHAR(254), 
        OPTCOUNTER SMALLINT NOT NULL, 
        constraint p_EXTCATALOGDSC primary key (CATALOG_ID, LANGUAGE_ID), 
        constraint f_EXTCATALOGDSC foreign key (LANGUAGE_ID, CATALOG_ID) 
        references CATALOGDSC (LANGUAGE_ID, CATALOG_ID) on delete cascade);
    

  4. Click Submit Query. A message should be returned stating that 0 updates were made.

    IBM recommends that a content managed table have a numeric primary key to support locking.

< Previous | Next >


+

Search Tips   |   Advanced Search