Manage keyspaces

Astra DB Serverless databases store data in collections and tables, which exist inside keyspaces.

Each Astra DB database must have at least one keyspace, and you can create more as needed. For example, you can categorize your data by data model or separate unique data from your other data.

To manage keyspaces, you must have the appropriate keyspace permissions, such as the Database Administrator role. To programmatically manage keyspaces, you need an application token with sufficient permissions.

Database terminology

Depending on your background and experience, you might be familiar with various terminology for database components. For example, structured databases use terms like tables, rows, and columns. Whereas semi-structured databases use collections, documents, and fields to refer to functionally similar or identical components.

In Astra DB, the terminology you encounter depends on the database types and features that you use. The following table explains some of these terms. Each set of terms describe similar components, but these components are not necessarily functional equivalents. For example, a single field of vector data doesn’t necessarily translate directly to a single column of structured, non-vector data.

Serverless (Vector) databases Serverless (Non-Vector) databases and CQL Description

Keyspace

Keyspace

A container for one or more collections or tables within a database.

Namespace is a deprecated term for a keyspace in a Serverless (Vector) database.

Collection/Table

Table

A container for data within a database.

The difference depends on the schema type:

  • Collections use dynamic schemas and store data in documents. With a dynamic schema, each document can have different fields. Collections are best for semi-structured data.

  • Tables use fixed schemas and store data in rows. With a fixed schema, all rows must have the same columns, and every column must have a value (which can be null). Tables are best for structured data.

Serverless (Vector) databases can have collections and tables. In the Astra Portal’s Data Explorer, you can only create collections. You must use CQL or the Data API to create tables.

Additionally, the Data Explorer uses the Collection label for both collections and tables.

Document

Row

A piece of data, having one or more properties, that is stored in a collection or table in a database.

Document properties are stored in fields, and row properties are stored in columns.

Field

Column

Any properties or attributes of data, such as vectors, identifiers, customer contact information, purchase history, account statuses, metadata, and so on. Properties can be stored as various data types including text, numbers, arrays, booleans, and so on.

Create a keyspace

In Astra DB Serverless databases, you use keyspaces to organize related collections and tables, similar to a schema in a relational database. For example, you can have different data models for each keyspace, store unique data in unique keyspaces, or use multiple keyspaces within a single region to build applications on a per-keyspace data model.

Every database has an initial keyspace, and you can create additional keyspaces. For Serverless (Vector) databases, the initial keyspace name is default_keyspace.

  1. In the Astra Portal, go to Databases, and then select your Serverless (Vector) database.

  2. Click Data Explorer.

  3. Click the Keyspace menu, and then select Create Keyspace.

  4. Enter a keyspace name that is no more than 48 characters and contains only numbers, letters, and underscores.

  5. Click Create Keyspace.

The database enters Maintenance status while creating the keyspace. When the database returns to Active status, you can use the new keyspace. For example, you can create a collection or table in the keyspace.

Delete a keyspace

Deleting a keyspace permanently deletes all collections, tables, and data in the keyspace.

Programmatically, it is possible to delete all keyspaces in a database, but DataStax doesn’t recommend this.

  1. In the Astra Portal, go to Databases, and then select your Serverless (Vector) database.

  2. Click Data Explorer.

  3. In the Keyspace menu, locate the keyspace that you want to delete, and then click Delete.

  4. To confirm deletion, enter the keyspace name, and then click Delete Keyspace.

The database enters Maintenance status while it deletes the keyspace along with any collections, tables, and data within the keyspace.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com