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
-
The part shown is loaded at point C with 290 N in the positive x direction and at point E with 190 N in the positive y direction. The diameter of the bar ABD is 10 mm. Evaluate the likelihood of...
-
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...
-
Key {1, 2, 5, 8, 12, 13, 14, 15, 16, 18} = You wish to send your friend a secret set, Secret = {1, 2, 15, 18, 20}, but you are concerned about agents of the state intercepting the message 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...
-
Compute the first and second derivatives of the following function. p(x)=iter
-
The regression coefficient for smoking is 0.7 ± 0.1, p < .001. Does this mean that smokers have higher pulmonary function than nonsmokers? Why or why not? Table 11.31: FEV.DOC Some descriptive...
-
What are some advantages and disadvantages of telephone interviews, mail questionnaires, face-to-face interviews, and online interviews?
-
A firm is considering renewing its equipment to meet increased demand for its product. The cost of equipment modifications is $1.9 million plus $100,000 in installation costs. The firm will...
-
Please need an answer asap The region bounded by y = 20 and y = sin(>/ 2) is rotated about the line _ = Using cylindrical shells, set up an integral for the volume of the resulting solid The limits...
-
Alexander Smith and his wife Allison are married and file a joint tax return for 2019. The Smiths live at 1234 Buena Vista Drive, Orlando, FL 32830. Alexander is a commuter airline pilot but took 6...
-
The buyer of a car of a car pays Php169,000 cash and Phpl2,000 every month for 5 years. If money is 10% compounded monthly, how much is the cash price of the car?
-
Alafaya has asales forecast of $10 million and has set a goal to earn $4,320,000 in net income in the coming year. The firm manufactures heat resistant components for gas turbine engines that sell...
-
Your firm has a risk-free investment opportunity where it can invest $200,000 today and receive $20,345 in one year. For what level of interest rate is this project attractive? The project will be...
-
Does acetazolamide produce hyperkalemia?
-
1. (30 points) Consider the following graph: 10 11 H a. (10 points) Run Kruskal's algorithm to find the least-weight edges connecting the tree b. (10 points) Run through Prim's algorithm to find a...
-
What are the implications of "iterative refinement" in the context of incremental innovation within competitive markets ? Explain
-
QUESTION 9 A company has bonds outstanding with a parvalue of $100,000. The unamortized discount on these bonds is $3.500. The company calls these bonds at a price of $98.500, the gain or loss on...
-
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...
-
Service firm joint costing Graves Learning Services provides a learning service center to students who want to improve their academic performance. The four service programs currently offered are...
-
Joint product decisions The Pearly Waters Perfume Company manufactures various qualities of perfumes and colognes. One popular line of colognes includes three products that result from a joint...
-
Joint product decision analysis The Maplewood Products Company manufactures three wood treatment products in a joint production process. Each product has certain finish and preservative properties...
Study smarter with the SolutionInn App