# Managing Data Collections

The Hyperspace database stores data under Collections, which are distinct segments within the database. Before using the following commands, you must establish a local Hyperspace instance in order to allocate the essential resources and functions.

* Creating a Collection
* Committing a Collection
* Deleting a Collection
* Clearing a Collection
* Getting a Collection Scheme

**Creating a Collection**

The following command creates a Collection.

```python
hyperspace_client.create_collection('schema.json', collection_name')
```

**Where** –

* <mark style="color:purple;">schema.json</mark> – Specifies the path to the configuration file (for example, \\**schema.json**) that you created locally on your machine, as described in Creating a Database Schema Configuration File.
* <mark style="color:purple;">collection\_name</mark> – Specifies the name of the Collection to be created in the Hyperspace database. You can specify any name as long as it is unique to your Hyperspace Collection.

**Response**

The following response should be received –

`{'status': 'OK', 'code': 200, 'message': 'Collection was successfully created'}`

**Committing a Collection**

After you upload vector data, it is required that you commit it, by running the following command to initiate the process of Hyperspace automatically backing up uploaded data periodically. Hyperspace handles data restoration automatically and transparently.

```python
hyperspace_client.commit(collection_name)
```

**Deleting a Collection**

The following command describes how to delete a Collection.

```python
hyperspace_client.delete_collection(collection_name)
```

{% hint style="info" %}
You may want to do this in order to save storage space or clean up your space, but please note that this is an irreversible operation.
{% endhint %}

**Clearing a Collection**

The following describes how to clear a Collection, which erases all the data in the Collection.

```python
hyperspace_client.clear_collection(collection_name)
```

**Getting a Collection Scheme**

The following describes how to get a Collection's schema.

```python
Schema = hyperspace_client.get_schema(collection_name)
```
