Write each of following queries inre Problem2 List the songs in CDs that were pu
ID: 3754219 • Letter: W
Question
Write each of following queries inre Problem2 List the songs in CDs that were published in 2000 and were rented by clients who live in Phocnix (attributes to retrieve: songTitle, clientID, firstName, lastName) lational al gebra 1 Have ADream ow Could You' Composed of sert Heal Group 400-122-3458 New York 160-123-858 Los Angeles upcodeichar groupNameichar Deutech MOs 400-122-0699 Phoenix 180-566-128 Detror Thundening Typhcons Great Inakes Another Day in Farads 400-772-000 Detroi Dateichar pricePerDaynumberi 15 05 Dreame 15 05 ert Heat 2005 03 15 05 DUS-12-05 2008-01-15 0.1 e or a Dferant Color 200 15 05 KellieExplanation / Answer
Here in order to avoid ambiguity lets name the tables
SONG(songCode,songTitle)
CUSTOMER(clientID,firstName,lastName,phone,address)
CD(cdCODE,cdTITLE,year,numbersold,groupcode)
RENT(cdCODE,seqNum,ClientId,fromDate,toDate,pricePerDay)
The relational algebra query is
songTitle,clientID,firstName,lastName(CD.year=2000(address='pheonix'(SONG x CUSTOMER x CD x RENT )
The above query involves the cross product betwwen the 4 tables .It simply performs the cross product of the four tables and selects the tuples in which adress=pheonix and year=2000 and from these tuples we will project songTitle,clientID,firstName,lastName attributes
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.