Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@ doing'', you can force the execution of this query by using
SELECT firstname, lastname FROM users WHERE birth_year = 1981 AND
country = 'FR' ALLOW FILTERING;

include::security.adoc[]
include::security.adoc[leveloffset=+1]

[[types]]
=== Data Types
Expand Down Expand Up @@ -2979,4 +2979,4 @@ names as their name.
|`macaddr`
|===

include::changes.adoc[]
include::changes.adoc[leveloffset=+1]
2 changes: 1 addition & 1 deletion doc/modules/cassandra/pages/developing/cql/ddl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ replication factor independently for each data-center. The rest of the
sub-options are key-value pairs, with a key set to a data-center name and
its value set to the associated replication factor. Options:

[cols=",,,",options="header",]
[cols=",,",options="header",]
|===
|sub-option |type |description
|`'<datacenter>'` | int | The number of replicas to store per range in the provided datacenter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ underlined. Relationships between entities are represented as diamonds,
and the connectors between the relationship and each entity show the
multiplicity of the connection.

image::images/data_modeling_hotel_erd.png[image]
image::data_modeling_hotel_erd.png[image]

Obviously, in the real world, there would be many more considerations
and much more complexity. For example, hotel rates are notoriously
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ informative way to visualize the relationships between queries and
tables in your designs. This figure shows the Chebotko notation for a
logical data model.

image::images/data_modeling_chebotko_logical.png[image]
image::data_modeling_chebotko_logical.png[image]

Each table is shown with its title and a list of columns. Primary key
columns are identified via symbols such as *K* for partition key columns
Expand All @@ -51,7 +51,7 @@ dedicated tables for rooms or amenities, as you had in the relational
design. This is because the workflow didn't identify any queries
requiring this direct access.

image::images/data_modeling_hotel_logical.png[image]
image::data_modeling_hotel_logical.png[image]

Let's explore the details of each of these tables.

Expand Down Expand Up @@ -127,7 +127,7 @@ shows a logical data model for reservations. You'll notice that these
tables represent a denormalized design; the same data appears in
multiple tables, with differing keys.

image::images/data_modeling_reservation_logical.png[image]
image::data_modeling_reservation_logical.png[image]

In order to satisfy Q6, the `reservations_by_guest` table can be used to
look up the reservation by guest name. You could envision query Q7 being
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ notation for physical data models. To draw physical models, you need to
be able to add the typing information for each column. This figure shows
the addition of a type for each column in a sample table.

image::images/data_modeling_chebotko_physical.png[image]
image::data_modeling_chebotko_physical.png[image]

The figure includes a designation of the keyspace containing each table
and visual cues for columns represented using collections and
Expand Down Expand Up @@ -61,7 +61,7 @@ As you work to create physical representations of various tables in the
logical hotel data model, you use the same approach. The resulting
design is shown in this figure:

image::images/data_modeling_hotel_physical.png[image]
image::data_modeling_hotel_physical.png[image]

Note that the `address` type is also included in the design. It is
designated with an asterisk to denote that it is a user-defined type,
Expand All @@ -86,7 +86,7 @@ first iteration of your physical data model design, assume you're going
to manage this denormalization manually. Note that this design could be
revised to use Cassandra's (experimental) materialized view feature.

image::images/data_modeling_reservation_physical.png[image]
image::data_modeling_reservation_physical.png[image]

Note that the `address` type is reproduced in this keyspace and
`guest_id` is modeled as a `uuid` type in all of the tables.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ to obtain detailed description of the hotel. The act of booking a room
creates a reservation record that may be accessed by the guest and hotel
staff at a later time through various additional queries.

image::images/data_modeling_hotel_queries.png[image]
image::data_modeling_hotel_queries.png[image]

_Material adapted from Cassandra, The Definitive Guide. Published by
O'Reilly Media, Inc. Copyright © 2020 Jeff Carpenter, Eben Hewitt. All
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ relationships from the conceptual model of hotels-to-points of interest,
rooms-to-amenities, rooms-to-availability, and guests-to-rooms (via a
reservation).

image::images/data_modeling_hotel_relational.png[image]
image::data_modeling_hotel_relational.png[image]

== Design Differences Between RDBMS and Cassandra

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ the original design is shown in the figure below. While the `month`
column is partially duplicative of the `date`, it provides a nice way of
grouping related data in a partition that will not get too large.

image::images/data_modeling_hotel_bucketing.png[image]
image::data_modeling_hotel_bucketing.png[image]

If you really felt strongly about preserving a wide partition design,
you could instead add the `room_id` to the partition key, so that each
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ consist of `id` ( for partition key), magazine name and publication
frequency as shown in Figure 1.

.Data Model for Q1
image::images/Figure_1_data_model.jpg[image]
image::Figure_1_data_model.jpg[image]

Another query (Q2) is to list all the magazine names by publisher. For
Q2 the data model would consist of an additional attribute `publisher`
Expand All @@ -159,7 +159,7 @@ sorting within a partition. Data model for Q2 is illustrated in Figure
2.

.Data Model for Q2
image::images/Figure_2_data_model.jpg[image]
image::Figure_2_data_model.jpg[image]

== Designing Schema

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ seconds
|Count Row Size Cell Count |two histograms in two columns; one
represents distribution of Row Size and the other represents
distribution of Cell Count
|Estimated cardinality an estimate of unique
|Estimated cardinality |an estimate of unique
values, used for compaction
|EncodingStats* minTTL |in epoch milliseconds
|EncodingStats* minLocalDeletionTime |in epoch seconds
Expand Down