Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write each of following queries in relational algebra Problem2 List the songs in

ID: 3754177 • Letter: W

Question

Write each of following queries in relational algebra Problem2 List the songs in CDs that were published in 2000 and were rented by clients who live in 'Phoenix (attributes to retrieve: songTitle, clientID, firstName, lastName) songCodelchan songlitieicha Sweet Dreams Goodnight S2 S4 I Have A Dream Forgottern How Could You Breathless S8" Oh M Ooh La La Desert Heat Goldilocks One Of Us Mamma Mia Broken Life Or Death Days Go B Another Day in Paradise clientiD/char firstName/char lastName/char phone/char address/cha ames Smith 480-732-1234" Los Angeles 480-123-3456' New York 480-123-8588 Los Angeles 480-543-4323 Los Angeles 480-123-8588 Phoenix 480-566-1289 Detroit 480-500-3400 Phoenix 480-772-8888 Detroit 480-634-1245 Phoenix John Mallisa Carl Tim Lil Wan Johns Braxton Williams Franklin Davis S20 Goodnight cdCode/cha cdTitle/char year/numerid numberSold/numeric groupCode/cha 2001 1990 1998 2003 2003 1998 2003 2003 2003 2000 2003 Goodnight Sweet Dreams Forgotter 500000 100000 800000 800000 750000 400000 600000 800000 100000 790000 450000 900000 450000 40000 89000 99000 25000 75000 800000 790000 c2 G2 G2 Desert Heat Golden Hits Broken Golden Road Function C5 G4 CT C8 C9 G4 Ranch Horse of a Different Color 2001 G2 C12 C13 2000 2000 1997 1994 1998 2003 2001 2003 Wonderful C17 Moon Lake Summer Fiest C19 C20

Explanation / 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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote