> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Datasets

> The core unit of data in Cognee's permission system

# Datasets: The Core Unit of Data

A dataset is a logical container for related documents and their processed knowledge graphs. All data in Cognee belongs to a dataset. When you store data with `cognee.remember()`, it is processed and stored within a specific dataset.

<Info>**Dataset-scoped permissions** — All permissions in Cognee are defined at the dataset level, never for individual documents.</Info>

## Ownership and Permissions

When a principal creates a dataset, they become its **owner**. A principal is any entity that can have permissions, like a [user](./users), [tenant](./tenants), or [role](./roles). Ownership cannot be changed. The owner has full control and can grant permissions to others.

There are four types of permissions you can grant on a dataset:

* **Read** — View documents and query stored memory.
* **Write** — Remember, improve, or otherwise modify documents and data.
* **Delete** — Remove the entire dataset.
* **Share** — Grant permissions to other principals.

## Dataset Isolation: How Access Is Enforced

Cognee can enforce strict data isolation between datasets, but it's important to understand when this happens.

* **Isolation is a default setting**: Dataset boundaries are enforced by default, meaning the `ENABLE_BACKEND_ACCESS_CONTROL` setting is `true` by default.
* **Without isolation**: If this setting is `false`, dataset parameters are ignored during searches, and queries will run across all data in the system, regardless of permissions.
* **Database support**: True isolation is currently supported when using the following database backends (others do not support dataset isolation.):
  * **Relational Databases**: SQLite, Postgres
  * **Vector Databases**: LanceDB, PGVector, Qdrant
  * **Graph Databases**: Kùzu, Neo4j Aura
  * **Hybrid Databases**: FalkorDB

See [ACL](./acl) for details on how permissions are stored and checked. For setup instructions, see [Permissions Setup](/setup-configuration/permissions).

## Using Datasets in Operations

Datasets integrate with Cognee's main operations:

* **`remember`**: Direct new content into a specific dataset by name or ID. If no dataset is specified, a default `main_dataset` is used.
* **`improve`**: Apply optional semantic enrichment on a per-dataset basis.
* **`recall`**: Scope queries to run only against datasets you have read access to.
* **`forget`**: Remove data or full datasets within the current user's permission scope.

## Technical Details

<Accordion title="Operation Permission Requirements">
  Different operations require different permissions:

  * `remember`/`improve` operations → require `write` permission
  * `recall` operations → require `read` permission
  * `forget` operations → require `delete` permission
  * Permission management → requires `share` permission
</Accordion>

<Accordion title="Dataset Creation Methods">
  Cognee provides two helper methods for creating datasets:

  * `create_dataset()`: This is a lower-level function that only inserts the dataset record. It expects the caller to manage the Access Control List (ACL) entries separately.
  * `create_authorized_dataset()`: This is the recommended method for most user-facing flows. It wraps `create_dataset()` and then immediately grants the creator full `read/write/delete/share` permissions. This ensures the dataset is usable as soon as it's created, especially when `ENABLE_BACKEND_ACCESS_CONTROL` is active.
</Accordion>

<Accordion title="Dataset Model Fields">
  The core dataset metadata is stored in a relational (SQL) database. The `datasets` table includes:

  * `id`: Unique identifier (UUID primary key)
  * `name`: Human-readable name
  * `owner_id`: ID of the principal who created the dataset
  * `created_at`: Timestamp when created
  * `updated_at`: Timestamp when last modified
</Accordion>

<Columns cols={2}>
  <Card title="Main Operations" icon="play" href="/core-concepts/main-operations/remember">
    See how datasets work with Remember, Improve, and Recall
  </Card>

  <Card title="Building Blocks" icon="puzzle" href="/core-concepts/building-blocks/datapoints">
    Learn about the DataPoints that populate datasets
  </Card>
</Columns>
