Define ssn of salesman by using database of business trips, Database Management System

Consider the subsequent relations for a database which 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(TripID, Account#, Amount)
Specify the subsequent queries in relational algebra:
(i) Give the details (all attributes of TRIP) for trips which exceeded $2000 in expenses.
(ii) Print the SSN of salesman who took trips to ‘Honolulu'
(iii) Print the trip expenses incurred through the salesman with SSN= ‘234-56-7890'.Note in which the salesman might have gone on more than one trip. List them individually

Ans: (i) πTRIP.* (σ amount > 2000 (TRIP EXPENSE))
(ii) π SSN (σ to_city = ‘Honolulu' (TRIP))
(iii) πEXPENSE.tripid, amount (σ SSN = ‘234-56-7890' (TRIP EXPENSE))

Posted Date: 5/10/2013 4:02:45 AM | Location : United States







Related Discussions:- Define ssn of salesman by using database of business trips, Assignment Help, Ask Question on Define ssn of salesman by using database of business trips, Get Answer, Expert's Help, Define ssn of salesman by using database of business trips Discussions

Write discussion on Define ssn of salesman by using database of business trips
Your posts are moderated
Related Questions
create an e-r diagram usuing graphical dipicted software that could theoritically be used in resturant application

What is disadvantage of multiple inheritances? There is potential ambiguity if the similar variable or method can be inherited from more than one superclass.eg: student class m

Explain the θ-join and equijoin Refer tables Car and Boat which list models of cars and boats and their relevant prices. Assume a customer wants to buy a car and a boat, but sh

Type of views :  Simple views and Difficult Views Feature Simple Views Complex Views Number of tables One


1. Staff (staffID --> availabilityID) 2. Services (servicesID --> itemBasedID --> timedBasedID) 3. TimedBased (timedbasedID--> priceid) 4. Clients (clientId, serviceId-->

what is the need of a log in dbms

Boyce-Code Normal Form (BCNF) A relationship is said to be in BCNF if it is already in 3NF and the left hand side of each dependency is a candidate key. A relation who is in 3N

Differance between Open addressing and chaining for collision resolution ? In open addressing , proceeding from the occupied position specified by hash address the program che

What are object interaction diagrams? Object interaction diagrams are the diagrams that used to describe order in which messages are communicated in execution of an operation,