Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Formulate relational algebra queries to find the following information: ( 1 ) Musician ( s ) ssn ( s ) and names ( s )
Formulate relational algebra queries to find the following information: Musicians ssns and namess who play Saxophone Musicians ssns and namess who share the same address. Assume each musician has only one address. Albums identifiers and Albums titles produced by the musicians named Ben Musicians ssns and namess who play all instruments that are played by Ben Titles of albums produced by musicians who play both guitar and piano Musicians ssns and names performed song with songID or produced an album that contains that song. Albums identifiers and Albums titles with the highest speed. Song IDs and titles that are not performed by any musician. Song IDs and titles performed by musicians who have produced at least two albums. Musicians ssns and names with annual income more than $ and have not produced any album. Note : Can't join more than two tables at once you can rename two joined tables and join it with third table use the schema below for reference Relation Schemas Musiciansssn: string, name: string, annualIncome: real Primary Key: ssn Candidate Key: None Foreign Key: None InstrumentsinstrID: string, iname: string, musickey: string Primary Key: instrID Candidate Key: iname Foreign Key: None Playsssn: string, instrID: string Primary Key: ssn instrID Candidate Key: None Foreign Key: ssn instrID SongsAppearssongID: string, authorSSN: string, title: string, albumIdentifier: string Primary Key: songID Candidate Key:authorSSN Foreign Key: albumidentifier Livesssn: string, aid: string, phone: string Primary Key: ssn aid Candidate Key: None Foreign Key: ssn aid Placeaid: string, address: string, otherInfo: string Primary Key: aid Candidate Key: address Foreign Key:None PerformsongID: string, ssn: string Primary Key: songID ssn Candidate Key: None Foreign Key: ssn songID AlbumProduceralbumIdentifier: string, ssn: string, copyrightDate: date, speed: real, title: string Primary Key: albumIdentifier Canidate Key: title Foreign Key: ssn
Formulate relational algebra queries to find the following information:
Musicians ssns and namess who play Saxophone
Musicians ssns and namess who share the same address. Assume each musician has only one address.
Albums identifiers and Albums titles produced by the musicians named Ben
Musicians ssns and namess who play all instruments that are played by Ben
Titles of albums produced by musicians who play both guitar and piano
Musicians ssns and names performed song with songID or produced an album that contains that song.
Albums identifiers and Albums titles with the highest speed.
Song IDs and titles that are not performed by any musician.
Song IDs and titles performed by musicians who have produced at least two albums.
Musicians ssns and names with annual income more than $ and have not produced any album.
Note : Can't join more than two tables at once you can rename two joined tables and join it with third table
use the schema below for reference
Relation Schemas
Musiciansssn: string, name: string, annualIncome: real Primary Key: ssn
Candidate Key: None
Foreign Key: None
InstrumentsinstrID: string, iname: string, musickey: string Primary Key: instrID
Candidate Key: iname
Foreign Key: None
Playsssn: string, instrID: string Primary Key: ssn instrID
Candidate Key: None
Foreign Key: ssn instrID
SongsAppearssongID: string, authorSSN: string, title: string, albumIdentifier: string
Primary Key: songID
Candidate Key:authorSSN
Foreign Key: albumidentifier
Livesssn: string, aid: string, phone: string Primary Key: ssn aid
Candidate Key: None
Foreign Key: ssn aid
Placeaid: string, address: string, otherInfo: string Primary Key: aid
Candidate Key: address
Foreign Key:None
PerformsongID: string, ssn: string Primary Key: songID ssn
Candidate Key: None
Foreign Key: ssn songID
AlbumProduceralbumIdentifier: string, ssn: string, copyrightDate: date, speed: real, title: string
Primary Key: albumIdentifier
Canidate Key: title
Foreign Key: ssn
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started