DD CONSTRAINT FK_OBJECTS_4 FOREIGN KEY (O_MOL) REFERENCES MOL (M_ID) ON UPDATE CASCADE; TABLE OBJECTS ADD CONSTRAINT FK_OBJECTS_3 FOREIGN KEY (O_SCHET) REFERENCES SCHETA (S_ID) ON UPDATE CASCADE; TABLE ORD_POSTIONS ADD CONSTRAINT FK_ORD_POSTIONS_1 FOREIGN KEY (OP_TYPE) REFERENCES «TYPE» (T_ID) ON UPDATE CASCADE; TABLE ORD_POSTIONS ADD CONSTRAINT FK_ORD_POSTIONS_2 FOREIGN KEY (OP_ORDNUM) REFERENCES ORDERS (OR_ID) ON UPDATE CASCADE; TABLE PROPERTIES ADD CONSTRAINT FK_PROPERTIES_1 FOREIGN KEY (P_OBJ) REFERENCES OBJECTS (O_ID) ON UPDATE CASCADE; TABLE SCH_POSITION ADD CONSTRAINT FK_SCH_POSITION_1 FOREIGN KEY (SP_SCHID) REFERENCES SCHETA (S_ID) ON UPDATE CASCADE; TABLE SCHETA ADD CONSTRAINT FK_SCHETA_1 FOREIGN KEY (S_IDORDER) REFERENCES ORDERS (OR_ID) ON UPDATE CASCADE;
ALTER TABLE SCHETA ADD CONSTRAINT FK_SCHETA_2 FOREIGN KEY (S_IDSELLER) REFERENCES SELLERS (SL_ID) ON UPDATE CASCADE;
ALTER TABLE SPISANIE ADD CONSTRAINT FK_SPISANIE_1 FOREIGN KEY (SP_OBJID) REFERENCES OBJECTS (O_ID) ON UPDATE CASCADE; TABLE ZAPCHASTI ADD CONSTRAINT FK_ZAPCHASTI_1 FOREIGN KEY (Z_SCHID) REFERENCES SCHETA (S_ID) ON UPDATE CASCADE; TABLE ZIP_OBJ ADD CONSTRAINT FK_ZIP_OBJ_1 FOREIGN KEY (ZIP_ID) REFERENCES ZAPCHASTI (Z_ID) ON UPDATE CASCADE; TABLE ZIP_OBJ ADD CONSTRAINT FK_ZIP_OBJ_2 FOREIGN KEY (OBJ_ID) REFERENCES OBJECTS (O_ID) ON UPDATE CASCADE;