p align="justify"> NAME_D D_V
); TABLE KLIENT (
ID_KLIENT D_I NOT NULL,
SURNAME D_V,
NAME D_V,
PHONE D_V
); TABLE MATERIAL (
ID_MATERIAL D_I NOT NULL,
ID_POST D_I,
NAME_M D_V
); TABLE POST (
ID_POST D_I NOT NULL,
NAME_F D_V,
PREDST D_V
); TABLE SDELKI (
ID_SDELKI D_I NOT NULL,
ID_ZAKAZ D_I,
ID_KLIENT D_I
); TABLE SOTR (
ID_SOTR D_I NOT NULL,
ID_DOLJN D_I,
SURNAME_S D_V,
NAME_S D_V
); TABLE TOVAR (
ID_TOVAR D_I NOT NULL,
NAME_T D_V
); TABLE TOVAR_MATERIAL (
ID_TOVAR_MATERIAL D_I NOT NULL,
ID_TOVAR D_I,
ID_MATERIAL D_I
); TABLE TRANSPORT (
ID_TRANSPORT D_I NOT NULL,
MODEL D_V,
OPISANIE D_V
); TABLE USLUGI (
ID_USLUGI D_I NOT NULL,
NAME_U D_V,
PRICE D_V
); TABLE ZAKAZ (
ID_ZAKAZ D_I NOT NULL,
ID_TRANSPORT D_I,
ID_SOTR D_I,
DATA D_D,
SUMMA D_V
); TABLE ZAKAZ_USLUGI (
ID_ZAKAZ_USLUGI D_I NOT NULL,
ID_TOVAR D_I,
ID_USLUGI D_I,
ID_ZAKAZ D_I
);
/***************************************** *************************************/
/*** Primary Keys ***/
/******************************************************************************/TABLE DOLJN ADD CONSTRAINT PK_DOLJN PRIMARY KEY (ID_DOLJN); TABLE KLIENT ADD CONSTRAINT PK_KLIENT PRIMARY KEY (ID_KLIENT); TABLE MATERIAL ADD CONSTRAINT PK_MATERIAL PRIMARY KEY (ID_MATERIAL); TABLE POST ADD CONSTRAINT PK_POST PRIMARY KEY (ID_POST); TABLE SDELKI ADD CONSTRAINT PK_SDELKI PRIMARY KEY (ID_SDELKI); TABLE SOTR ADD CONSTRAINT PK_SOTR PRIMARY KEY (ID_SOTR); TABLE TOVAR ADD CONSTRAINT PK_TOVAR PRIMARY KEY (ID_TOVAR); TABLE TOVAR_MATERIAL ADD CONSTRAINT PK_TOVAR_MATERIAL PRIMARY KEY (ID_TOVAR_MATERIAL); TABLE TRANSPORT ADD CONSTRAINT PK_TRANSPORT PRIMARY KEY (ID_TRANSPORT); TABLE USLUGI ADD CONSTRAINT PK_USLUGI PRIMARY KEY (ID_USLUGI); TABLE ZAKAZ ADD CONSTRAINT PK_ZAKAZ PRIMARY KEY (ID_ZAKAZ); TABLE ZAKAZ_USLUGI ADD CONSTRAINT PK_ZAKAZ_USLUGI PRIMARY KEY (ID_ZAKAZ_USLUGI);
/***************************************** *************************************/
/*** Foreign Keys ***/
/******************************************************************************/TABLE MATERIAL ADD CONSTRAINT FK_MATERIAL FOREIGN KEY (ID_POST) REFERENCES POST (ID_POST) ON DELETE CASCADE ON UPDATE CASCADE; TABLE SDELKI ADD CONSTRAINT FK_SDELKI FOREIGN KEY (ID_ZAKAZ) REFERENCES ZAKAZ (ID_ZAKAZ) ON DELETE CASCADE ON UPDATE CASCADE; TABLE SDELKI ADD CONSTRAINT FK_SDELKI1 FOREIGN KEY (ID_KLIENT) REFERENCES KLIENT (ID_KLIENT) ON DELETE CASCADE ON UPDATE CASCADE; TABLE SOTR ADD CONSTRAINT FK_SOTR FOREIGN KEY (ID_DOLJN) REFERENCES DOLJN (ID_DOLJN) ON DELETE CASCADE ON UPDATE CASCADE; TABLE TOVAR_MATERIAL ADD CONSTRAINT FK_TOVAR_MATERIAL FOREIGN KEY (ID_TOVAR) REFERENCES TOVAR ( ID_TOVAR) ON DELETE CASCADE ON UPDATE CASCADE; TABLE TOVAR_MATERIAL ADD CONSTRAINT FK_TOVAR_MATERIAL1 FOREIGN KEY (ID_MATERIAL) REFERENCES MATERIAL (ID_MATERIAL) ON DELETE CASCADE ON UPDATE CASCADE; TABLE ZAKAZ ADD CONSTRAINT FK_ZAKAZ FOREIGN KEY (ID_TRANSPORT) REFERENCES TRANSPORT (ID_TRANSPORT) ON DELETE CASCADE ON UPDATE CASCADE; TABLE ZAKAZ ADD CONSTRAINT FK_ZAKAZ1 FOREIGN KEY (ID_SOTR) REFERENCES SOTR (ID_SOTR) ON DELETE CASCADE ON UPDATE CASCADE; TABLE ZAKAZ_USLUGI ADD CONSTRAINT FK_ZAKAZ_USLUGI FOREIGN KEY (ID_TOVAR) REFERENCES TOVAR (ID_TOVAR) ON DELETE CASCADE ON UPDATE CASCADE; TABLE ZAKAZ_USLUGI ADD CONSTRAINT FK_ZAKAZ_USLUGI1 FOREIGN KEY (ID_USLUGI) REFERENCES USLUGI (ID_USLUGI) ON DELETE CASCADE ON UPDATE CASCADE; TABLE ZAKAZ_USLUGI ADD CONSTRAINT FK_ZAKAZ_USLUGI2 FOREIGN KEY (ID_ZAKAZ) REFERENCES ZAKAZ (ID_ZAKAZ) ON DELETE CASCADE ON UPDATE CASCADE;
/***************************************** ************************************...