Databases
Store and manage data in your apps
Create comes with built in databases for each project
Overview
Every Create project comes with a free database built in. As you chat with Create, it handles all database details - from designing the structure to writing the code that lets your app save and retrieve data from it.
Use databases to:
-
Store user submissions (forms, feedback, uploads)
-
Save content (blog posts, products, galleries)
-
Persist data between uses of the app
-
Build dynamic data-driven features
Chat
Create automatically updates your database structure & how your app retrieves and stores data as you chat.
When a feature requires storing data, it:
-
Designs the database structure based on your description
-
Makes Functions to save and retrieve data from the database
-
Designs the Pages and Components to display and interact with the data
-
Connects everything to make sure your Pages use the Functions that retrieve/store data.
For example, if you say “Make me a tasks app”, Create:
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
As you continue describing your app, Create updates your database structure, Functions and Pages to match what you want.
Here are common ways to modify your database through chat:
Setting the scene
It helps to start with a specific description of what you want your app to do.
Prompt:
Create will:
-
Make the tables needed
-
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
Adding Fields
Create will:
-
Add the description column to the Todos table
-
Update Functions to handle the new field
-
Modify the UI to display descriptions
Removing Fields
Create will:
-
Remove the priority column
-
Update queries to exclude the field
-
Clean up any UI elements showing priority
Adding Tables
Create will:
-
Make a new Comments table
-
Link it to the Todos table
-
Add UI for viewing/adding comments
-
Handle saving comments to the database
Changing Structure
Create will:
-
Convert the due_date field to a status field
-
Update existing data
-
Modify the UI to show status options
Relationships
Create will:
-
Add user relationships to todos
-
Update queries to fetch user data
-
Show assignee info in the UI
Filling Data
Create will:
-
Generate 10 sample todos with different statuses and assignees based on your structure
-
Insert the data into your database
-
Preserve relationships between tables
Validation
Create will:
-
Add validation rules to the database
-
Update Functions to check data
-
Show validation errors in the UI
Always describe both what data you want to store AND how you want to use it. This helps Create build the right database structure, Functions, and UI.
The more specific you are in your prompt, the better Create can help.
If you describe something at a high level, “make a todo app”, Create will guess what fields each todo should have.
If you describe what you want in detail, “make a todo app with a title, due date, and priority field”, Create will make sure each todo has those fields.
Viewing & Editing Data
Create comes with a built-in database viewer for manual edits to your data. You can quickly verify that data is being stored in the right way when you use your app.
Access it from:
-
Chat - tap the database
-
Project Selector- choose your database name
The database viewer lets you:
-
See all tables
-
Edit individual rows
-
Sort and filter data
-
Download data in bulk
-
Run custom SQL queries to fetch data
You can also make your own internal tools to update multiple tables at once:
-
Make a newPage
-
Describe your tool and how it should update the database
-
Try out your UI
Changes in Demo mode in the Builder use a test database. This lets you experiment safely without affecting your live data.
Test vs. Live DB
Create maintains separate test and live databases for each project:
Test Database
-
Used in Demo mode from the builder
-
Allows you to make sure your app is saving data correctly before publishing
Live Database
-
Used in your published app
-
Access your live database from the builder
Publishing
When you publish your app, 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 app with that structure
Errors
Here are some good ways to troubleshoot common errors:
Data isn’t saving or retrieving
If data isn’t saving when you use your app, there are 3 common failure points to check. Go in this order to test each isolation:
1. Database Structure
How to check:
-
Open the database viewer
-
Verify tables and fields match what you expect
If there’s an issue:
-
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 which function saves or retrieves data from the database. Tap on it.
-
Open the Test Runner (3-dot menu > Test)
-
Enter sample data and run the test
-
Check database viewer to verify data was saved
-
Delete test records if needed
If there’s an issue:
-
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 app in Demo mode from the UI
-
Check that data is being saved when you use the app in the database viewer
-
Verify your page/component references the correct function
-
Type
/
in chat to see if function is linked -
Try the flow in Demo mode
-
Watch database viewer to see if records appear
If there’s an issue:
-
Verify your page/component references the correct function
-
Example: “Connect the tasks form to the saveTask function when I submit a task”
-
Create will update the code to properly wire everything together
For any errors you encounter, you can paste them directly into Create’s chat. It often recognizes specific error patterns and knows how to fix them.
Reset
When you publish your app, 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 your database structure to match your published app
This is helpful when:
- 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
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
Removing 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
Select the database from the project selector
Look for the 'Remove from Project' button
Top right corner next to Reset and View Live
Confirm removal
Verify you want to remove this database from your project
If you had data in the database you removed, you can ask Create to update your single database with tables that support all of your use cases. It will update the remaining database to have multiple tables instead of having multiple databases.
Before removing a database, make sure you understand which app features are using it. Create will attempt to warn you if removing a database would break functionality.
Using an Existing Database
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 app
- You’re making a new app or frontend for the same data (e.g. an internal tool or another app)
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
When you add an existing database to a project, both projects will share the same data. Changes made in one project will be visible in the other.
This approach is excellent for creating multiple views of the same data, such as customer-facing apps alongside internal admin tools.
If you no longer want to use this database in your project, you can remove it from the project.
FAQ
Need help? Join our Discord community or email hello@create.xyz
Helpful Database Terms
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 explained:
Term | Definition | Example |
---|---|---|
Schema | The structure of your database (tables and fields) | Your app’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 |
Don’t worry about memorizing these! Just describe what data you want to store and how you want to use it - Create handles the technical implementation.
Was this page helpful?