Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relational * 15 points database schema and answer the questions below: BOOK(ISBN, TITLE, PNAME, YEAR) AUTHER(ANO, NAME, Email) PUBLISHER(PNAME,ADDRESS) WROTE(ISBNANO) a) (5points)

image text in transcribed

Consider the following relational * 15 points database schema and answer the questions below: BOOK(ISBN, TITLE, PNAME, YEAR) AUTHER(ANO, NAME, Email) PUBLISHER(PNAME,ADDRESS) WROTE(ISBNANO) a) (5points) Write SQL DDL statements to create BOOK and WROTE relations. Use appropriate data types for the attributes. Make sure to create primary and foreign keys. b) Write the following queries/statements in SQL. 1. (2 points) Retrieve the name of the author who wrote the book whose ISBN=123456. 2. (2 points) List the names of publishers who has published more than 100 books. 3. (2 points) Find names of authors that start with "A". 4. ( 2 points) List books arranged in descending order of year. 5. (2 points) Write a statement to add yourself to AUTHOR table

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

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

Students also viewed these Databases questions

Question

13. You always should try to make a good first impression.

Answered: 1 week ago