Errata

Cassandra: The Definitive Guide

Errata for Cassandra: The Definitive Guide, Third Edition

Submit your own errata for this product.

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.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
5
Figure 5-6. A denormalized logical model for reservations

In Figure 5-6. A denormalized logical model for reservations,

The composite key for reservations_by_guest is indicated in the figure as guest_last_name, hotel_id, guest_id.



But, that combination is not unique.as the same guest could book the same hotel on different occasions over time.
Eg:
Doe, HotelId1, GuestId1, R1, 10Aug2010, 11Aug2010, C1
Doe, HotelId1, GuestId1, R2, 5May2012, 6May2012, C90

But, composite key is supposed to be unique.

I think reservation confirmation id should be added to the composite key as it is the most reliable field that can make it unique.


This error exists in the 2nd edition also.

Note from the Author or Editor:
I agree with the comment and will modify the schema for this table to the following:
CREATE TABLE reservation.reservations_by_guest (
guest_last_name text,
guest_id uuid,
confirm_number text,
hotel_id text,
start_date date,
end_date date,
room_number smallint,
PRIMARY KEY ((guest_last_name), guest_id, confirm_number)
) WITH comment = 'Q8. Find reservations by guest name';

Anand  Apr 01, 2020  May 26, 2020
Printed
Page 46
Below title cqlsh Help

The 'help' command should be written in capital letters, as you have just described that you will use that convention in the paragraph above.

Note from the Author or Editor:
Good suggestion, will capitalize to "HELP"

Anonymous  May 16, 2020  May 26, 2020
Printed
Page 65
3rd paragraph

The sentence "Now let's set the TTL on the last_name column to an hour (3,600 seconds) by adding the USING TTL to your UPDATE command" mentions the "last_name" column, but the TTL is actually set for the "middle_initial" column in the command that follows.

Note from the Author or Editor:
The text should read: "Now let's set the TTL on the middle_initial column to an hour..."

AndrĂ©  May 18, 2020  May 26, 2020
Printed
Page 77
3rd paragraph

In the sentence "Now that we've taken a short detour to discus freezing and nested tables..." the word "tables" should be "collections".

Note from the Author or Editor:
Chapter 4, in the section "Collections": In the sentence "Now that we've taken a short detour to discus freezing and nested tables..." the word "tables" should be "collections".

AndrĂ©  May 20, 2020  May 26, 2020
Page 90
Just before Cql type Heading

According to the Text:
If you want to set TTL across an entire row, you must provide a value for every nonprimary key column in your INSERT or UPDATE command.

However, when I am missing out on some nonprimary columns while inserting data with TTL, I am able to insert data & TTL is also deleting the entire row. Can u please clarify the meaning of the above line from the text?

Note from the Author or Editor:
The text could be clarified. The behavior of TTL can be complex as there are a number of different cases to consider. This blog does a good job of covering the cases and summarizing the behavior.

https://medium.com/@27.rahul.k/cassandra-ttl-intricacies-and-usage-by-examples-d54248f2853c

Souradeep Biswas  Jul 07, 2021 
Page 168
paragraph below the INSERT INTO code example

The text reads "You use simple strings to hold the values of the hotel ID, name, and phone number."
However this example doesn't include name and phone number columns, so it seems the text and code sample are mismatched.
(From the code example, I assume it would be correct to state "You use simple strings to hold all values except for the room number, which is held by an int"?)

Note from the Author or Editor:
Good suggestion, will update the text to more closely reflect the values being inserted

David Stevenson  Feb 08, 2021 
Page 171
1st paragraph

Similar to problem on page 168, the text says "you can take the INSERT prepared statement from above and bind the name and phone values using the setString() operation", but the example code doesn't include name and phone values.

Note from the Author or Editor:
Agree, this is a good clarification. Will remove references to column names in this sentence.

David Stevenson  Feb 08, 2021 
Page 177
Chapter 8, Asynchronous Execution

I was trying to find code samples using the asynchronous APIs on the async-solution branch of the Reservation Service repository. But there is no such branch in the repository : https://github.com/jeffreyscarpenter/reservation-service

Note from the Author or Editor:
The reader is correct, there is no branch called "async-solution". This work was planned but not completed. Will remove this sentence from the text. I recommend consulting the Java driver documentation for usage examples:

https://docs.datastax.com/en/developer/java-driver/4.13/manual/core/async/

Fazle Azim  Oct 16, 2020