CREATE TABLE LOCATIONS.T (LOCATION_CODE CHAR(7) FMT '7L' PRIMARY KEY, DESCRIPTION VARCHAR FMT '25T', NAME VARCHAR FMT '25T', ADR1 VARCHAR FMT '25T', ADR2 VARCHAR FMT '25T', ADR3 VARCHAR FMT '25T', PHONE VARCHAR FMT '12L', FAX VARCHAR FMT '8L', ACRES INT FMT '5R', SEATS INT FMT '5R', PARKS INT FMT '5R', MEDIA_NAME VARCHAR FMT '25L' MULTIVALUED NOT NULL ROWUNIQUE, MEDIA_CONTACT VARCHAR FMT '25L' MULTIVALUED, MEDIA_PHONE VARCHAR FMT '12L' MULTIVALUED, MEDIA_FAX VARCHAR FMT '8L' MULTIVALUED, GOV_AGENCY VARCHAR FMT '25L' MULTIVALUED NOT NULL ROWUNIQUE, GOV_CONTACT VARCHAR FMT '25L' MULTIVALUED, GOV_PHONE VARCHAR FMT '12L' MULTIVALUED, GOV_FAX VARCHAR FMT '8L' MULTIVALUED, GOV_FEE DEC(9,2) FMT '12R' MULTIVALUED, GOV_CHECK VARCHAR FMT '5L' MULTIVALUED, GOV_RATE DEC(3,3) FMT '7R' MULTIVALUED, ASSOCIATION MEDIA_ASSOC (MEDIA_NAME KEY, MEDIA_CONTACT, MEDIA_PHONE, MEDIA_FAX), ASSOCIATION GOV_ASSOC (GOV_AGENCY KEY, GOV_CONTACT, GOV_PHONE, GOV_FAX, GOV_FEE, GOV_CHECK, GOV_RATE)); CREATE TABLE LIVESTOCK.T (ANIMAL_ID INT FMT '5R' PRIMARY KEY, NAME VARCHAR FMT '10T', DESCRIPTION VARCHAR FMT '10T', USE CHAR(1) FMT '1L', DOB DATE CONV 'D2/', ORIGIN VARCHAR FMT '12T', COST DEC(9,2) FMT '12R', EST_LIFE INT FMT '3R', VAC_TYPE CHAR(1) FMT '1L' MULTIVALUED NOT NULL ROWUNIQUE, VAC_DATE DATE CONV 'D2/' MULTIVALUED, VAC_NEXT DATE CONV 'D2/' MULTIVALUED, VAC_CERT VARCHAR FMT '6L' MULTIVALUED, ASSOCIATION VAC_ASSOC (VAC_TYPE KEY, VAC_DATE, VAC_NEXT, VAC_CERT)); CREATE TABLE VENDORS.T (VENDOR_CODE INT FMT '5R' PRIMARY KEY, COMPANY VARCHAR FMT '25T', ADR1 VARCHAR FMT '25T', ADR2 VARCHAR FMT '25T', ADR3 VARCHAR FMT '25T', TERMS VARCHAR FMT '10T', CONTACT VARCHAR FMT '25T', PHONE VARCHAR FMT '12L', FAX VARCHAR FMT '8L', EQUIP_CODE INT FMT '5R' MULTIVALUED, ITEM_CODE INT FMT '5R' MULTIVALUED NOT NULL ROWUNIQUE, LEAD_TIME INT FMT '5R' MULTIVALUED, ASSOCIATION PROD_ASSOC (ITEM_CODE KEY, LEAD_TIME)); CREATE TABLE INVENTORY.T (ITEM_CODE INT FMT '5R' PRIMARY KEY, ITEM_TYPE CHAR(1) FMT '1L', DESCRIPTION VARCHAR FMT '25T', QOH INT FMT '5R', COST DEC(9,2) FMT '12R', PRICE DEC(9,2) FMT '12R', VENDOR_CODE INT FMT '5R' MULTIVALUED NOT NULL ROWUNIQUE REFERENCES VENDORS.T, ORDER_QTY INT FMT '5R' MULTIVALUED, ASSOCIATION ORDERS_ASSOC (VENDOR_CODE KEY, ORDER_QTY)); CREATE TABLE EQUIPMENT.T (EQUIP_CODE INT FMT '5R' PRIMARY KEY, VENDOR_CODE INT FMT '5R' REFERENCES VENDORS.T, VENDOR_REF VARCHAR FMT '10L', DEPRECIATION CHAR(1) FMT '1L', DESCRIPTION VARCHAR FMT '25T', COST DEC(9,2) FMT '12R', USE_LIFE INT FMT '5R', TAX_LIFE INT FMT '5R', VOLTS INT FMT '5R', PURCHASE_DATE DATE CONV 'D2/'); CREATE TABLE RIDES.T (RIDE_ID INT FMT '5R' PRIMARY KEY, DESCRIPTION VARCHAR FMT '20T', OPERATOR INT FMT '5R' MULTIVALUED, EQUIP_CODE INT FMT '5R' MULTIVALUED REFERENCES LIVESTOCK.T); CREATE TABLE ACTS.T (ACT_NO INT FMT '5R' PRIMARY KEY, DESCRIPTION VARCHAR FMT '6T', DURATION INT FMT '5R', OPERATOR INT FMT '5R' MULTIVALUED, ANIMAL_ID INT FMT '5R' MULTIVALUED REFERENCES LIVESTOCK.T, EQUIP_CODE INT FMT '5R' MULTIVALUED REFERENCES EQUIPMENT.T); CREATE TABLE PERSONNEL.T (BADGE_NO INT FMT '5R' PRIMARY KEY, DOB DATE CONV 'D2/', BENEFITS VARCHAR FMT '10T', NAME VARCHAR FMT '25T', ADR1 VARCHAR FMT '25T', ADR2 VARCHAR FMT '25T', ADR3 VARCHAR FMT '25T', PHONE VARCHAR FMT '12L', DEP_NAME VARCHAR FMT '10T' MULTIVALUED NOT NULL ROWUNIQUE, DEP_DOB DATE CONV 'D2/' MULTIVALUED, DEP_RELATION VARCHAR FMT '5L' MULTIVALUED, EQUIP_CODE INT FMT '5R' MULTIVALUED NOT NULL ROWUNIQUE REFERENCES EQUIPMENT.T, EQUIP_PAY DEC(5,2) FMT '10R' MULTIVALUED, ACT_NO INT FMT '5R' MULTIVALUED NOT NULL ROWUNIQUE REFERENCES ACTS.T, ACT_PAY DEC(5,2) FMT '10R' MULTIVALUED, RIDE_ID INT FMT '5R' MULTIVALUED NOT NULL ROWUNIQUE REFERENCES RIDES.T, RIDE_PAY DEC(5,2) FMT '10R' MULTIVALUED, ASSOCIATION DEP_ASSOC (DEP_NAME KEY, DEP_DOB, DEP_RELATION), ASSOCIATION EQUIP_ASSOC (EQUIP_CODE KEY, EQUIP_PAY), ASSOCIATION ACTS_ASSOC (ACT_NO KEY, ACT_PAY), ASSOCIATION RIDES_ASSOC (RIDE_ID KEY, RIDE_PAY)); CREATE TABLE CONCESSIONS.T (CONC_NO INT FMT '5R' PRIMARY KEY, DESCRIPTION VARCHAR FMT '25T', OPERATOR INT FMT '5R' MULTIVALUED REFERENCES PERSONNEL.T, EQUIP_CODE INT FMT '5R' MULTIVALUED REFERENCES EQUIPMENT.T, ITEM_CODE INT FMT '5R' MULTIVALUED NOT NULL ROWUNIQUE REFERENCES INVENTORY.T, QTY INT FMT '5R' MULTIVALUED, ASSOCIATION STOCK (ITEM_CODE KEY, QTY)); CREATE TABLE ENGAGEMENTS.T (LOCATION_CODE CHAR(7) FMT '7L', "DATE" DATE CONV 'D2/', "TIME" TIME CONV 'MTH', ADVANCE DEC(9,2) FMT '12R', GATE_NUMBER INT FMT '5R' MULTIVALUED NOT NULL ROWUNIQUE, GATE_REVENUE DEC(9,2) FMT '12R' MULTIVALUED, GATE_TICKETS INT FMT '5R' MULTIVALUED, ACT_NO INT FMT '5R' MULTIVALUED NOT NULL ROWUNIQUE REFERENCES ACTS.T, RIDE_ID INT FMT '5R' MULTIVALUED NOT NULL ROWUNIQUE REFERENCES RIDES.T, RIDE_REVENUE DEC(9,2) FMT '12R' MULTIVALUED, RIDE_TICKETS INT FMT '5R' MULTIVALUED, CONC_ID INT FMT '5R' MULTIVALUED NOT NULL ROWUNIQUE REFERENCES CONCESSIONS.T, CONC_REVENUE DEC(9,2) FMT '12R' MULTIVALUED, CONC_TICKETS INT FMT '5R' MULTIVALUED, LABOR INT FMT '5R', PAY DEC(5,2) FMT '10R', ASSOCIATION GATES_ASSOC (GATE_NUMBER KEY, GATE_REVENUE, GATE_TICKETS), ASSOCIATION CONCS_ASSOC (CONC_ID KEY, CONC_REVENUE, CONC_TICKETS), ASSOCIATION RIDES_ASSOC (RIDE_ID KEY, RIDE_REVENUE, RIDE_TICKETS), PRIMARY KEY (LOCATION_CODE, "DATE"));