OREIGN KEY (Ow_comp) REFERENCES Deliverer (Ow_comp)); TABLE Good (CONSTRAINT R_2 FOREIGN KEY (ID_warehouse) REFERENCES Warehouse (ID_warehouse)); TABLE Ord (CONSTRAINT R_4 FOREIGN KEY (ID_good) REFERENCES Good (ID_good)); TABLE Ord (CONSTRAINT R_5 FOREIGN KEY (N_S_ord) REFERENCES Orderer (N_S_ord)); TABLE Ord_del (CONSTRAINT R_7 FOREIGN KEY (ID_ordering, Summ, N_S_ord, Delivery) REFERENCES Ord (ID_ordering, Summ, N_S_ord, Delivery)); TABLE Ord_del (CONSTRAINT R_8 FOREIGN KEY (N_S_cour, Phone_cour, ID_courier) REFERENCES Courier (N_S_cour, Phone_cour, ID_courier)); TABLE Players (FOREIGN KEY (ID_good, Producer, Model, Price, Others) REFERENCES Good (ID_good, Producer, Model, Price, Others) ON DELETE CASCADE); TABLE Proectors (FOREIGN KEY (ID_good, Producer, Model, Price, Others) REFERENCES Good (ID_good, Producer, Model, Price, Others) ON DELETE CASCADE); TABLE TV_monit (FOREIGN KEY (ID_good, Producer, Model , Price, Others) REFERENCES Good (ID_good, Producer, Model, Price, Others) ON DELETE CASCADE); TABLE Warehouse (CONSTRAINT R_1 FOREIGN KEY (ID_store) REFERENCES Internet_store (ID_store)); TRIGGER tI_Camera BEFORE INSERT ON Camera for each row
- ERwin Builtin Trigger
- INSERT trigger on CameraNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Good Camera on child insert restrict */
/* ERWIN_RELATION: CHECKSUM = "00011fd9", PARENT_OWNER = "", PARENT_TABLE = " Òîâà ð "_OWNER =" ", CHILD_TABLE =" Camera "C_VERB_PHRASE =" ", C2P_VERB_PHRASE =" ", _CONSTRAINT =" is_a ", */Count (*) INTO NUMROWSGood
/*% JoinFKPK (:% New, Good, "=", "AND") */
: new.ID_good = Good.ID_good AND
: new.Price = Good.Price AND
: new.Producer = Good.Producer AND
: new.Model = Good.Model AND
: new.Others = Good.Others; (
/*% NotnullFK (:% New, "IS NOT NULL AND") */= 0
) _application_error (
,
'Cannot insert Camera because Good does not exist.'
); IF;
- ERwin Builtin Trigger;
/ TRIGGER tU_Camera AFTER UPDATE ON Camera for each row
- ERwin Builtin Trigger
- UPDATE trigger on CameraNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Good Camera on child update restrict */
/* ERWIN_RELATION: CHECKSUM = "000122c9"...