/******************************************************************************/
/**** Generated by IBExpert 08.09.2015 23:46:34 ****/
/******************************************************************************/
/******************************************************************************/
/**** Following SET
SQL DIALECT is just for the Database Comparer ****/
/******************************************************************************/
SET
SQL DIALECT 3;
/******************************************************************************/
/**** Tables ****/
/******************************************************************************/
CREATE TABLE PRODUCT (
ID NUMERIC(18,0) NOT NULL,
CATEGORY_ID NUMERIC(18,0) NOT NULL,
TITLE VARCHAR(50) NOT NULL,
ACTOR VARCHAR(50) NOT NULL,
PRICE NUMERIC(12,2) NOT NULL,
SPECIAL SMALLINT
);
/******************************************************************************/
/**** Primary keys ****/
/******************************************************************************/
ALTER TABLE PRODUCT ADD CONSTRAINT PK_PRODUCT PRIMARY KEY (ID);
/******************************************************************************/
/**** Foreign keys ****/
/******************************************************************************/
ALTER TABLE PRODUCT ADD CONSTRAINT FK_PRODUCT FOREIGN KEY (CATEGORY_ID) REFERENCES CATEGORY (ID);
/******************************************************************************/
/**** Indices ****/
/******************************************************************************/
CREATE INDEX IX_PROD_ACTOR ON PRODUCT (ACTOR);
CREATE INDEX IX_PROD_CATEGORY ON PRODUCT (CATEGORY_ID);
CREATE INDEX IX_PROD_SPECIAL ON PRODUCT (SPECIAL);
CREATE INDEX IX_PROD_TITLE ON PRODUCT (TITLE);
CREATE DESCENDING INDEX PRODUCT_IDX2 ON PRODUCT (ID);
/******************************************************************************/
/**** Privileges ****/
/******************************************************************************/