Skip to Content
Mastering Apache Cassandra 3.x - Third Edition
book

Mastering Apache Cassandra 3.x - Third Edition

by Aaron Ploetz, Tejaswi Malepati
October 2018
Beginner to intermediate content levelBeginner to intermediate
348 pages
10h
English
Packt Publishing
Content preview from Mastering Apache Cassandra 3.x - Third Edition

Creating a keyspace

Keyspaces are analogous to the logical databases of the relational world. A keyspace contains tables, which are usually related to each other by application, use case, or development team. When defining a keyspace, you also have the ability to control its replication behavior, specifying pairs of data center names and a numeric Replication Factor (RF).

Creating a keyspace is a simple operation and can be done like this:

CREATE KEYSPACE [IF NOT EXISTS] <keyspace_name> WITH replication = {'class': '<replication_strategy>',  '<data_center_name>':'<replication_factor>'} AND durable_writes = <true/false>;

Here is the detailed explanation of the preceding query:

  • keyspace_name: Valid keyspace names must be composed of alphanumeric ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Apache Cassandra - Second Edition

Mastering Apache Cassandra - Second Edition

Nishant Neeraj

Publisher Resources

ISBN: 9781789131499Supplemental Content