10 likes | 138 Vues
In this study group exercise, we focus on defining a database view crucial for shipping books that are ready to be shipped, ensuring that payment is confirmed and stock is adequate. Based on the provided slide deck and Book.DB table definitions, we will create a view that meets these criteria. Additionally, we will analyze three specific queries from the Book.DB file, proposing candidate indexes that could optimize query performance. For each suggested index, we'll evaluate whether a balanced tree index or a hash index is more beneficial, emphasizing the importance of overall query performance rather than single-query optimization.
E N D
Study Group exercises (3/19 and 3/20) 1. Consider the Book DB table, assertion, and sample query definitions accompanying this handout. Read through the slide deck ViewsWithBlankShipperView.pptx. On page 5, define a view that is required by a person (or process) responsible to “shipping” books that are ready to be shipped. That is, the books have been paid for [PaymentClearanceDate is not null], the books have not been shipped yet [ShipDate is null], and there are enough copies in stock of the book to satisfy the order b) For each of the three queries listed at the end of the Book DB file, give candidate indexes that you think would speed up the query’s evaluation, if the indexes were implemented with the DB. For each index that you suggest, state whether you think the query would benefit most from a balanced tree index or a hash index, or either would give about the same benefit (and REMEMBER, that an index will almost never be chosen to benefit a single query).