Question: Q) Consider the relational database whose schema is shown below: EMPLOYEE (Emp-ID, E-name, gender, DOB, disability, health-status) COMPANY (Company-name, tax-ID, company-status) LIVES (Emp-ID, street, city)
Q) Consider the relational database whose schema is shown below:
EMPLOYEE (Emp-ID, E-name, gender, DOB, disability, health-status)
COMPANY (Company-name, tax-ID, company-status) LIVES (Emp-ID, street, city)
WORKS (Emp-ID, Company-name, salary)
LOCATED_IN (Company-name, city)
The primary key for each relation is denoted by the underlined attribute.
1. Write the DDL commands to create the above relations. (7 points)
2. Write the following queries in Relational Algebra: (8 points)
a. List the names of all female employees, who work for the Ruston Bank (a unique company name in the database).
b. List all the companies who are in located-in the same city of the company Ruston Bank.
c. List the name of all employees who work for the Ruston Bank.
d. List the personal information of name, street, and city of all employees who work for the Ruston Bank and earn more than $10,500
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
