The c_cat.sql command file
The following command file creates the catalog table.
It contains a constraint, aa, which allows you to practice
with cascading deletes by running the SQL statements in the alt_cat.sql and del_stock.sql
command files on a database with logging.
CREATE TABLE catalog
(
catalog_num SERIAL(10001),
stock_num SMALLINT NOT NULL,
manu_code CHAR(3) NOT NULL,
cat_descr TEXT,
cat_picture BYTE,
cat_advert VARCHAR(255, 65),
PRIMARY KEY (catalog_num),
FOREIGN KEY (stock_num, manu_code) REFERENCES stock
CONSTRAINT aa
);