Exercise #2 |
||
|
Find printer makers. Result set: maker. Here we for the first time come across the mistake, typical for a number of problems (e.g., 20, 27, 28). Its cause lies in the inattentive study of database schema. «Fallacious» solution:
Thus for each row of Product table it is checked whether there is such a model in Printer table. The relationship between these two tables (one-to-many) does presuppose availability of the model in Product table which would be absent in Printer table. As a result we can skip the producer of the printers if his models are not available (in Printer table). As we have already pointed out when discussing schema of data, the product type in Product table, is set as type attribute, which is not taken into account in this case. If it is still not clear to you how to solve the problem pls. have a look at Chapter 4 «Tips and solutions». If additional comments are provided or the fallacious decision is offered, by the end of the analysis there will be a reference to the corresponding page of this Chapter 4 – T&S. To solve the problem on SQL-EX.RU |
||


