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’.
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’.
Chapter2: Database Design Fundamentals
Section: Chapter Questions
Problem 5RQ: What is a relation?
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’.
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 12 images
Knowledge Booster
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.Recommended textbooks for you
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr