Question
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
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