Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following schema that models a university library. Suppose that we have already created three SQL tables Book, Student, and OnLoan with the required
Consider the following schema that models a university library. Suppose that we have already created three SQL tables Book, Student, and OnLoan with the required columns. Whenever a student borrows a book, a row is inserted into the OnLoan table that references the unique student ID (attribute sid) and the book ID (attribute book_id). Book( book_id: string, title: string, length: int, published: date, subject: string ) Studenti sid: string, name: string ) OnLoan( book_id: string, sid: string, due_date: date ) Write SELECT queries that achieve the following tasks: A. List the title and subject of every book that has a length of at least 100 pages. B. List all columns of all books that were published in the year 2020 on the subject 'databases. C. List the title of all books that are currently on loan. D. List the names of the students that have borrowed all books on the subject 'algorithms
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started