INFO210_HW5_Solution

In each question below write a relational algebra

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ers author year Andric 1961 Kawabata 1968 Vargas Llosa 2010 Marquez 1982 Oe 1994 null 1966 null 1941 null Part 4 (20 points): Relational algebra Consider relation instances on the previous page, with the given schemas. In each question below, write a relational algebra expression and show its result when the expression is executed with the given instances. (a) List first and last names of authors from countries other than Japan. πfirst, last (σcountry != ‘Japan’ (Authors)) Result first last Ivo Andric Mesa Selimovic Danilo Kis Julio Cortazar Mario Vargas Llosa Jorge Borges Gabriel Garcia Marquez (b) List titles and publication years of books written by authors from Yugoslavia. πBooks.title, Books. year (σcountry=‘Yugoslavia’ (Authors) ⨝Authors.last = Books.author Books) !tle The Bridge on the Drina The Damned Yard Death and the Dervish year 1945 null 1966 (c) List first and last names of Nobel Prize winners, and titles of the books that they wrote. πBooks.title, Authors.first, Authors.last ( (Nobel_Winners ⨝ Books) ⨝Books.author = Authors.last Authors) !tle first last Captain Pantoja and the Special Service Mario Vargas Llosa The City and the Dogs Mario Vargas Llosa The Bridge on the Drina Ivo Andric The Damned Yard Ivo Andric (d) List last names and countries of Nobel Prize winners who were born in the 19th century. πAuthors.last, Authors.country ( (σborn < 1901 (Authors)) ⨝Authors.last = Nobel_Winners.author Nobel_Winners) last country Kawabata Japan Andric Yugoslavia Part 5 (20 points): SQL Consider relation instances on the previous page, with the given schemas. In each question below, write a SQL query and show its result when the query is executed with the given instances. (a) List book titles and last names of authors for books...
View Full Document

This note was uploaded on 01/21/2014 for the course INFO 210 taught by Professor Stoy during the Winter '13 term at Drexel.

Ask a homework question - tutors are online