Database Overview Video
Overview
Every Anything project includes a free database. As you chat with Anything, it handles all database details - from designing the structure to writing the code that enables your application to save and retrieve data. Use databases to:- Store user submissions (forms, feedback, uploads)
- Save content (blog posts, products, galleries)
- Persist data between application sessions
- Build dynamic data-driven features
Chat-based database management
Anything automatically updates your database structure and how your application retrieves and stores data as you chat. When a feature requires storing data, it:- Designs the database structure based on your description
- Creates Functions to save and retrieve data from the database
- Designs Pages and Components to display and interact with the data
- Connects everything to ensure your Pages use the Functions that retrieve/store data
Example: Task management application
If you say “Make me a tasks app”, Anything:Creates a tasks table with title, due date, and other fields

Creates Functions to save and fetch tasks

Builds a Page with a task list and add form

Makes your Page use your Functions to save and grab tasks from the database

Common database modifications
Here are common ways to modify your database through chat:Set the scene
Start with a specific description of what you want your application to do. Prompt:- Create the necessary tables
- Make a Tasks table with title, description, and comments fields
- Make a Users table with name and avatar fields
- Make a Comments table with text and author fields
- Create Functions to save and fetch tasks, users, and comments
- Build a Page with a task list, add form, and comment list
- Make the Page use your Functions to save tasks when submitted and grab tasks to display
Add fields
- Add the description column to the Todos table
- Update Functions to handle the new field
- Modify the UI to display descriptions
Remove fields
- Remove the priority column
- Update queries to exclude the field
- Clean up any UI elements showing priority
Add tables
- Make a new Comments table
- Link it to the Todos table
- Add UI for viewing/adding comments
- Handle saving comments to the database
Change structure
- Convert the due_date field to a status field
- Update existing data
- Modify the UI to show status options
Manage relationships
- Add user relationships to todos
- Update queries to fetch user data
- Show assignee info in the UI
Generate sample data
- Generate 10 sample todos with different statuses and assignees based on your structure
- Insert the data into your database
- Preserve relationships between tables
Add validation
- Add validation rules to the database
- Update Functions to check data
- Show validation errors in the UI
View and edit data
Create includes a built-in database viewer for manual edits to your data. You can quickly verify that data is being stored correctly when you use your application.Access the database viewer
- Chat - tap the database
- Project Selector - choose your database name
Database viewer features
- See all tables
- Edit individual rows
- Sort and filter data
- Download data in bulk
- Run custom SQL queries to fetch data
- Make a new Page
- Describe your tool and how it should update the database
- Test your UI
Test vs. live databases
Create maintains separate test and live databases for each project:Test database
- Used in Demo mode from the builder
- Allows you to verify your application is saving data correctly before publishing
Live database
- Used in your published application
- Access your live database from the builder
Publishing
When you publish your application, Create automatically:- Creates your live database
- Applies the latest structure from the Test database to your Live database so that it has the same tables and fields
- Runs your application with that structure
Troubleshooting
Here are effective ways to troubleshoot common errors:Data isn’t saving or retrieving
If data isn’t saving when you use your application, there are 3 common failure points to check. Go in this order to test each in isolation:1. Database structure
How to check:- Open the database viewer
- Verify tables and fields match what you expect
- Describe the correct structure you want in chat
- Example: “Update the Tasks table to have title, description, and dueDate fields”
- Create will modify the database to match
2. Function -> Database
How to check:- Identify the specific part of your application that is not saving data
- Ask the builder to test this for you and describe your current behavior
- The builder will construct a test parameter and run it
- Check database viewer to verify data was saved
- Delete test records if needed
- Copy any error messages
- Paste them into the function chat
- Ask Create to fix the specific error
- Example: “I see this error when I run saveTask and test it with this data: [error] [example data]“
3. UI -> Function
How to check:- Try the application in Demo mode from the UI
- Check that data is being saved when you use the application in the database viewer
- Watch database viewer to see if records appear
- Verify with the builder your flow and expectations of input to output (doing x should create y in z)
- Example: “Connect the tasks form to the saveTask function when I submit a task”
- Create will update the code to properly wire everything together
Reset database structure
When you publish your application, Create pushes your test database structure to your live database. If you continue making changes to your test database structure in the builder and don’t like the changes, you can reset to the structure of your last published version.Reset button located in the top right corner of the database viewer
Reset your database structure to match your published app
- You’ve made experimental changes you don’t want to keep
- Your database structure has become complex or incorrect
- You want to start fresh from your last stable version
Reset process
To reset your database structure:- Open your database in the builder
- Look for the “Reset” button in the top right corner
- Confirm that you want to reset to the published version
Remove multiple databases
In 99.99% of cases, you don’t need multiple databases per project. A single database can have an arbitrary number of tables. It’s easy to add more tables (just describe what you want to store, and Create adds a table for it). It’s better to have multiple tables in the same database than multiple databases as it makes joins easier. If you have multiple databases in a single project, you can remove ones you don’t need:Tap on the database you want to remove in the builder
Look for the 'Remove from Project' button

Confirm removal
Use existing databases
Create will automatically create a new database for your project. However, there are some scenarios where you might want to use an existing database for a new project:- You already have data in one database that you want to reuse for a new application
- You’re making a new application or frontend for the same data (e.g., an internal tool or another application)
Add an existing database
To add an existing database to your project:- Go to the new project
- Press
/
> Databases > select the database you want to use - Prompt Create on what you want to build with the database chip in the chat
FAQ
Will this scale?
Will this scale?
How much data can I store?
How much data can I store?
Can I import existing data?
Can I import existing data?
How do I connect to external databases?
How do I connect to external databases?
Is my data backed up?
Is my data backed up?
Can I write custom queries?
Can I write custom queries?
I have a legacy database from an app built prior to February 2025
I have a legacy database from an app built prior to February 2025
I want users to see test data when they login!
I want users to see test data when they login!
Database terminology
Create handles the technical details of your database, but understanding some key concepts can help you work more effectively. Think of a database as a collection of connected spreadsheets:- A table is like a spreadsheet (e.g., “Users”, “Products”)
- Fields (or columns) are the types of information stored (e.g., “name”, “email”)
- Rows are individual entries
- Relationships connect data between tables using foreign keys
Key terms
Term | Definition | Example |
---|---|---|
Schema | The structure of your database (tables and fields) | Your application’s blueprint showing Users table with name, email fields |
Query | Instructions to get or save data | ”Get all products where price < $100” |
Join | Combining data from different tables | Showing posts with their authors’ names from the Users table |
Foreign Key | A field that references another table | Post’s authorId connects to User’s id |
SQL | The language databases understand | Create writes this for you! |
Migration | Changes to your database structure | Adding a “phone” field to Users table |