)); TABLE Kyrjeru (CONSTRAINT R_31 FOREIGN KEY (nom_post, post_no, inv_numb) REFERENCES Sklad (nom_post, post_no, inv_numb)); TABLE Postavka (CONSTRAINT R_21 FOREIGN KEY (post_no) REFERENCES Postavshiki (post_no)); TABLE Sklad (CONSTRAINT R_27 FOREIGN KEY (nom_post, post_no) REFERENCES Postavka (nom_post, post_no)); TABLE Strynnue (FOREIGN KEY (nom_post, post_no, inv_numb) REFERENCES Instrymentu (nom_post, post_no, inv_numb) ON DELETE CASCADE); TABLE Ydarnue (FOREIGN KEY (nom_post , post_no, inv_numb) REFERENCES Instrymentu (nom_post, post_no, inv_numb) ON DELETE CASCADE); TRIGGER tD_Chek AFTER DELETE ON Chek for each row
ERwin Builtin Trigger
DELETE trigger on ChekNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Chek Klientu on parent delete restrict */
/* ERWIN_RELATION: CHECKSUM = «0000e777», PARENT_OWNER = »», PARENT_TABLE = «Chek» _OWNER = »», CHILD_TABLE = «Klientu» C_VERB_PHRASE = »», C2P_VERB_PHRASE = »», _CONSTRAINT = «R_25», FK_COLUMNS = «pay_zak» «date_pay» */count (*) INTO NUMROWSKlientu
/*% JoinFKPK (Klientu,:% Old, В»=В», В»ANDВ») * /. pay_zak =: old.pay_zak AND.date_pay =: old.date_pay; (NUMROWS> 0 ) _application_error (
,
'Cannot delete Chek because Klientu exists.'
); IF;
ERwin Builtin Trigger;
/TRIGGER tU_Chek AFTER UPDATE ON Chek for each row
ERwin Builtin Trigger
UPDATE trigger on ChekNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Chek Klientu on parent update restrict */
/* ERWIN_RELATION: CHECKSUM = «00011786», PARENT_OWNER = »», PARENT_TABLE = «Chek» _OWNER = »», CHILD_TABLE = «Klientu» C_VERB_PHRASE = »», C2P_VERB_PHRASE = »», _CONSTRAINT = «R_25», FK_COLUMNS = «pay_zak» «date_pay» */
/*% JoinPKPK (:% Old,:% New, В»<>В», В»ORВ») */
: old.pay_zak <>: new.pay_zak OR
: old.date_pay <>: new.date_paycount (*) INTO NUMROWSKlientu
/*% JoinFKPK (Klientu,:% Old, В»=В», В»ANDВ») * /. pay_zak =: old.pay_zak AND.date_pay =: old.date_pay; (NUMROWS> 0 ) _application_error (
,
'Cannot update Chek because Klientu exists.'
); IF; IF;
ERwin Builtin Trigger;
/TRIGGER tI_Dyhovue BEFORE INSERT ON Dyhovue for each row
ERwin Builtin Trigger
INSERT trigger on DyhovueNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Instrymentu Dyhovue on child insert restrict */
/* ERWIN_RELA...