Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Topic 1 : 1 a . i . Construct an E - R diagram for a hospital with a set of patients and a set
Topic :
a
i Construct an ER 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.
b For the following relation schema:
employee employeename, street, city
works employeename, companyname, salary
company companyname, city
manages employeename, managername
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 $
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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started