> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/fabricate/databases-and-data/data-agent-db-create-manage/database-add-local.md).

# Adding a local database to a project

A local database stores the data in Tonic Fabricate.

## Size limits based on license plan

For a local database, the maximum size is determined by your license plan:

* Free plan - 256 MB
* Plus plan - 1 GB
* Enterprise plan - 5 GB

Fabricate displays a warning when the size of a database reaches 80% of the maximum.

## Adding the database

To add a local database to a project:

1. In the navigation panel, click **New database**.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2Fm4ZQaiuWXzCpPR0UJJM9%2FProject_NewDatabaseOptions.png?alt=media&amp;token=88ce53e4-5d0b-4b60-9f34-922fab4c67fe" alt=""><figcaption><p>Option to add a database to a project</p></figcaption></figure>

2. On the new database panel, in the **Database name** field, provide a name for the new database.
3. Click **Create database**.

You can also use the Data Agent chat to add a database to the project. For example:

`Add a new database called Health records to the project.`

## Defining the structure of the database

For a local database, you define the structure of the data to create.

Depending on the number of tables in the schema, the Data Agent can automatically switches to [Plan mode](/fabricate/data-agent-tools/data-agent-modes-and-models/data-agent-plan-mode.md). It creates a plan to create the database, which you can then review and execute.

To add data to a local database, you can [prompt the Data Agent](/fabricate/databases-and-data/adding-data-to-a-database/data-generate-data-connection.md) or [import a set of static data](/fabricate/databases-and-data/adding-data-to-a-database/data-agent-db-import-static-data.md).

### Data Agent instruction

One option is to provide a prompt with a simple instruction. For example: `Create a database of consumer transactions. The database includes transactions, customers, and products.`

### Pasted schema

You might paste in a specific schema for the Data Agent to use. For example:  `Create a database of consumer transactions that uses the following schema.`

### Uploaded files

You can also upload files to provide information for the Data Agent to use.

For example, instead of pasting in the schema, you can upload a file, drag and drop the file to the Data Agent, or click the attachment icon.&#x20;

Examples of schema files include:

* QL DDL scripts
* prisma.schema scripts
* Swagger YAML API definitions

### Based on an exported profile

If you [exported a profile](/fabricate/data-agent-tools/data-agent-profile.md#exporting-a-profile) from another database, you can attach the profile and use that as the basis for the database. For example: `Create a database from the attached profile.`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tonic.ai/fabricate/databases-and-data/data-agent-db-create-manage/database-add-local.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
