a) Write an expression in relational algebra that retrieves the names, surnames, and addresses of members that have borrowed all books of the author Knuth. b) Write a query in SQL that retrieves the data about the books of the author Lamport that were borrowed in the last year by more than 3 members. Print the result in the sorted order by the author and title. Books (bid, author, title, publisher, year, notes); Members (mid, name, surname, street, city, country, phone, notes); Borrow (rid, bid, mid, date, notes);

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter4: Single-table Queries
Section: Chapter Questions
Problem 10SCG
icon
Related questions
Question
a) Write an expression in relational algebra that retrieves the names, surnames,
and addresses of members that have borrowed all books of the author Knuth.
b) Write a query in SQL that retrieves the data about the books of the author
Lamport that were borrowed in the last year by more than 3 members. Print the result in
the sorted order by the author and title.
Transcribed Image Text:a) Write an expression in relational algebra that retrieves the names, surnames, and addresses of members that have borrowed all books of the author Knuth. b) Write a query in SQL that retrieves the data about the books of the author Lamport that were borrowed in the last year by more than 3 members. Print the result in the sorted order by the author and title.
Books (bid, author, title, publisher, year, notes);
Members (mid, name, surname, street, city, country, phone, notes);
Borrow (rid, bid, mid, date, notes);
Transcribed Image Text:Books (bid, author, title, publisher, year, notes); Members (mid, name, surname, street, city, country, phone, notes); Borrow (rid, bid, mid, date, notes);
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
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
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781305971776
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning