Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Advanced level school computer science. need helps A bookshop keeps a record of their books using a database. Each book is about a single subject.

image text in transcribed

Advanced level school computer science. need helps

A bookshop keeps a record of their books using a database. Each book is about a single subject. Each subject has a name and description. There may be more than one book about each subject. Each book has a unique book number, title, and year of publication. A book may have more than one author. Each author may have written more than one book. There are two possible roles of an author: main author or co-author. The first name, last name, and nationality of the author are recorded. Four tables are identified in the database: - Book - Subject - Author - BookAuthor (a) Draw an E-R diagram and show the relationships between these four tables that represent a fully normalised relational database. (b) Write table definitions for each of the tables using this format: Tablename (Attribute1, Attribute2, Attribute3, ...) (i) Book (ii) Subject (iii) Author (iv) BookAuthor (c) The bookshop wishes to determine which authors have written the most books. Write an SQL query that will output the number of books for each author, together with the first name, last name, and nationality of the author. List the results in descending order of total number of books written. A bookshop keeps a record of their books using a database. Each book is about a single subject. Each subject has a name and description. There may be more than one book about each subject. Each book has a unique book number, title, and year of publication. A book may have more than one author. Each author may have written more than one book. There are two possible roles of an author: main author or co-author. The first name, last name, and nationality of the author are recorded. Four tables are identified in the database: - Book - Subject - Author - BookAuthor (a) Draw an E-R diagram and show the relationships between these four tables that represent a fully normalised relational database. (b) Write table definitions for each of the tables using this format: Tablename (Attribute1, Attribute2, Attribute3, ...) (i) Book (ii) Subject (iii) Author (iv) BookAuthor (c) The bookshop wishes to determine which authors have written the most books. Write an SQL query that will output the number of books for each author, together with the first name, last name, and nationality of the author. List the results in descending order of total number of books written

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

What advice would you provide to Jennifer?

Answered: 1 week ago

Question

What are the issues of concern for each of the affected parties?

Answered: 1 week ago