> 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/project-and-database-management/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. The maximum size of a local database 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="/files/WAYZyWbvOy2T3JkPbqSY" 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 initial data

1. You next provide a prompt to define the data to create.\
   \
   The prompt might be a simple instruction. For example: `Create a database of consumer transactions. The database includes transactions, customers, and products.`\
   \
   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.`\
   \
   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.  Examples of schema files include:

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

   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.`
2. The Data Agent analyzes the request, and if needed asks clarifying questions about the data values, the volume of data, and the relationships between the tables.\
   \
   If you provided a schema that contains more than 10 tables, then the Data Agent 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.
3. You can provide answers to further shape the data, and optionally tell the Data Agent to use its own judgment for some elements of the data.\
   \
   For example: `Create 70 customers. Each customer has 1-3 orders. Each order has 1-5 products. You can choose the distribution of the customers throughout the United States.`
4. When it has enough information to work from, the Data Agent creates the database structure, populates the database, and provides a summary of the results.


---

# 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/project-and-database-management/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.
