Skip to main content

Knowledge Base

Database

Instance comes with built-in database support. When your app needs data storage functionality, Instance will automatically identify that need and create a database for you.

Instance adds database functionality whenever needed

You don't need to specify anything to enable this feature. If your app needs to store data permanently, Instance will automatically add database functionality.

Take a look at the example prompt below. Simply describing the feature you want Instance to implement is sufficient.

Example
Create an employee dashboard that allows me to add and remove employees. I would like to set the name, date of joining, and role for each employee. All employees should be visible on the dashboard.

If you want to be sure, you can specify "use a database to save my data," though this typically isn't necessary.

One shared database

It's important to understand that your app will have one shared database for all its users. When one person adds information, it is saved in the shared database. Also, if you make changes while developing your app and have users on your published live version, both will access the same database.

You can ask Instance to create roles and control access permissions. For example, some users might only see their own data, while others (like admins) can manage everything. These roles are stored in your shared database, so any changes apply to all users immediately.

Viewing the data

Instance provides a convenient way to view all the data in your app's database. In the Database view, you can see all the tables — like spreadsheets — with rows for each entry and columns for the values.

For example, you might have a table of employees showing their names, joining dates, and titles. In addition, you can also see when each entry was created.

Instance's database viewer

Editing the data

You can't edit the database entries directly in the code or the database viewer. If you want to alter data, you have two options:

  1. Ask Instance to add, remove, or alter data directly
  2. Build an interface for managing data, and then make changes through that interface.
Instance can directly alter the database if you ask to do so

Platform differences

Accessing the database view is currently only available through https://instance.so, not through the mobile apps. However, you can still work with databases and ask Instance to manipulate your data directly on all platforms.