Professional Documents
Culture Documents
Hospital
Hospital
Features
● High Performance.
● High Availability.
● Scalability and Flexibility Run anything.
● Robust Transactional Support.
● Web and Data Warehouse Strengths.
● Strong Data Protection.
● Comprehensive Application Development.
● Management Ease.
● Open Source Freedom and 24 x 7 Support.
● Lowest Total Cost of Ownership.
Applications of SQL
● Allows users to access data in the relational database management
systems.
● Allows users to describe the data.
● Allows users to define the data in a database and manipulate that data.
● Allows to embed within other languages using SQL modules, libraries &
pre-compilers.
● Allows users to create and drop databases and tables.
● Allows users to create view, stored procedure, functions in a database.
● Allows users to set permissions on tables, procedures and views.
2. Find the names of the patient who has been allotted the equipment name
catheters.
4. Find the names of the patients who are paying above 2000 for medicines.
5. Find the receptionist id of all the receptionists who have made the record
from record number 10 to 20.
6. Find the count of patients who have taken treatment from cardiologists.
Answer: select count(PID) from PATIENT,DOCTOR where PATIENT.DID =
DOCTOR.DID and Dspecialization = ‘Cardiology’;
T1 (σ(DSpecialization = ’Cardiologist’) (DOCTOR))* PATIENT
RESULT FCOUNT PID (T1)
7. Find all the patients name who have been allotted the ward 2.
Answer: select PName from PATIENT, WARD where PATIENT.WNO =
WARD.WNO and WNO =2;
8. Find all the details of the patient who is in ward 10 and room number 2.
Ans: select * from patient, ward where ward.wno = 10 and roomno = 2;
9. Find all the names of the patients who have been admitted from 20th April
2019 and are in ward 5.
Ans : select Pname from patient, ward where patient.wno = ward.wno and
patientadmissiondate >= ‘20-APR-2019’;
14. Find the number of patients who have been treated by dentist.
Ans : select count(pid) from patient, doctor where patient.did = doctor.did
and Dspecialization = ‘Dentistry’;
15. Find the count of patients who are less than 18 years old.
Ans : select count(pid) from patients where age < 18;