Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given relation schemas in a database, use SQL queries to solve the following questions. Tables: 1. Authors - stores information about authors Columns: author_id (Primary

Given relation schemas in a database, use SQL queries to solve the following questions. Tables: 1. Authors - stores information about authors Columns: author_id (Primary Key) first_name last_name country birth_date 2. Books - stores information about books Columns: book_id (Primary Key) title ISBN publication_date publisher_id (Foreign Key) 3. Publishers - stores information about publishers Columns: publisher_id (Primary Key) name country website 4. Book_Authors - stores the relationship between books and authors Columns: book_id (Foreign Key) author_id (Foreign Key) 5. Members - stores information about members Columns: member_id (Primary Key) first_name last_name email address 6. Loans - stores information about loans Columns: loan_id (Primary Key) book_id (Foreign Key) member_id (Foreign Key) loan_date return_date

Questions (must be answered in SQL queries) 1) list all publishers names and websites. 2) List all books book_id published by publisher Pearson, where Pearson is the publishers name, and assume there is only one publisher named Pearson. 3) find the author_id of author Jane Smith, where Jane is the authors first name and Smith is her last name. 4) find all books book_id authored by Jane Smith. 5) find Jane Smiths coauthors first_name and last _name. coauthors can be found by writing a same book but with different author_id. 6) find authors author_id who has published more than one book

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

ISBN: 1583474013, 978-1583474013

More Books

Students also viewed these Databases questions