Consider the following relations: Album (albumId: integer, title: string, artistId (FK): integer) Artist (artistId: integer, name: string) Composer (artistId: integer, name: string) Singer (artistId: integer, name: string) Write the following queries in relational algebra. (1) Find all the titles of the albums. (2) Find all the tuples whose albumId is 2. (3) Rename the relation Artist to Art and attributes to artId, title. (4) Find all the tuples that are either an Artist or a Composer. (5) Find the tuples of Artists who are not a Composer. (6) Find the tuples of people who are Composer and a Singer at the same time. (7) Find the titles of albums created by the artist ‘Black Sabbath’.

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter2: Database Design Fundamentals
Section: Chapter Questions
Problem 5RQ: What is a relation?
icon
Related questions
Question
Consider the following relations:
Album (albumId: integer, title: string, artistId (FK): integer)
Artist (artistId: integer, name: string)
Composer (artistId: integer, name: string)
Singer (artistId: integer, name: string)
Write the following queries in relational algebra.
(1) Find all the titles of the albums.
(2) Find all the tuples whose albumId is 2.
(3) Rename the relation Artist to Art and attributes to artId, title.
(4) Find all the tuples that are either an Artist or a Composer.
(5) Find the tuples of Artists who are not a Composer.
(6) Find the tuples of people who are Composer and a Singer at the same time.
(7) Find the titles of albums created by the artist ‘Black Sabbath’.
 
 
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 12 images

Blurred answer
Knowledge Booster
SQL Query
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr