The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
Version |
Location |
Description |
Submitted By |
Date submitted |
Date corrected |
|
4. No Duplicates, No Nulls > What's Wrong With Duplicates? (page numbers unavailable for online vers
Figure 4-1 and below |
If we eliminate the duplicates by loading P with
('P1', 'Screw'),
('P1', 'Nut'),
('P1', 'Bolt'),
('P2', 'Screw')
and SP with
('S1', 'P1'),
('S2', 'P1'),
('S1', 'P2')
instead of the duplicate rows we still get varied results for the queries supplied in the book. The results for the 12 candidate SQL formulations when run against the non-duplicate values listed above are, in order:
P1 * 3, P2 * 1
P1 * 2, P2 * 1
P1 * 5, P2 * 3
P1 * 6, P2 * 2
P1 * 2, P2 * 2
P1 * 2, P2 * 2
P1 * 2, P2 * 2
P1 * 1, P2 * 1
P1 * 1, P2 * 1
P1 * 3, P2 * 1
P1 * 5, P2 * 3
P1 * 1, P2 * 1
Given that the results are still inconsistent, I have to ask a) are the candidate queries really equivalent and b) if so, what is the problem being caused by duplicates that their elimination would solve? It can't be inconsistent results as the non-duplicate values also product inconsistent results for the candidate queries.
Note from the Author or Editor: This question made me realize I didn?t make my original point as well as I should have done (and thank you for drawing this fact to my attention). In fact, I was mixing together two points that might better be made separately. First point: The 12 SQL expressions (candidate query formulations) are obviously NOT equivalent, precisely because SQL permits duplicates?but they should be equivalent, and indeed they would be, if duplicates were always prohibited. Second point: The problem (i.e., of lack of equivalence of the various formulations) occurs even if there aren?t any duplicates in the input tables but is made even worse if there are. Thus, prohibiting duplicates in the input tables is necessary but not sufficient to avoid the problem. PS: As for the question ?What?s the problem being caused by duplicates that their elimination would solve??, I would claim the book does at least give a reasonable?I don?t say exhaustive?answer to that question.
|
Anonymous |
Feb 06, 2014 |
|
Printed |
Page 17
2nd from last paragraph and last line |
I believe this should refer to Figure 1.3 not Figure 1.1.
Note from the Author or Editor: Page 17, line immediately above the footnote, replace "Fig. 1.1" by "Fig. 1.3".
|
Anonymous |
Dec 18, 2014 |
|
PDF |
Page 41
Fig. 2.3: A very strange union |
The Y column of the rightmost table is lacking a double underline.
|
Thor Michael St?re |
Apr 27, 2014 |
|
Printed |
Page 120
3rd bullet item |
|
C.J. Date |
Feb 08, 2013 |
|
PDF |
Page 132
2nd paragraph (SQL text) |
I think the second instance of "FROM S )" should read "FROM P )".
|
paul c |
Jan 23, 2013 |
|
Printed |
Page 159
Fig. 7.5 |
In Fig. 7.5, the table showing the transitive closure TC appears to be missing the following entry:
P1 P6
Here is a little Perl script that shows the correct output, albeit in an order that does not match Fig. 7.5:
$ perl erratum.pl
PP
____ ____
| PX | PY |
|____|____|
| P1 | P2 |
| P1 | P3 |
| P2 | P4 |
| P3 | P4 |
| P4 | P5 |
| P5 | P6 |
|____|____|
TC
____ ____
| PX | PY |
|____|____|
| P1 | P2 |
| P1 | P3 |
| P1 | P4 |
| P1 | P5 |
| P1 | P6 |
| P2 | P4 |
| P2 | P5 |
| P2 | P6 |
| P3 | P4 |
| P3 | P5 |
| P3 | P6 |
| P4 | P5 |
| P4 | P6 |
| P5 | P6 |
|____|____|
$ cat erratum.pl
sub print_table {
my ( $pr_ref, $n ) = @_;
print "\n";
print "$n\n";
print " ____ ____ \n";
print " | PX | PY |\n";
print " |____|____|\n";
for my $px ( sort keys %{$pr_ref} ) {
for my $py ( sort keys %{ $pr_ref->{$px} } ) {
print " | $px | $py |\n";
}
}
print " |____|____|\n";
print "\n";
} ## end sub print_table
sub get_tc {
my ( $pp_ref, $tc_ref, $px_immediate, $py_immediate ) = @_;
for my $px ( keys %{$pp_ref} ) {
for my $py ( keys %{ $pp_ref->{$px} } ) {
if ( defined $tc_ref
&& defined $px_immediate
&& defined $py_immediate )
{
if ( $px eq $py_immediate ) {
$tc_ref->{$px_immediate}{$py} = {};
$tc_ref = get_tc( $pp_ref, $tc_ref, $px_immediate, $py );
}
} ## end if ( defined $tc_ref &&...)
else {
$tc_ref->{$px}{$py} = {};
$tc_ref = get_tc( $pp_ref, $tc_ref, $px, $py );
}
} ## end for my $py ( keys %{ $pp_ref...})
## end for my $px ( keys %{$pp_ref...})
} ## end for my $px ( keys %{$pp_ref...})
return scalar $tc_ref;
} ## end sub get_tc
my $pp_ref = {
P1 => { 'P2' => {}, 'P3' => {} },
P2 => { 'P4' => {} },
P3 => { 'P4' => {} },
P4 => { 'P5' => {} },
P5 => { 'P6' => {} },
};
print_table( $pp_ref, "PP" );
my $tc_ref = get_tc($pp_ref);
print_table( $tc_ref, "TC" );
Note from the Author or Editor: On p 159 in the printed book, Fig. 7.5, table labeled TC should contain one additional row with PX = P1 and PY = P6.
|
Michael J. Krueger |
Jun 11, 2014 |
|
Printed |
Page 163
Para. beginning "That said", line 2 |
The smart quotes following the symbols "<" and ">" should be closing quotes, not opening ones
|
C.J. Date |
Feb 08, 2013 |
|
Printed |
Page 206
1st bullet item |
In the sentence beginning "For one thing", replace "For one thing" by "To be specific". Delete the sentence beginning "For another" (including the immediately following SQL expression).
|
C.J. Date |
Feb 22, 2012 |
|
Printed |
Page 209
SQL code lines |
In the code lines beginning ON DELETE nls and ON INSERT nls, replace LS by NLS.
|
C.J. Date |
Feb 22, 2012 |
|
Printed |
Page 289
Within the Aside |
"Sysem" should be "System".
Note from the Author or Editor: P 289, first line of the Aside, replace "Sysem" by "System".
|
Anonymous |
Feb 10, 2014 |
|
Printed |
Page 318
Para. beginning "We see", line 3 |
Replace "relvar S" by "relvar SC"
|
C.J. Date |
Feb 22, 2012 |
|
Printed |
Page 319
First code line |
|
C.J. Date |
Feb 22, 2012 |
|
Printed |
Page 319
Code block at foot of page |
In lines 1, 4, and 7, replace "S" by "SC"
|
C.J. Date |
Feb 22, 2012 |
|
Printed |
Page 320
Code block |
In lines 2 and 8, replace "S.*" by "*". In line 16, replace "S.SNO" by "SNO". In lines 3, 9, and 17, replace "FROM S" by "FROM SC".
|
C.J. Date |
Feb 22, 2012 |
|
Printed |
Page 415
Annotation to reference [33] |
In line 2, replace "features (see" by "features--see"
|
C.J. Date |
Feb 22, 2012 |
|
Printed |
Page 432
index entry for FORALL |
in subentry "not in SQL", add page number 241
|
C.J. Date |
Feb 08, 2013 |
|