April 2017
Beginner to intermediate
360 pages
9h 35m
English
In the previous chapter, we learned a little bit about keyspaces. A keyspace is essentially a namespace for various tables in a cluster. It is somewhat analogous to a database in the relational world. All data will reside within some keyspace. The main function of declaring keyspaces over declaring tables directly is not to serve as a mapping layer, but to control the replication of closely related tables.
Let's create the keyspace for our MyStatus application by executing the following command in CQL shell:
CREATE KEYSPACE "my_status" WITH REPLICATION = { 'class': 'SimpleStrategy', 'replication_factor': 1 };
When creating a keyspace, you have to specify certain configuration parameters such as the replication ...
Read now
Unlock full access