0% found this document useful (0 votes)
13 views

In Class Assignment Practical

The document outlines an assignment to design a database for a hospital's medical information system using MySQL. It includes tables for patients, doctors, wards, employees, patient admissions, and medication records with relevant fields. Students are instructed to insert sample data and write SQL queries to retrieve specific information from the tables, such as doctor and patient details based on ward, gender, age, salary ranges, and more.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

In Class Assignment Practical

The document outlines an assignment to design a database for a hospital's medical information system using MySQL. It includes tables for patients, doctors, wards, employees, patient admissions, and medication records with relevant fields. Students are instructed to insert sample data and write SQL queries to retrieve specific information from the tables, such as doctor and patient details based on ward, gender, age, salary ranges, and more.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

In Class Assignment

01 .Design the following Database to store data in a Medical Information Systems used in a hospital using Mysql. You must select appropriate data types for data based on their context. (i) PATIENT (PATIENT_ID, P_FNAME, P_LNAME, DATE_OF_BIRTH, SEX, AGE, ADDRESS, GUARDIAN_NAME) DOCTOR (DOCTOR_ID, D_FNAME, D_LNAME, DATE_OF_BIRTH, SEX, SPECIALIZATION_AREA, LEVEL, ADDERSS, EMM_CONTACT_NO, BASIC_SALARY, WARD_ID)

(ii)

(iii)

WARD (WARD_ID, DOCTOR_IN_CHARGE, NURSE_IN_CHARGE, NO_OF_BEDS, TYPE_OF_WARD) EMPLOYEE (EMPLOYEE_ID, E_FNAME, E_LNAME, DATE_OF_BIRTH, SEX, ADDERESS, DESIGNATION, BASIC_SALARY, WARD_ID)

(iv)

(v)

PATIENT_ADMISSION (ADMISSION_NO, PATIENT_ID, WARD_ID, DATE_ADMITTED, PRELIMINARY_DIAGNOSTIC_RECORD, PRIMARY_DOCTOR) MEDICATION_RECORDS (MEDICATION_ID, ADMISSION_NO, DATE_PRESCRIBED, MEDICATION_DATA, STATUS, POST_MEDICATION_SYMTOMS)

(vi)

02. Insert sample records for the above created database so that the foreign key constraints can be shown. Insert at least 5 records for each table. (Before insert the records to the database read the next question.)

03. Write sql queries to retrieve the flowing information from the database that you have created in sql server. i ii iii Write SQL statements to retrieve the first name and last name of all doctors working in the ward where Mr. Sarath is admitted after 01/11/2008. Find the minimum, maximum and average salary of the doctors from the selected one ward as you prefer. Write SQL statements to retrieve the first name and last name of all female employees working in the ward where Dr. Nimal is the ward in-charge.

iv v vi

Retrieve all the doctors salary whose salary is between $3000 and $4000. Retrieve all the doctors name along with their EMM_CONTACT_NO. Retrieve all the information about all the information about patients whose age bellow 18.

You might also like