Tutorials > Content management > Create a content-managed resource > Creating the new resource
Create a new table
In this step we will create a new table to represent the new resource.
Procedure
- In WebSphere Commerce Developer, switch to the Server view.
- Open a browser and type the following URL: http://localhost/webapp/wcs/admin/servlet/db.jsp
- 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);
- 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.