Consider the following relational schema for a book database, the primary keys are underlined. Author(AuthorID, AuthorName,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following relational schema for a book database, the primary keys are underlined. Author(AuthorID, AuthorName, Address, TelephoneNo, PublisherCode) Book (BookID, Name, Release Date, Price, AuthorID) Publisher (PublisherID, Name, Address, AuthorID) Write SQL queries to answer the following: (a) Write queries to show all the book information of all Books in the Book table which includes the name Harry Potter. Sort Descending in Price. (5 marks) (b) Write a query to pick out and show all the details of Authors who released books last year. (6 marks) (c) Write a query to show the number of authors who have written a book. (5 marks) (d) Write a query that will illustrate books and their various Publishers. Group by PublisherID. (5 marks) (e) Write a query to delete the Telephone Number column from the Author table. (4 marks) Total (25 marks) Consider the following relational schema for a book database, the primary keys are underlined. Author(AuthorID, AuthorName, Address, TelephoneNo, PublisherCode) Book (BookID, Name, Release Date, Price, AuthorID) Publisher (PublisherID, Name, Address, AuthorID) Write SQL queries to answer the following: (a) Write queries to show all the book information of all Books in the Book table which includes the name Harry Potter. Sort Descending in Price. (5 marks) (b) Write a query to pick out and show all the details of Authors who released books last year. (6 marks) (c) Write a query to show the number of authors who have written a book. (5 marks) (d) Write a query that will illustrate books and their various Publishers. Group by PublisherID. (5 marks) (e) Write a query to delete the Telephone Number column from the Author table. (4 marks) Total (25 marks)
Expert Answer:
Answer rating: 100% (QA)
It appears youre looking for SQL queries to answer a series of questions based on the given relation... View the full answer
Related Book For
Database management systems
ISBN: 978-0072465631
3rd edition
Authors: Raghu Ramakrishan, Johannes Gehrke, Scott Selikoff
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
1. What trade- offs are involved in deciding to have a single large, centrally located facility instead of several smaller, dispersed facilities? 2. Who needs to be involved in facility location...
-
A world record for the greatest change in temperature was set in Spearfish, SD, on January 22, 1943. At 7:30 a.m. the temperature was -4.0 F; two minutes later the temperature was 45 F. Find the...
-
What is meant by the property of variation?
-
The wreck of the S.S. Central America waited 130 years at the bottom of the ocean for someone to come along and claim its trove of gold. Thomas G. Thompson, funded by a multitude of investors, was...
-
Draw a document flowchart to depict each of the following situations. a. An individual from the marketing department of a wholesale company prepares five copies of a sales invoice, and each copy is...
-
Vanessa went to Florida and purchased a laptop for US$920.00 by converting his Canadian money at an exchange rate of C$1 = US$0.9254. After a month, he returned to Vancouver but the exchange rate...
-
The Alfredo Fragrance Company produces only one product, a perfume called Hint of Elegance. Hint of Elegance consists of two secret ingredients blended into an exclusive fragrance, which is marketed...
-
In Canada, all workers have 3 basic rights: a) Right to refuse unsafe work. b) Right to participate in the workplace health and safety activities through the Health and Safety Committee (HSC) or as a...
-
Which is the correct default route mapping within MVC? a. O b. O C. Controller -> View -> Model Model -> Controller -> View Model -> View -> Controller Od. Controller -> Model -> View
-
can be interpreted as the breakeven financing rate that leads to a profitable project. A. Discounted payback period B. Average accounting return C. Internal rate of return D. Net present value
-
Example.org uses servers on-premise to host its user accounts and rented storag applications. It is an example for akshi. 2024 akshis O Public cloud Private O Hybnakoud.goley N-2024 Reset cloud...
-
The process by which managers establish goals and specify how these goals are to be attained is: a. part of budgeting b. planning c. strategic management d. management by objectives e. organizing
-
Accounting for Asset Retirement Obligations - Comprehensive Information Step 1: Recognition of Asset Retirement Obligations (ARO) Asset Retirement Obligations (ARO) represent legal obligations...
-
On November 1, 2020, Miss Stevens sells a capital property for $500,000. The adjusted cost base of the property is $230,000 and she incurs selling costs in the amount of $20,000. She receives an...
-
1. As a general strategy, would you recommend that Carl take an aggressive approach to capacity expansion or more of a wait-and-see approach? 2. Should Carl go with the option for one facility that...
-
The Prescriptions-R-X chain of pharmacies has offered to give you a free lifetime supply of medicine if you design its database. Given the rising cost of health care, you agree. Here's the...
-
Consider the university database from Exercise 2.3 and the ER diagram you designed. Write SQL statements to create the corresponding relations and capture as many of the constraints as possible. If...
-
Consider a relation R that has three attributes ABC. It is decomposed into relations R1 with attributes AB and R2 with attributes BC. 1. State the definition of a lossless-join decomposition with...
-
The city health inspector wishes to determine the mean bacteria count per liter of water at a popular city beach. Assume the number of bacteria per liter of water is normal with mean and standard...
-
An engineer takes a sample of 5 steel I beams from a batch, and measures the amount they sag under a standard load. The amounts in \(\mathrm{mm}\) are: It is known that the sag is normal( \({ }^{2}\)...
-
The standard process for making a polymer has mean yield \(35 \%\). A chemical engineer has developed a modified process. He runs the process on 10 batches and measures the yield (in percent) for...
Study smarter with the SolutionInn App