Question

A management organization of shows, concert halls, and ticket sales for shows manages a database with...

A management organization of shows, concert halls, and ticket sales for shows manages a database with the following relational schema:
Show (show_id, title, start_date, duration, singer, hall_id)
Concert (concert_id, date, hour, show_id)
Hall (hall_id, name, address, capacity)

Express the following SQL queries in relational algebra:
What are the singers who performed at least one concert in all halls?

SELECT singer
FROM Show S1
WHERE NOT EXISTS
(SELECT *
FROM Hall H
WHERE NOT EXISTS
(SELECT *
FROM Show S2
WHERE S2.singer = S1.singer
AND H.hall_id = S2.hall_id))

0 0
Add a comment Improve this question Transcribed image text
Answer #1

'-' is for intersection. 'Not Exist' can be represented as '-' in relation algebra.

'x' for cartesian product.

select all singers then exclude them as per the mentioned query.

Add a comment
Know the answer?
Add Answer to:
A management organization of shows, concert halls, and ticket sales for shows manages a database with...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Express the following SQL queries in relational algebra: 2) What are the singers who have never...

    Express the following SQL queries in relational algebra: 2) What are the singers who have never scheduled the concert at Saint-Denis 2? SELECT singer FROM Show WHERE singer NOT IN (SELECT singer FROM Show S, Hall H WHERE S.hall_id = H.hall_id AND H.name = 'Saint-Denis 2')

  • Consider the following relational database to manage concert and ticket sales. The relations are artist, concert,...

    Consider the following relational database to manage concert and ticket sales. The relations are artist, concert, venue, seat, ticket, and fan. The schemas for these relations (with primary key attributes underlined) are: Artist-schema = (artistname, type, salary) Concert-schema = (artistname, date, venuename, artistfees) Venue-schema = (venuename, address, seating_capacity) Seat-schema=(venuename, row, seatnumber) Ticket-schema = (fanID, date, venuename, row, seatnumber) Fan-schema = (fanID, name, address, creditcardno) Where: • artistname is a unique name for the artist (because of trademark/copyright rules no two...

  • Express the following SQL queries in relational algebra: 1) What are the dates of the concert...

    Express the following SQL queries in relational algebra: 1) What are the dates of the concert of Lionel Richie at the Bell Center? SELECT date FROM Concert C, Show S, Hall H WHERE C.show_id = S.show_id AND S.hall_id = H.hall_id AND S.singer = 'Lionel Richie' AND H.name = ‘Bell Center’

  • Consider following relational database schema and translate the queries ‘a’ and ‘b’ into relational algebra expressions...

    Consider following relational database schema and translate the queries ‘a’ and ‘b’ into relational algebra expressions Teacher(ID, Name, Designation, Phone, Address) Course(CourseCode, CourseName, CreditHour) Taught(TeacherID, CourseCode, Semester) a. SELECT Name, Address FROM Teacher, Taught WHERE Teacher.ID=Taught.TeacherID and CourseCode=’IT344’ b. SELECT CourseName FROM Course, Taught WHERE Course.CourseCode=Taught.CourseCode and TeacherID=200

  • Consider the following relational schema, representing a database of documents and a set of keywords: Doc(did,...

    Consider the following relational schema, representing a database of documents and a set of keywords: Doc(did, docTitle) Occurs(did, wid) Word(wid, word) Keywords(word) For each of the queries below, show an equivalent relational algebra plan: a.SELECT z.word, count(*) FROM Doc x, Occurs y, Word z WHERE x.did = y.did and y.wid = z.wid GROUP BY z.wid, z.word b.SELECT x.did, x.docTitle FROM Doc x WHERE NOT EXISTS (SELECT * FROM Occurs o, Word w, Keyword k WHERE x.did = o.did AND o.wid...

  • Intro to database systems: Q7. Formulate the following SQL query in relational algebra using an efficient...

    Intro to database systems: Q7. Formulate the following SQL query in relational algebra using an efficient way. The schema is given in the following. Emp(eno, ename, title, city) Proj(pno, pname, budget, city) Works(eno, pno, since) SELECT ename FROM Works , Emp WHERE Works.pno = ‘P150’ AND Works.eno = Emp.eno

  • The relational schema for the Academics database is as follows DEPARTMENT(deptnum, descrip, instname, deptname, state,...

    The relational schema for the Academics database is as follows DEPARTMENT(deptnum, descrip, instname, deptname, state, postcode) ACADEMIC(acnum, deptnum*, famname, givename, initials, title) PAPER(panum, title) FIELD(fieldnum, id, title) INTEREST(fieldnum* acnumk, descrip) Some notes on the Academics database An academic department belongs to one institution (instname) and often has many academics. An academic only works for one department. Research papers (PAPER) are often authored by several academics, and of course an academic often writes several papers (AUTHOR) A research field (FIELD) often...

  • **************PLEASE COMPLETE PART F) ONLY************** Consider the following relational database schema (primary keys are underlined) and...

    **************PLEASE COMPLETE PART F) ONLY************** Consider the following relational database schema (primary keys are underlined) and SQL query: Hotel (hotelNo, hotelName, city) Room (roomNo, hotelNo, type, price) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest (guestNo, guestName, guestAddress) SELECT g.guestNo, g.guestName FROM Room r, Booking b, Hotel h, Guest g WHERE h.hotelNo = b.hotelNo AND g.guestNo = b.guestNo AND h.hotelNo = r.hotelNo AND h.hotelName = "Ritz" AND dateFrom >= "Jan 01, 2001" AND dateTo <= "Dec 31, 2001"; (A) state what...

  • **************PLEASE COMPLETE PART E) ONLY************** Consider the following relational database schema (primary keys are underlined) and...

    **************PLEASE COMPLETE PART E) ONLY************** Consider the following relational database schema (primary keys are underlined) and SQL query: Hotel (hotelNo, hotelName, city) Room (roomNo, hotelNo, type, price) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest (guestNo, guestName, guestAddress) SELECT g.guestNo, g.guestName FROM Room r, Booking b, Hotel h, Guest g WHERE h.hotelNo = b.hotelNo AND g.guestNo = b.guestNo AND h.hotelNo = r.hotelNo AND h.hotelName = "Ritz" AND dateFrom >= "Jan 01, 2001" AND dateTo <= "Dec 31, 2001"; (A) state what...

  • DATABASES You are required to design and implement a relational database to help the local community...

    DATABASES You are required to design and implement a relational database to help the local community center better serve the residents in your neighborhood. Database Specifications: In your preliminary analysis, you have determined the following basic facts about the community center and the services it provides to the residents in the neighborhood: - The community center serves multiple areas which fall into different zip codes.  - The community center provides collaborative family based care services. An immediate family is...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT