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

# Database

This guide describes how to store and organize data in Mantle.

<Frame>
  <img noZoom src="https://mintcdn.com/mantlebio/sdvHTAr-XRL3RKUT/assets/database.png?fit=max&auto=format&n=sdvHTAr-XRL3RKUT&q=85&s=6e153cb2c462e8c704b9f3e54affc28f" width="3812" height="1714" data-path="assets/database.png" />
</Frame>

## Introduction

Mantle is a centralized solution for organizing both files and metadata, together. You can store large files (such as microscopy images or FASTQ sequencing data) alongside metadata (such as sample ID, sample origin, and experimental conditions). You can also store files together, such as the FASTQ files and image file from a spatial transcriptomics experiment. You don’t need to rely on storing all of the important descriptors in your file names.

## Data entities and data types

In your Mantle Database, data is stored as entities, which each have a name and one or more properties. These properties can be files or experimental metadata. Each entity is a row in a table, and the properties are columns of the table. Each table in your Mantle database is defined by a data type. There a multiple data types, such as `rnaseq_fastq` or `image_directory`.

You can browse by data type in your Mantle Database. Selecting a data type shows you all the entities of that data type in a table view.

<Frame>
  <img noZoom src="https://mintcdn.com/mantlebio/sdvHTAr-XRL3RKUT/assets/database_table_annotated.png?fit=max&auto=format&n=sdvHTAr-XRL3RKUT&q=85&s=cb00ddee9284e794011bf2ef15fdcb8c" width="2048" height="1245" data-path="assets/database_table_annotated.png" />
</Frame>

You can select a single entity to see its properties in more detail. For example, an entity of the `rnaseq_fastq` data type contains a `read1` FASTQ file, an optional `read2` FASTQ file, a `sample` name, and a `strandedness` . The file properties can be downloaded to your local environment, and you can edit other properties as needed. The history of all changes is automatically tracked for you.

<Frame>
  <img noZoom src="https://mintcdn.com/mantlebio/sdvHTAr-XRL3RKUT/assets/entity_annotated.png?fit=max&auto=format&n=sdvHTAr-XRL3RKUT&q=85&s=e1a1f4d23e699aae3cf1ba92097f4bdd" width="500" data-path="assets/entity_annotated.png" />
</Frame>

## Adding a new data type

Your Mantle workspace comes preloaded with several data types, including `custom_file` and `custom_directory` types for if none of the other types apply to what you are working on. Contact us to add a new data type with custom properties.

## Adding a new entity

There are three ways to add a new data entity to your Mantle Database: on the Database page, in a Mantle Notebook, or using the Mantle SDK (on or off of Mantle).

### On the [Database page](https://app.mantlebio.com/datasets)

<Steps>
  <Step title="Navigate to the Database tab within Mantle.">
    <Frame>
      <img noZoom src="https://mintcdn.com/mantlebio/sdvHTAr-XRL3RKUT/assets/database_tab.png?fit=max&auto=format&n=sdvHTAr-XRL3RKUT&q=85&s=bffd51e5d5b47bc63984fc94526419b8" width="350" data-path="assets/database_tab.png" />
    </Frame>
  </Step>

  <Step title="On the left, select the data type for the entity you are adding.">
    <Frame>
      <img noZoom src="https://mintcdn.com/mantlebio/sdvHTAr-XRL3RKUT/assets/search_data_types.png?fit=max&auto=format&n=sdvHTAr-XRL3RKUT&q=85&s=59ed17c6e484e7b3039bf60150866a88" width="250" data-path="assets/search_data_types.png" />
    </Frame>
  </Step>

  <Step title="In the top right corner, click the Add or Import button.">
    <Frame>
      <img noZoom src="https://mintcdn.com/mantlebio/sdvHTAr-XRL3RKUT/assets/import_entity.png?fit=max&auto=format&n=sdvHTAr-XRL3RKUT&q=85&s=dcb4592f3d6204b420491e7ec0e8d06c" width="300" data-path="assets/import_entity.png" />
    </Frame>
  </Step>

  <Step title="Fill out the form that appears. Any files you select from your local environment will be uploaded to Mantle and will be available wherever you use Mantle.">
    <Frame>
      <img noZoom src="https://mintcdn.com/mantlebio/sdvHTAr-XRL3RKUT/assets/add_entity_modal.png?fit=max&auto=format&n=sdvHTAr-XRL3RKUT&q=85&s=03f6b521aef31cbb62a5777b9342a364" width="500" data-path="assets/add_entity_modal.png" />
    </Frame>
  </Step>
</Steps>

After you refresh the page, you can view your new entity in the table.

### In a Mantle Notebook

<Steps>
  <Step title="Add a Data cell to the notebook you are working in, selecting the data type for the entity you are adding." />

  <Step title="In the top right corner of the form that appears, click the Add New button." />

  <Step title="Fill out the form that appears.">
    Any files you select from your local environment will be uploaded to Mantle and will be available wherever you use Mantle.
  </Step>
</Steps>

### Using the SDK

You can create entities programmatically in any Python environment with the Mantle SDK installed. See the SDK documentation [here](/sdk/datasets#creating-a-dataset).
