Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this project, you will use a Database Management System to create and manipulate a very small database system for hospital Your task is to

In this project, you will use a Database Management System to create and manipulate a very small database system for hospital Your task is to improve it to some extent and implement the design as well as some queries against it. In this project, you will use any database server you want (Oracle, MySQL, etc.)

Project Description: You need to develop a management information system to help users at the administration level of the hospital easily viewing/tracking various information about doctors how many doctors in department well as information about patines , departments , department and doctors .

Data Model: We need to store information about hospital management system;The hospital keeps track of doctors each doctors has doc_id dctors s name(fname and lname), address, specialization, email and salary and phones .
Each patient has patient_id,name(fname,lname) birthdate, gender, age , address should have street city, state, zip and phone
Each departments identifier by dep_no ,department_name, and phone. dep_nomust be unique for each department.

Other requirements are as follows.

-each departments has many doctors and each doctors work on one departments

- Each doctors manages one departments.

-Each doctors treats many patients. Each patients assigned in one or more departments and department assigned by many patients we keep track of admission date by assigned.

Implementation requirement: Considering the following queries, first finalize the schema (by adding required relations and/or changing the above relations) and then implement your relations. Next, populate your relations with appropriate data. Make sure each table in the database has enough number of tuples so that each query gets a meaningful and reasonable size output. For this, you should store at least 5department, 5 patients, 5 doctors for each department.

Finally, implement the following queries in SQL.

The queries are as follows.

1- Display all departments the name of departments started by S from departments table
2- For each departments find maximum salary and number of doctors when the maximum salary greeter than 5000 sort the result in descending order by maximum salary.
3- Write a query to display the fname of doctors , dep_no and department_name name for all doctors who work in deprment_name surgery
4- Display the manger name and department_name
5- Display the dep_no, lname of doctors , and email for every doctors how the salary greeter then minimum salary .(using subqueries ).
6- Display laname, dep_no and department_name of all the doctors s from the doctors table and departments table .Use set operators to create this quires
7- For each department_ name create a view named doc that contains the maximum salary ,minumum salary average salary , sum salary,count of doctors and department _name for all employees work in department_id 5 you label the view columns maxsal,avgsal,minsal,sumsal countemp and deptname For security purposes, do not allow an employee to be reassigned to another department through the view.

What you should hand in: You should print and submit a report that includes

(1) The E/R model for your database design together with reasonable assumption(s) made,

(2) List of all schemas and their attributes with appropriate data type. Also, identify the primary key for each schema together with the relationship between different schemas.

(3) The print out of tuples in each table, the SQL queries and the output of your queries against your database.

Note: Every document related to your project must be printed and properly bounded together with the identification of your name and NU student ID printed on the cover page.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Internal Auditors Guide To Risk Assessment

Authors: Rick A. Wright Jr.

2nd Edition

1634540158, 9781634540155

More Books

Students also viewed these Accounting questions

Question

Explain the purpose of project organization.

Answered: 1 week ago

Question

Find the remainder by long division. (x 4 4x 3 x 2 + x 100) (x + 3)

Answered: 1 week ago