About keyspaces
A keyspace is the top-level database object that controls the replication for the object it contains at each datacenter in the cluster. Keyspaces contain tables, materialized views and user-defined types, functions, and aggregates. Typically, a cluster has one keyspace per application. Because replication is controlled on a per-keyspace basis, store data with different replication requirements in the same region in different keyspaces. Keyspaces are not a significant map layer within the data model.
The following information is provided for informational purposes for Astra DB users.
Astra DB uses the |
Replication strategy and factor
When you create or modify a keyspace, the SimpleStrategy
replication strategy class is automatically assigned.
SimpleStrategy
class is intended for evaluating DataStax Enterprise.
For production use or for use with mixed workloads, use the NetworkTopologyStrategy
class.
You can also use |
Showing the keyspace details
In cqlsh, the DESCRIBE KEYSPACE
command outputs the full details of the keyspace, including all database objects the keyspace contains.
Use the output from the DESCRIBE
command to recreate the keyspace and all its components.
The output includes all settings for tables and other objects including the default settings. When recreating a keyspace in another environment, verify that the settings are compatible, such as the keyspace replication factor datacenter names. |