Question: ( 2 0 points ) Consider the following schema for a database that keeps the information about business trips and their associated expenses by employees:

(20 points) Consider the following schema for a database that keeps the information
about business trips and their associated expenses by employees:
EMPLOYEE (SSN, Name, DeptNo, JobTit7e, Salary)
TRIP (TripId, DepartureCity, DestinationCity, DepartureDate, ReturnDate, SSN)
A
EXPENSE (TripId, Item, Date, Amount)
a. Get a list of all the different destination cities where the employees have taken
trips.
b. Find all the employee information for employees who work in Department 4.
c. Get complete trip records (but not their associated expenses) for all trips with
departure dates after July 1 of the current year.
d. Find the names of all employees who have departed on trips from Shanghai.
e. Find the SSN of all employees who have any single expense item of more than
$1500 for any trip.
f. Find the names of all employees who have any expense item with value
"Entertainment."
g. Find the destination cities of all trips taken by employees who have the job title of
"Manager".
h. Find the names and departments of all employees who have a single expense item
of over $500 since January 1 of this year.
i. Find the items and amounts of all expenses for a trip to Cairo beginning on
January 10 of this year taken by employee Jane.
j. Find the names, departments, and job titles of all employees who have any expense
item with value "Service Charge" for trips taken to NYC last year, along with the
date and amount of the expense.
(6 points) Take into consideration the following schema and write the Relational Algebra
statement for the following:
Manufacturer (mid, name, address)
Supplies (mid, pid)
Parts (pid, partname, color)
a. Find the names of Manufacturers who supply some blue part.
b. Find the mids of Manufacturers who supply some red part and some black part.
(4 points) Consider a schema with two relations, R(A,B) and S(B,C), where all values
are integers. Make no assumptions about keys. Consider the following three relational
algebra expressions:
a)A,C(R|>|B=1S)
b)A(B=1R)c(B=lS)
c)A,C(A,RB=1S)
Two of the three expressions are equivalent (i.e. produce the same answer on all
databases), while one of them can produce a different answer. Which expression can
produce a different answer?
 (20 points) Consider the following schema for a database that keeps

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!