Want to receive a weekly email containing
the scoop on our new titles along with the
occasional special offer? Just click the button.
(You can always unsubscribe later by editing your
account information).

Give us an email and a password (you can use the password later to log in and
change your preferences). We'll send you a newsletter roughly once a week.

Errata for Seven Databases in Seven Weeks

We try to keep our books accurate, but sometimes mistakes creep
in. This page lists the errors submitted by our astute readers.
If you've found a new error, please
submit it.

The latest version of the book is P2.0,
released over 2 years ago.
If you've bought a PDF of the book and would like to upgrade
it to this version (for free), visit your
home page.

Key:TypoTech. ErrorSuggestionNot a problemNext edition

By default this page displays the errata for the latest version of
the book. If you have a previous version, select it here:

(To find out what version you have, look at the copyright page, a
few pages in from the front of the book. If it says (say)
'Second Printing', then here it'll be P2.0. If there are interim PDF
releases in that printing, they'll be 2.1, 2.2, and so on.)

PDF

Paper

Description

Found in

Fixed in

18

#49791: Figure 2: it seems countries => cities relationship should have cardinality "zero or many" rather than "one or more". At least the database doesn't enforce the "one or more", and in fact, it would be pretty annoying if it did since then we wouldn't be able to add a country until we have a city.

Exactly the same comment applies to the cities => venues relationship.--Max Moroz

#49791: Figure 2: it seems countries => cities relationship should have cardinality "zero or many" rather than "one or more". At least the database do...more...

P1.0
09-Sep-12

19

#49792: I don't think Postgres will create an implicit index on the column(s) of the table that is the target of REFERENCES keyword. From the official docs on CREATE TABLE: "The referenced columns must be the columns of a non-deferrable unique or primary key constraint in the referenced table." This suggests that the referenced columns must already be indexed; if they weren't, the constraint will presumably fail. An index on the column in the current table is also not created.--Max Moroz

#49792: I don't think Postgres will create an implicit index on the column(s) of the table that is the target of REFERENCES keyword. From the official...more...

P1.0
09-Sep-12

23

#49620: The output of the aggregate query on the bottom half of the page "SELECT venue_id FROM events GROUP BY venue_id HAVING count(*) >=2 AND venue_id IS NOT NULL;" shows two columns in the results (venue_id, count) when only the venue_id was actually selected in the query.

#49620: The output of the aggregate query on the bottom half of the page "SELECT venue_id FROM events GROUP BY venue_id HAVING count(*) >=2 AND venue_...more...

P1.0
02-Aug-12

26/27

#49636: Using the function input parameters 'title', 'starts' and 'ends' leads to following error:

#49636: Using the function input parameters 'title', 'starts' and 'ends' leads to following error:
psql:add_event.sql:25: ERROR: syntax error at o...more...

P1.0
10-Aug-12

27

#77883: On code postgres/add_event.sql you declare variable called found_count but it is never used in the function. It is hard for the reader to know if it is a leftover variable or does it have some meaning outside the function.--Matias Sundberg

#77883: On code postgres/add_event.sql you declare variable called found_count but it is never used in the function. It is hard for the reader to know...more...

P2.0
04-Dec-14

27

#50142: The INSERT INTO events(title, starts, ends, venue_id) gave a syntax error. I'm not familiar with the language, but I suspect that the insert parameters may not be the same as the formal parameters of the procedure, since when I changed that to vtitle, vstarts etc. it seemed to work.--Leen Torenvliet

#50142: The INSERT INTO events(title, starts, ends, venue_id) gave a syntax error. I'm not familiar with the language, but I suspect that the insert p...more...

P1.0
07-Nov-12

27

#50143: There is probably some way that I could have prevented this, but if event_id is not present in the insert, I get 'duplicate value violates unique constraint "events_pkey"'
Maybe there should be some "auto increment" at the creation of the events table on page 17.--Leen Torenvliet

#50143: There is probably some way that I could have prevented this, but if event_id is not present in the insert, I get 'duplicate value violates uni...more...

P1.0
07-Nov-12

30

#49696: The last sentence on the page says "Now it's a matter of setting an array OR color strings..." when it should say "Now it's a matter of setting an array OF color strings..." Just a typo.

#49696: The last sentence on the page says "Now it's a matter of setting an array OR color strings..." when it should say "Now it's a matter of settin...more...

P1.0
15-Aug-12

40

#50144: There is an &amp; where there should be just an &
(html error?)--Leen Torenvliet

P1.0
07-Nov-12

52

#50399: "Erlang is also required to run Riak." Some readers will have no clue what Erlang is, so add a few words here to help them. --Bob DuCharme

P1.0
20-Dec-12

53

#77892: The join command has been deprecated in favor of clustering commands provided by riak-admin cluster.--Leen Torenvliet

P2.0
05-Dec-14

53

#50130: The riak-admin join command is now deprecated: riak-admin cluster join dev2@127.0.0.1 appears to be the equivalent--John Daily

P1.0
03-Nov-12

54

#77893: Ports have changed to 10018. It is better to look at the config file, which is now called riak.conf by the way first.--Leen Torenvliet

P2.0
05-Dec-14

58

#50186: It may be a version problem, but the , doesn't seem to work in the Link here. I got an "empty" response from the server as is. I tried
-H "Link:</riak/animals/ace>;riaktag=\"contains\"" \
-H "Link:</riak/cages/1>;riaktag=\"next_to\"" \

instead and that seems to do the trick. As I'm trying to LEARN riak from this text, I have no idea why.--Leen Torenvliet

#50186: It may be a version problem, but the , doesn't seem to work in the Link here. I got an "empty" response from the server as is. I tried
-H "L...more...

P1.0
20-Nov-12

61

#50392: In the "Since we" paragraph, shouldn't "You link the direction" be "You link in the direction"? (I have several more picky ones like that...)--Bob DuCharme

P1.0
19-Dec-12

66ff

#51676: Several nodes are started and used to build a Riak ring. However, to actually make the nodes a cluster some commands are missing:
bin/riak-admin cluster plan
bin/riak-admin cluster commit
See http docs.basho.com/riak/latest/cookbooks/Basic-Cluster-Setup/--Eberhard Wolff

#51676: Several nodes are started and used to build a Riak ring. However, to actually make the nodes a cluster some commands are missing:
bin/riak-ad...more...

P2.0
31-May-13

67

#50162: changing "inputs" to "rooms" gives me error preflist exhausted. Could be my machine, could be settings, but is not very insightful.--Leen Torenvliet

P1.0
15-Nov-12

86

#49845: After enabling riak_search and configuring the pre-commit hook on the bucket, you need to restart the servers before trying to add any more data to the bucket, otherwise the pre-commit hook fails with an error. Might be nice to advise readers of the need to restart the servers.--Craig Aspinall

#49845: After enabling riak_search and configuring the pre-commit hook on the bucket, you need to restart the servers before trying to add any more da...more...

P1.0
21-Sep-12

89

#49846: The examples for the secondary index are against a server running on port 8098 rather than ports 8091-8093, on which the reader is running Riak nodes. Whilst the intention may not be for the reader to run these examples, and it's a simple substitution to make them work, it would be nice to keep the port numbers consistent.--Craig Aspinall

#49846: The examples for the secondary index are against a server running on port 8098 rather than ports 8091-8093, on which the reader is running Ria...more...

P1.0
21-Sep-12

99

#50393: "adding 'Welcome to the wiki!' to the column called 'text:'."

At first I thought "but you just said that text is a column family, not a column. " On page 101 we learn that a qualifier can be an empty string, so I guess "text:" is a column family with a qualifier, but for someone just learning HBase, the description on page 99 is very confusing. --Bob DuCharme

#50393: "adding 'Welcome to the wiki!' to the column called 'text:'."
At first I thought "but you just said that text is a column family, not a co...more...

P1.0
19-Dec-12

140

#50463: Example census dates are in the wrong format.

They should be entered as "2008-01-31" and "2007-09-20" (ISO format) instead of "2008-31-01" and "2007-20-09".

Javasript being javascript, it won't complain and the inserted data will be wrong.--Jerome Eteve

#50463: Example census dates are in the wrong format.
They should be entered as "2008-01-31" and "2007-09-20" (ISO format) instead of "2008-31-01" ...more...

P1.0
12-Jan-13

142

#76862: The 'find' query in the first half of the page has an error: the date should be ISODate('2008-01-31') and not ISODate('2008-31-01') (month and day numbers are swapped). The system didn't warn me that the date was invalid! I just realized this because the query results were not the expected ones!--Antonio Vera

#76862: The 'find' query in the first half of the page has an error: the date should be ISODate('2008-01-31') and not ISODate('2008-31-01') (month and...more...

#49649: The sentence that describes the entry in the system.profile collection says "info is a string description of the operation". I don't see a field named info, and none of the fields appear to be a string description of the operation.--Michael Brooks

#49649: The sentence that describes the entry in the system.profile collection says "info is a string description of the operation". I don't see a fie...more...

P1.0
14-Aug-12

156

#49650: The output of the first group command doesn't match what I get. The text has:

This looks like more like an *OR* operation than an *AND* operation. --PKB

#49627: On page 158 (pdf) there is this following quote :
"Boolean Ops
So far, all of our criteria are implicitly *and* operations."
But on the...more...

P1.0
04-Aug-12

210

198

#77067: Hello,

The second cURL call has an extra backslash on the second line. Once I took it out the code worked just fine:

Note: I had pasted the original and fixed curl code, but your submission system gave me an error saying that hyperlinks are not allowed. Here is a shortened version to get the point across:

Original:
...by_name?\
limit=5\&startkey=%22C%22

Fixed:
...by_name?\
limit=5&startkey=%22C%22

Regards,

#77067: Hello,
The second cURL call has an extra backslash on the second line. Once I took it out the code worked just fine:
Note: I had pasted ...more...

P1.0
28-Jul-14

223

#77846: It seems that the makers of Neo4j no longer let their browser support gremlin. There is some technical doc on "not allowed hyperling, referring to grokbase", but it leaves this part of the book rather useless.--Leen Torenvliet

#77846: It seems that the makers of Neo4j no longer let their browser support gremlin. There is some technical doc on "not allowed hyperling, referrin...more...

P2.0
26-Nov-14

224

#49795: Figure 34 has riesling misspelled as reisling.--Mick Brooks

P1.0
11-Sep-12

232

#50395: "loop() invokes the given in the closure" (invokes the code given in the closure?)--Bob DuCharme

P1.0
19-Dec-12

233

#77234: "We can preform..." should be "we can perform..."

P2.0
21-Aug-14

235

#49801: ...this new step should attach to both Vertex and Pipe classes (when in double, just use both)...

Should that be "when in doubt, just use both"?--Mick Brooks

P1.0
12-Sep-12

245

#50396: "We didn't know who Roddy McDowall was" I hope you've remedied that! You can be forgiven for not knowing that he was one of the lesser known but cooler Batman villains (see www.youtube.com/watch?v=h9RKjmhtVAM) but there's no excuse for not having seen the first Planet of the Apes movie--the 1968 one.--Bob DuCharme

#50396: "We didn't know who Roddy McDowall was" I hope you've remedied that! You can be forgiven for not knowing that he was one of the lesser known b...more...

P1.0
19-Dec-12

247

#49858: "and a count to set a maximum number or loops." should probably be "and a count to set a maximum number of loops."
--Mick Brooks

#49922: When I try the RPUSH command in the redis cli, it doesn't return the number of values pushed. It returns the length of the list. So "RPUSH eric:wishlist 7wks" returns (integer) 1, but another "RPUSH eric:wishlist gog" returns (integer) 2.--bekonsi

#49922: When I try the RPUSH command in the redis cli, it doesn't return the number of values pushed. It returns the length of the list. So "RPUSH eri...more...

P1.0
05-Oct-12

282

#49625: The book states:
"...low and high range numbers are inclusive by default...So, this will return all scores where 9 <= score <= 10,000:

redis 127.0.0.1:6379> ZRANGEBYSCORE visits 9 9999"

The description saying that it is <= 10,000 should be either <= 9999 or < 10,000 (the former would probably work better in the given context)
--toby carter

#49625: The book states:
"...low and high range numbers are inclusive by default...So, this will return all scores where 9 <= score <= 10,000:
red...more...

P1.0
03-Aug-12

284

#51138: The dataset for running isbn.rb (isbn.tsv) is not in the code downloads.--Dale Visser