Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Specify the following queries on the database schema shown in Fig. using both relational algebra and SQL a. List the names of both the

image text in transcribed
image text in transcribed
1. Specify the following queries on the database schema shown in Fig. using both relational algebra and SQL a. List the names of both the employees and their supervisors. b. Retrieve the names of all employees who work for the research department on the project "YXZ". c. Retrieve the names of all employees who work more than 30 hours per week for the production department. d. List the last names of all department managers who have dependents. Consider the following set of requirements for a hospital database that is used to keep track of patients' records. - The hospital keeps track of each patient's name, patient-number, social security number, address and phone, birthrate, sex, medical history and medical status (blood pressure, heart rate and temperature). Both of the social security number and patient-number have unique values for each patient. We keep track of the date he was admitted to the department. - Each department is described by a name, department-code, and a chairman (a doctor). We keep track of the date he has started the department supervision. Both name and code have unique values for each department. A department may have several locations in the same time. - Each doctor is described by his personal data, (name, sex, birth-date, social security number, major scientific area and degree). Each one joins only one department in a specific date. Each physician examines and checks one patient or more on regular basis. Many doctors may investigate one patient in the same time, each doctor should keep track on the number of hours per week spent on each patient. - A doctor may write a prescription of the necessary medication (s) for each patient. The prescription date is recorded. Each prescription has a unique number. The doctor should give the directions for each medication (how many times per day and dose) in the prescription. We kecp track of both the start and end dates of getting each medication. Each may write several prescriptions for many patients. Many doctors may write many prescriptions for one patient. We want to keep track of the dependents of each physician for insurance purposes. We keep each dependent's name, sex, birth-date, and relationship to the physician. a- Design and draw an ER diagram for that schema. b- Map the ER schema into relational schema. Specify all primary and foreign keys

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

More Books

Students also viewed these Databases questions

Question

What is a bargain purchase option?

Answered: 1 week ago

Question

What does it imply when a currency trades at a forward discount?

Answered: 1 week ago