Consider the following relations for a database that keeps track of business trips of salespersons in a sales office:

SALESPERSON (SSN, Name, Start_Year, Dept_No)
TRIP (SSN, From_City, To_City, Departure_Date, Return_Date, Trip_ID)
EXPENSE (Trip_ID, Account#, Amount)

Specify the foreign keys for this schema, stating any assumptions you make.


The schema of this question has the following two foreign keys:

1. the attribute SSN of relation TRIP that references relation SALESPERSON, and

2. the attribute Trip_ID of relation EXPENSE that references relation TRIP.

In addition, the attributes Dept_No of relation SALESPERSON and Account# of relation

EXPENSE are probably also foreign keys referencing other relations of the database not mentioned in the question. We now give the queries in relational algebra:

Computer Science & Information Technology

You might also like to view...

The item marked 3 in the accompanying figure is the Show or Hide All Layers icon.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Data in a form may only be modified in ____ view.

A. Form B. Layout C. Design D. Datasheet

Computer Science & Information Technology

If you are using a desktop or laptop, defragment the computer's hard disk should you notice a decline in the computer's performance.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Hackers often use a botnet to launch a ____, or a bombardment of network traffic or messages designed to overload a server.?

A. ?TCP/IP attack B. ?denial of service (DoS) attack C. ?Theft by computer D. ?Trojan horse attack

Computer Science & Information Technology