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

 Advanced level school computer science. need helps A bookshop keeps a

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!