Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago