Relationsalgebraövning (Databaser, fortsättningskurs)

Adapted from Elmasri, Navathe: Fundamentals of Database Systems, 3d Ed, exercise 7.25.

A company has a database to keep track of the travel expenses of its salespersons. The database contains the following relations:

Salesperson(SSN, Name, StartYear, DeptNo)
Trip(SSN, FromCity, ToCity, DepartureDate, ReturnDate, TripId)
Expense(TripId, Account, Amount)
Note: The cost of a trip is split among one or more accounts. To find the cost of one trip, you have to add the amounts on that trip's rows in the Expense relation.

[Solutions]


Thomas Padron-McCarthy (thomas.padron-mccarthy@tech.oru.se), 11 februari 2007