Question: Topic 1 : 1 a . i . Construct an E - R diagram for a hospital with a set of patients and a set

Topic 1:
1a.
i. Construct an E-R diagram for a hospital with a set of patients and a set of medical
doctors. Associate with each patient a log of the various tests and examinations
conducted.
Ensure that you document all assumptions that you make about the mapping constraints.
Ensure that the entities, actions, attributes, and relationships are all shown.
ii. Explain the distinctions among the terms primary key, candidate key, and super key.
1b. For the following relation schema:
employee (employee-name, street, city)
works (employee-name, company-name, salary)
company (company-name, city)
manages (employee-name, manager-name)
Give an expression in SQL for each of the following queries:
i. Find the names, street addresses, and cities of residence for all employees who work
for 'First Halal Bank Corporation' and earn more than $20,000.
ii. Find the names of all employees in the database who earn more than every employee
of 'Barakah Bank Corporation'. Assume that all people work for at most one company.
iii. Find the names of all employees in the database who live in the same cities but on
different streets as do their managers.
 Topic 1: 1a. i. Construct an E-R diagram for a hospital

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!