Manage multiple keyspaces
In Astra, keyspaces hold the datacenter names associated with your Astra regions and defines the replication factor (3
for writes in LOCAL_QUORUM
) for each datacenter. A replication factor of 3 ensures against losing your data. You can create keyspaces either with the Astra Dashboard or the DevOps API. Use the instructions below to delete a keyspace with your Astra account, if necessary.
Creating a database with multiple keyspaces allows you to create different data models for each keyspace or store unique data in unique keyspaces. Multiple keyspaces within a single region allows for an application built on a per-keyspace data model.
Adding a new keyspace
-
Open a browser, navigate to Astra DB, and log in.
-
On the Dashboard page, select the database name to access the Overview page for your selected database.
-
Select Add Keyspace.
-
Enter the new keyspace name. When creating your new keyspace name, make sure you meet the following requirements:
-
No empty spaces or null
-
A maximum of 48 characters
-
Only use alphanumeric characters and/or underscores
-
-
Select Save.
Your list of keyspaces displays on the Overview page for your database.
Deleting a keyspace
If you delete a keyspace, all data in that keyspace is removed and cannot be recovered. |
-
Open a browser, navigate to DataStax Astra DB, and log in.
-
On the Dashboard page, select the database name to access the Overview page for your selected database.
-
Select the overview menu (…) for the keyspace you want to delete.
-
Select Delete.
-
In the Delete keyspace menu, type in the name of the keyspace to delete.
-
Select Delete Keyspace.
Your list of keyspaces will be updated on the Overview page to show only the remaining keyspaces for your database.