i (kod_firm, kod_models, kod_komplektuechego, kod_obladnenya)); TABLE Shogi_tovary (CONSTRAINT R_6 FOREIGN KEY (Name_Firm, Name_models) REFERENCES News (Name_firm, Name_models )); TRIGGER tI_Firm BEFORE INSERT ON Firm for each row
- ERwin Builtin Trigger
- INSERT trigger on FirmNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Models Firm on child insert restrict */
/* ERWIN_RELATION: CHECKSUM = "0003b9bb", PARENT_OWNER = "", PARENT_TABLE = "Models" _OWNER = "", CHILD_TABLE = "Firm"
P2C_VERB_PHRASE = "", C2P_VERB_PHRASE = "", _CONSTRAINT = "R_1", */p align="justify"> SELECT count (*) INTO NUMROWSModels
/*% JoinFKPK (:% New, Models, "=", "AND") */
: new.kod_modeli = Models.kod_modely AND
: new.kod_firm = Models.kod_firm AND
: new.kod_komplektuechego = Models.kod_komplektuechgo AND
: new.kod_obladnya = Models.kod_obladnya; (
/*% NotnullFK (:% New, "IS NOT NULL AND") */= 0
) _application_error (
,
'Cannot insert Firm because Models does not exist.'
); IF;
/* ERwin Builtin Trigger */
/* Koristyvach Firm on child insert restrict */
/* ERWIN_RELATION: CHECKSUM = "00000000", PARENT_OWNER = "", PARENT_TABLE = "Koristyvach" _OWNER = "", CHILD_TABLE = "Firm"
P2C_VERB_PHRASE = "", C2P_VERB_PHRASE = "",
FK_CONSTRAINT = "R_5", FK_COLUMNS = "name" "familia" "kod_firm" */count (*) INTO NUMROWSKoristyvach
/*% JoinFKPK (:% New, Koristyvach, "=", "AND") */
: new.name = Koristyvach.Name AND
: new.familia = Koristyvach.Familia AND
: new.kod_firm = Koristyvach.kod_firn; (
/*% NotnullFK (:% New, "IS NOT NULL AND") */= 0
) _application_error (
,
'Cannot insert Firm because Koristyvach does not exist.'
); IF;
/* ERwin Builtin Trigger */
/* Shogi_tovary Firm on child insert restrict */
/* ERWIN_RELATION: CHECKSUM = "00000000", PARENT_OWNER = "", PARENT_TABLE = "Shogi_tovary" _OWNER = "", CHILD_TABLE = "Firm"
P2C_VERB_PHRASE = "", C2P_VERB_PHRASE = "",
FK_CONSTRAINT = "R_7", FK_COLUMNS = "name_firm" "kod_firm" "kod_tovary" "name_models" */count (*) INTO NUMROWSShogi_tovary
/*% JoinFKPK (:% New, Shogi_tovary, "=", "AND") */
: new.name_firm = Shogi_tovary.Name_Firm AND