Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following schema for a database that keeps information about business trips and their associated expenses by employees: EMPLOYEE ( SSN , Name, DeptNo,

Consider the following schema for a database that keeps information about business trips and their associated expenses by employees:
EMPLOYEE (SSN, Name, DeptNo, JobTitle, Salary)
TRIP (TripId, DepartureCity, DestinationCity, DepartureDate, ReturnDate, SSN)
EXPENSE
(TripId, Item, Date, Amount)
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 "Consultant."
h. Find the names and departments of all employees who have a single expense item of over $1000 since January 1 of this year.
i. Find the items and amounts of all expenses for a trip to Cairo beginning on January 3 of this year taken by employee Jones.
j. Find the names, departments, and job titles of all employees who have any expense item with value "Service Charge" for trips taken to Melbourne last year, along with the date and amount of the expense.
Write both relational algebra queries and SQL queries for each part.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Find y'. y= |x + X (x) (x) X 1 02x+ 2x 1 O 2x + 1/3 Ex 2x +

Answered: 1 week ago

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago