Exercise #25 page 1 |
|||||
Find the printer makers which also produce PCs with the lowest RAM and the highest-speed processor among PCs with the lowest RAM. Result set: maker. The phrase “which are having least RAM-capacity” - it is the tag line. It is not redundant, as it could be seemed at first sight. It is not enough to define all the models with the fastest processor amongst all the PC's , which have least RAM capacity. I am explaining all that I have said above for demonstration of the wrong decisions. The amount of them has been grown very much :-). Here is the first example. Solution 1.17.1
1. Error in the subquery
This example selects PC models, which have least RAM capacity, and for each of these models is defined PC with the fastest processor. The m istake is that the fastest processor is needed to define for all PCs with least RAM capacity, but not for each model. Moreover, if the maker will have 2 PC models with least RAM capacity, he will be caught twice in the result set, whereas the redundancy reduction in query is absent from the solution (DISTINCT, for example). 2. Error in defining of the makers of printers
We already discussed this question (item 1.2). 3. But we have not yet detected the main error of the decision. We will be exploring this problem, having removed the previous errors. Duplicates are removed in the below solution, the makers of printers are defined correctly, and the overall maximum of the fastest processor among models with the least RAM capacity is defined. Solution 1.17.2
Here is how the fastest processor among models with the least RAM capacity is defined:
|