rk_Data_PK" PRIMARY KEY (ID_worker); TABLE Workers
(ID_worker NUMBER (6) NOT NULL, _Depart NUMBER (6) NOT NULL, varchar2 (15) not null); TABLE Workers CONSTRAINT "Workers_PK" PRIMARY KEY (ID_worker); TABLE Work_Data CONSTRAINT Relation_10 FOREIGN KEY
(RoomNum) REFERENCES Rooms (RoomNum); TABLE Talons CONSTRAINT Relation_13 FOREIGN KEY
(InsurNum) REFERENCES Clients (InsurNum) ON DELETE set null; TABLE Houses CONSTRAINT Relation_15 FOREIGN KEY
(ID_Depart) REFERENCES Department (ID_Depart) ON DELETE CASCADE; TABLE Hospital CONSTRAINT Relation_16 FOREIGN KEY
(HouseNum) REFERENCES Houses (HouseNum); TABLE Hospital CONSTRAINT Relation_17 FOREIGN KEY
(InsurNum) REFERENCES Clients (InsurNum) ON DELETE CASCADE; TABLE Med_Dev CONSTRAINT Relation_18 FOREIGN KEY
(RoomNum) REFERENCES Rooms (RoomNum); TABLE Talons CONSTRAINT Relation_1 FOREIGN KEY
(ID_worker) REFERENCES Workers (ID_worker); TABLE Hospital CONSTRAINT Relation_19 FOREIGN KEY
(ID_worker) REFERENCES Workers (ID_worker); TABLE Donors CONSTRAINT Relation_21 FOREIGN KEY
(InsurNum) REFERENCES Clients (InsurNum) ON DELETE CASCADE; TABLE AIDS_patients CONSTRAINT Relation_32 FOREIGN KEY
(InsurNum) REFERENCES Clients (InsurNum) ON DELETE CASCADE; TABLE Analysis CONSTRAINT Relation_33 FOREIGN KEY
(InsurNum) REFERENCES Clients (InsurNum) ON DELETE CASCADE; TABLE Analysis CONSTRAINT Relation_34 FOREIGN KEY
(ID_An) REFERENCES Type_An (ID_An) ON DELETE CASCADE; TABLE Workers CONSTRAINT Relation_4 FOREIGN KEY
(ID_Depart) REFERENCES Department (ID_Depart) ON DELETE CASCADE; TABLE Work_Data CONSTRAINT Relation_5 FOREIGN KEY
(ID_worker) REFERENCES Workers (ID_worker) ON DELETE CASCADE; TABLE Pers_Data CONSTRAINT Relation_7 FOREIGN KEY
(ID_worker) REFERENCES Workers (ID_worker) ON DELETE CASCADE; TABLE Work_Data CONSTRAINT Relation_8 FOREIGN KEY
(Post) REFERENCES Money (Post); TABLE Rooms CONSTRAINT Relation_9 FOREIGN KEY
(ID_Depart) REFERENCES Department (ID_Depart) ON DELETE CASCADE;
Додаток Б. SQL - скрипти користувача запитів
. Визначити донорів, які здавали кров більше одного разу в поточному році. p align="justify"> SELECT fioclients, talons, donors clients.insurnum = talons.insurnum donors.insurnum = talons.insurnum talons.date_t IN (date_time talons TRUNC (talons.date_t, 'year') = TRUNC (sysdate, 'Year')) BY fioCOUNT (*)> 1
2. Визначити місцезнаходження хворого (відділення, палата). p align="justify"> SELECT hospital.housenum, department.nameclients, houses, departme...