Question: Given the Schema shown below: Write the query using both relational algebra and SQL that show the Total trip expenses for a salesman named john

Given the Schema shown below: Write the query using both relational algebra and SQL that show the Total trip expenses for a salesman named john smith" and explain how the queries work step by step

Table 1: Schema

Entities

Attributes

Salesperson

ssn#(pk), s_name, start_year, dept_name

Trip

tripid# (pk), ssn#(fk), from_city, to_city, depart_date, return_date

Expense

tripid# (fk), account# (fk), amount

Account

account#(pk), account_name, chart

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!