Professional Documents
Culture Documents
Test PDF
Test PDF
2018-19
(CSC 4101)
2. A) 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.
5
B) Consider the following relational schema.
Write the Relational Algebra and SQL queries that “find the distinct names of all students
who score more than 90% in the course numbered 107”. 5
3. Consider a relation R (A, B, C, D, E, F, G), where each attribute is atomic, and following
functional dependencies exist.
{AB → CD, DE → F, C → E, F → C, B → G}
P.T.O.
4. Consider the following relational database:
account(account_number, branch_name, balance)
branch(branch_name, branch_city, assets)
customer(customer_name customer_street, customer_city)
loan(loan_number, branch_name, amount)
depositor(customer_name, account_number)
borrower(customer_name, loan_number)
a) Find the names of all branches in the loan relation, and remove duplicates.
b) Find the name, loan number and loan amount of all customers having a loan at the
Perryridge branch.
c) Find all loan numbers with a loan value greater than $10,000.
d) Find the names of all depositors who have an account with a value greater than
$6,000.
e) Find the names of all depositors who have an account at the “Uptown” branch.