BuyFindarrow_forward

Database Systems: Design, Implemen...

12th Edition
Carlos Coronel + 1 other
Publisher: Cengage Learning
ISBN: 9781305627482

Solutions

Chapter
Section
BuyFindarrow_forward

Database Systems: Design, Implemen...

12th Edition
Carlos Coronel + 1 other
Publisher: Cengage Learning
ISBN: 9781305627482
Chapter 11, Problem 27P
Textbook Problem
95 views

Problems 27 and 28 are based on the following query:

SELECT P_CODE, P_DESCRIPT, P_QOH, P_PRICE, V_CODE
FROM PRODUCT
WHERE P_QOH < P_MIN
  AND P_MIN = P_REORDER
  AND P_REORDER = 50
ORDER BY P_QOH;

Use the recommendations given in Section 11-5b to rewrite the query and produce the required results more efficiently.

Program Plan Intro

Factor that are to be considered in writing the conditional expression:

  • It is recommended to use simple column or literal as operands in a conditional expression.
  • Numeric comparisons are made faster when compared with the characters, date and null characters.
  • Equality expression will be processed in a faster rate when compared with inequality expressions.
  • Use literals in place of the conditional expressions.
  • Specify False condition first when multiple AND condition is used.
  • Specify True condition first when multiple OR condition is used.
  • Usage of NOT logical operation is avoided.

Explanation of Solution

Query:

  • Based on the requirement given it is necessary to write the equality condition first when multiple conditional expressions are used.
  • Based the rule given above the query is rewritten as follows:

SELECT P_CODE, P_DESCRIPT, P_QOH, P_PRICE, V_CODE

FROM PRODUCT

WHERE P_REORDER = 50

ANDP_MIN = 50

ANDP_QOH < 50

ORDER BY P_QOH;

Explanation:

  • From the query given P_REORDER is required to be equal to 50...

Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started

Chapter 11 Solutions

Database Systems: Design, Implementation, & Management
Show all chapter solutions
add
Ch. 11 - What are optimizer hints, and how are they used?Ch. 11 - What are some general guidelines for creating and...Ch. 11 - Most query optimization techniques are designed to...Ch. 11 - What recommendations would you make for managing...Ch. 11 - What does RAID stand for, and what are some...Ch. 11 - SELECT EMP_LNAME, EMP_FNAME, EMP_AREACODE, EMP_SEX...Ch. 11 - Problem 1 and 2 are based on the following query:...Ch. 11 - Using Table 11.4 as an example, create two...Ch. 11 - Problems 46 are based on the following query:...Ch. 11 - Problems 46 are based on the following query:...Ch. 11 - Problems 46 are based on the following query:...Ch. 11 - Problems 732 are based on the ER model shown in...Ch. 11 - Problems 732 are based on the ER model shown in...Ch. 11 - Problems 732 are based on the ER model shown in...Ch. 11 - Problems 732 are based on the ER model shown in...Ch. 11 - Problems 1114 are based on the following query:...Ch. 11 - Problems 1114 are based on the following query:...Ch. 11 - Problems 1114 are based on the following query:...Ch. 11 - Problems 1114 are based on the following query:...Ch. 11 - Problems 15 and 16 are based on the following...Ch. 11 - Problems 15 and 16 are based on the following...Ch. 11 - Problems 1721 are based on the following query:...Ch. 11 - Problems 1721 are based on the following query:...Ch. 11 - Problems 1721 are based on the following query:...Ch. 11 - Problems 1721 are based on the following query:...Ch. 11 - Problems 1721 are based on the following query:...Ch. 11 - SELECT P_CODE, P_DESCRIPT, P_PRICE, P.V_CODE,...Ch. 11 - Problems 2224 are based on the following query:...Ch. 11 - Problems 2224 are based on the following query:...Ch. 11 - Problems 25 and 26 are based on the following...Ch. 11 - Problems 25 and 26 are based on the following...Ch. 11 - Problems 27 and 28 are based on the following...Ch. 11 - Problems 27 and 28 are based on the following...Ch. 11 - Problems 2932 are based on the following query:...Ch. 11 - Problems 2932 are based on the following query:...Ch. 11 - Problems 2932 are based on the following query:...Ch. 11 - Problems 2932 are based on the following query:...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Show solutions add
What is structural independence, and why is it important?

Database Systems: Design, Implementation, & Management

What does AISI stand for?

Precision Machining Technology (MindTap Course List)

Name the two methods of attaching brake lining materials to the brake shoes.

Automotive Technology: A Systems Approach (MindTap Course List)

Describe the process by which engineers evaluate alternatives.

Engineering Fundamentals: An Introduction to Engineering (MindTap Course List)

In what way are policies different from procedures?

Management Of Information Security

How do malware authors use social media to spread infection? (110)

Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)

If your motherboard supports ECC DDR3 memory, can you substitute non-ECC DDR3 memory?

A+ Guide to Hardware (Standalone Book) (MindTap Course List)