Question
Using the relational schemas given below, write Relational Algebra ( not SQL ) queries in questions 1 to 10. Painting ( paintingId , title, artistId,
Using the relational schemas given below, write Relational Algebra (not SQL) queries in questions 1 to 10.
Painting (paintingId, title, artistId, year)
Artist (artistId, name, phone, country)
PaintingsForSale (paintingId,price)
Museum (museumId, museumName, city, country)
Exhibits (paintingId, musemId, fromDate, toDate)
Queries (I did the first few - but I am not sure if they are 100% correct)
1. Show the title and year of each painting.
(title, year) (Painting)
2. Show the artist names from country, USA.
(names)[(country=USA)(Artist)]
3. Show the titles of the paintings that had year before 1998.
(titles)[(year<1998)(Painting)]
4. Show the museum names in UK that are showing the painting with id P1
5. Show the titles of the paintings, artist names and museum names and countries where they are exhibited.
6. Show the titles of the paintings and years by artist, A.Smith
7. Show the title of the oldest painting.
8. Show the titles and the artist names of the paintings with watercolor medium.
9. Show the names of museums with no exhibits.
10. Show the title of the painting with the highest price.
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