Adalo Resources
Sign Up for Adalo
Adalo Resources
Adalo Resources
  • 🚀Getting Started
  • 🎨Design
    • Designing Your App
      • Definitions and Terms
      • Creating an App
      • Using the Screen Size Switcher
      • Building with Sections
      • Alignment Tools
      • Using the Layout Tab
        • Screen Size Visibility
        • Sticky While Scrolling
        • Shared Layout Settings
        • Custom Layout Settings
      • Grouping Components
      • Responsive Navigation
        • Responsive Side Navigation
          • Side Navigation
          • Title
          • Menu Style
          • Menu Items
          • Bottom Button
          • Profile Section
        • Responsive Top Navigation
          • Navigation Bar
          • Title
          • Menu Items
          • Additional Navigation
          • Profile Image
      • Responsive Design Best Practices
    • Branding
      • Colors
      • Fonts
    • Create Component States
    • Preview Your App
    • Design Versions
    • Additional Design Resources
    • Migrating Legacy Apps
    • Legacy Builder
      • Create Component Containers
      • Positioning Components
      • Arranging and Grouping Components
      • Preview your App (Legacy Builder)
  • 🎬Actions
    • Action Basics
    • Links
    • Change Data
    • Notifications
      • Request Notification Permission in Your App
      • Trigger Push Notifications
      • Testing Notifications
      • Troubleshooting Notifications
        • Notifications Not Working on Android
        • Notifications Not Working on iOS
        • Notifications Not Working on PWA
    • Conditional Actions
    • Permissions
    • App Authentication
  • 🛠️Screens and Components
    • Screens
    • Deep Linking
      • Setup Deep Linking
      • Deep Linking With Data
      • Deep Linking Share Action
      • Deep Linking Redirection & Fallbacks
      • FAQs and Troubleshooting
    • Screen Navigation
    • Component Basics
    • Magic Text
      • Logged-In User vs. Current User
      • How to Format Dates and Numbers
      • Sums, Counts, Averages, Min and Max
      • How to Create a Custom Math Formula
        • Complex Calculations
    • Conditions and Filtering
      • Filtering in Adalo
      • Using Conditions in Adalo
    • Changing a Component's Visibility
    • Lists
      • Sorting and Filtering Lists
      • Creating Custom Lists
      • Lists of Lists
    • Buttons
    • Toggles
    • Forms
    • Simple Components
      • Image Component
      • Text Input
      • Webview Component
        • Troubleshooting Webview
          • Webview URL not loading in Adalo App
          • Webview crashing in Native App
    • Table Component
    • Video Component
    • Marketplace Components
      • How to Add Components from the Marketplace
      • Digital Purchases for In-App Purchases
      • Sign in with Google
      • Sign in with Apple
      • Maps
      • Bar Charts and Line Graphs
      • Pie Chart
      • Google Admob
        • Troubleshooting Admob
          • Ads Not Displaying in Native
      • Calendar
      • Progress Bar
      • Star Rating
      • Stopwatch
      • Slider
      • Lottie Files
      • YouTube
      • Audio Player
        • Troubleshooting Audio Player
          • Apple App Rejection: UIBackgroundModes key
      • Deck Swiper
      • Markdown Renderer
      • Signature
      • Stripe
        • Stripe Payment
        • Stripe Subscription
        • Stripe Connect Marketplace
          • Set up your Stripe Account for Stripe Connect
          • Allow Merchants to Connect their Stripe Account to your App
          • Stripe Connect
          • Stripe Marketplace Payment
        • Configuring Stripe Test Mode
        • Stripe Custom Actions
          • Get Stripe Subscription Data
          • Get Stripe Customer Data using Email Address
        • Legacy Stripe Components (Deprecated)
          • Marketplace Payments
            • Set up your Stripe Account for Stripe Connect
            • Allow Merchants to Connect their Stripe Account to your App
            • Configure Consumer Payment to go to Merchants' Accounts
          • One-time Card Payments
          • Subscription Payments
  • 🧱Feature Templates
    • Browse, Purchase, and Manage Classes
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Category List Screen
      • Classes List Screen
      • Class Details Screen
      • Purchase Screen
      • Congrats Screen
      • Admin Manage Clinics Screen
      • Admin Transactions Screen
      • Admin Create Clinic & Admin Edit Clinic Screens
    • Browse, Purchase, and Manage Events
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Browse Classes
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Category List Screen
      • Classes List Screen
      • Classes Details Screen
    • Classes Admin Dashboard
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Admin Manage Clinics Screen
      • Admin Transactions Screen
      • Admin Create Clinic & Admin Edit Clinic Screen
    • User Chat
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Conversations List Screen
      • Chat Screen
      • New Chat Modal Screen
    • Forum
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Group Messaging
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Messaging Screen
      • Edit Message Modal Screen & Edit Channel Modal Screen
      • Search Messages Screen & Channels Screen
    • Account Settings
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Account Settings Screen
      • Success Modal Screen & Delete Account Confirmation Screen
    • Appointment Booking
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Coaches Screen
      • Time Slots Screen
      • Book Appointment Screen
      • Coach Admin Screen
      • Edit Session Screen
    • Assign Tasks
      • Overview — Screens, Database, Layout Settings, Use Cases
      • My Tasks Screen, Team Tasks Screen, Completed Screen
      • Task Detail Screen
      • Edit Task Screen
    • Agree and Sign
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Terms Screen
      • Agree & Sign Modal Screen
      • Signatures Admin Screen
    • Announcements & Notifications
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Notifications Screen
      • Notify All & Notify One Screens
    • User Profile & Account Settings
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Setup Step 1 Screen
      • Setup Step 2 Screen
      • My Profile Screen
      • Additional Screens
    • Browse Users
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Browse Members & Profile Screen
    • Browse Dates
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Time Slots & Workout Screens
    • Browse Home Listings
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Listings Screen
      • Listing Detail Screen
      • Modal Image Gallery Screen
    • Image Carousel
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Screens
    • Image Gallery Modal
      • Overview — Screens, Database, Layout Settings, Use Cases
    • User Admin Dashboard
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Workout Assignment
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Social Media Feed
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Store with Shopping Cart
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Inventory Management
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Video Gallery & Upload
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Restaurant Ordering
      • Overview — Screens, Database, Layout Settings, Use Cases
  • 🗃️Database
    • Database Property Types
    • Relationships
      • One-to-Many vs. Many-to-One
      • Many-to-Many
    • The User Collection
    • Collection Permissions
    • Importing Records from a CSV File
    • Download your Collection as a CSV File
    • Location
      • Getting Your Google API Key
      • Estimating Google API Usage
      • The Location Property Type
      • Location in Forms and Inputs
      • Location Magic Text and Formatting
      • Getting the User's Location
      • Latitude, Longitude, and Special Formulas
      • Comparing Locations
      • Troubleshooting Location Features
  • 🪄Settings
    • Copying vs Cloning your App
      • How to Copy and/or Delete an App
      • Cloning Apps and Making Apps Cloneable
  • 🚀Performance
    • Builder Performance Tips
    • Optimize App Performance
      • Image Optimization
      • Five Tips for Improving Your Adalo App Performance
  • ✍️Publishing Apps
    • Publishing to the Web
      • Publish to Adalo Subdomain
      • Publish to Custom Domain
      • Troubleshooting Domain Setup
        • Custom Domain is Not Secure
        • Domain Could Not be Verified
        • Error: Not Found
    • Publishing to the Google Play Store
      • Create Your Google Developer Account
      • Create your Firebase Project
      • Register Android App & Download Config File
      • Generate & Download Private Key
      • Get your Build file
      • Create New Google Play Listing
      • Upload your Build file to Google Play Listing
      • Finalize Listing and Release App
      • Troubleshooting Android Release
        • Google Play rejected the app due to data safety issues
        • Error: Android App Signed with Wrong Key.
        • Error: Version Code 'xxx' has already been used. Try another Version code.
        • Error: Package Name already exists in Google Play.
        • Error: Upload a valid app bundle.
        • Error: Existing Users Can't Upgrade to New App Bundles.
    • Publishing to the Apple App Store
      • Create Your Apple Developer Account
      • Setup Annual Payment for your Apple Developer Account
      • Create Your Apple Bundle ID
      • Create Your Adalo ‘App-Specific Password’
      • Start your Build in Adalo
      • Add Users to Your App Store Connect Team
      • Add Users to Testflight
      • Creating Screenshots for the App Store
      • Privacy and App Tracking Transparency
      • Troubleshooting iOS
        • Build Error: You have reached the maximum number of certificates
        • Build Error: You have already reached the maximum allowed number of keys for this service
        • Build Error: Distribution certificate has expired
        • Build Error: Asset Validation Failed - Invalid App Store Icon
        • App Rejected: Add Permission Text to Your iOS Build
        • Delivery warning during the app submission process: ITMS-90899
        • iOS Build Not Showing in Testflight
        • Apple Two-Factor Authentication Error
    • Publishing to the Web (Legacy Apps)
    • Uploading .APK (Legacy)
    • Publishing FAQs
    • Troubleshooting
      • Build Stuck in Queue
  • ▶️Videos
    • Getting Started
    • Full Walkthrough
    • Working with Data
    • Designing your Database
    • Custom Lists
    • Changing Component Visibility
    • Forms
    • Ordering & Payments
    • Math & Custom Formulas
    • Chat
  • 👩‍🏫Tutorials
    • How to Use Keyboard Shortcuts
    • How to Embed Video or Audio (YouTube, Vimeo, SoundCloud)
    • How to Share a Database Between Apps
    • How to Create an Empty State
    • How to Create a Search Bar
    • How to make a list your users can filter
    • How to Create a Modal/Popup Window
    • How to create a "Favorite" button (Legacy Builder)
    • How to add an Image to an App Bar
    • How to send Scheduled Push Notifications
    • Start Maps Navigation in Your Adalo Apps Using Google Maps, Apple Maps, or Waze
    • Generating Map Previews in Your Adalo App Using the Google Static Maps API
    • Special Links: Email, Text (SMS), and Phone
    • How to have a Dropdown Menu in a Form
    • How to Setup a Shopping Cart with Payments
    • How to set up a Public Profile screen for Users
    • How to Allow Users to Follow Others
    • How to have a Form Automatically Set a Relationship
    • How to add Chat to your App
    • How to Create Multi-Sided Apps
    • How to Add an "Add to Calendar" Button for Events
    • Forwarding Domain to Root Address
    • How to Create Temporary User Avatars
    • How to Set Up a Social Media List
    • How to Play Your Spotify Podcast in Adalo’s Audio Player
  • 🧩Integrations
    • The Adalo API
      • Collections API
      • Send Push Notifications via API
    • Xano
      • Setup Your Xano Workspace
      • Connect Xano with Private Swagger
      • Connect Xano to an Adalo App
      • User Signup, Login, Authentication
      • Google Sign In with Xano Database
      • Other Collections
      • Working with Data Types in Adalo and Xano
      • Counting Records with Xano
      • Lists and Pagination
      • Xano Response
      • Xano Tips and Tricks
      • Troubleshooting
    • Accessing your Record ID
    • Custom Actions
      • ✨Power Your App with ChatGPT
    • External Collections with APIs
      • Magic Text in External Collections
    • Airtable
      • Connecting to Airtable
      • Adding/Deleting Properties
      • Displaying Images
      • Working with Lists
        • Images In Lists
        • Filtering Airtable Lists
        • Magic Texts in Lists
        • Limiting the Number of List Items
        • Sorting Airtable Lists
      • Working with Forms
        • Airtable Dropdown fields & Validation
      • Working with Attachments, Images and Airtable relationship Fields
      • Relationships & Airtable Collections
      • Debugging
    • DreamFactory
    • Zapier
    • Make (Formerly Integromat)
      • Create a PDF from a record in Adalo
      • Notification in Slack when a new user registers in your Adalo app
      • Send verification email to new sign ups
      • Send a verification SMS to new sign ups
      • Send a file to Google Drive from Adalo
      • Send new files from a Google Drive folder to an Adalo collection
      • Use Google Vision for OCR an image and store the text results in an Adalo record
    • IAPHUB
    • Mixpanel
    • Troubleshooting the Adalo API
      • List inside of a List not loading
      • Error Codes
  • ⚙️Adalo Account
    • Account
      • Updating Email and Password
      • Enabling Developer Mode
    • Team Members
      • Add Team Members to Your Adalo App
    • Apps
    • Usage and Billing
      • Billing, Invoices, and Payments
      • App Actions Dashboard
    • Domains
      • Resetting SSL
  • ❓FAQs
    • General Questions
    • What can Adalo do?
    • Adalo Pricing: FAQs
    • Adalo Account: FAQs
    • Adalo Subscription Add-Ons
    • Working with an Adalo Freelancer
    • Adalo Experts
    • Adalo Affiliate Program
    • Adalo Pricing: Legacy Accounts
  • 🤔Troubleshooting
  • 📚Additional Resources
    • Adalo App Academy
      • Introduction to Apps
      • Strategy and Business
      • Design
      • Build
      • Launch & Iterate
      • Freelancers & Agencies
      • All Courses
    • App Development Cost Calculator
    • Hire an Adalo Expert
    • Adalo Forum
  • 📖Glossary
Powered by GitBook
On this page
  • Before You Begin
  • An Overview of the Database
  • Walkthrough
  • Example
  • Learn More
  • Related
  • Connecting Data to Screens
  • Help

Was this helpful?

Database

Creating logically organized databases is key to building your app. You'll learn what a database is, how to structure it, and some killer tips and tricks to help make your databases amazing!

PreviousOverview — Screens, Database, Layout Settings, Use CasesNextDatabase Property Types

Last updated 1 month ago

Was this helpful?

Skill Level: Beginner

Before You Begin

  • Make sure you have signed up for a free Adalo account and are signed in

  • Be familiar with what a is (Excel or Google Sheets).

  • You do not need a paid Adalo plan to use this feature

An Overview of the Database

Walkthrough

Let's walkthrough how to setup a simple database for a Trip app with different properties, relationships, records, and collections. Please click the In-Depth tab of this walkthrough for more information about these terms.

3.) Name the new Collection "Trips" and click Add

4.) An initial property is provided for you called Name since a collection must always have at least one property, but you can change this property's type, title, and order within the other properties of the collection if there are any. Let's rename this property to "Title" by clicking on it, then filling in the input field.

6.) Rename the new date property something like "Trip Start Date" and click Save.

7.) Every trip needs a trip leader, but we don't want to have to add properties about a trips leader when we already have that information in the User's collection. Instead, let's add a Relationship property in the Trips collection. In the Trips collection, click + Add Property again except this time, choose Relationship, then choose Users. This creates a link between the Trips collection and the Users collection and as a result two properties are actually created - one in the Trips collection and one in the Users collection.

8.) Now Adalo is asking us what type of relationship this is. We can think of this in terms of what role the user plays in the relationship. In this case, a person might be the leader of multiple trips but each trip can only have one leader so we would choose Option 1 here, then click Done.

It is also possible to create this same relationship from the User's collection instead, only this time the logic is being viewed from the opposite collection so we would choose Option 2. Both ways are correct. You can think of this as looking through a pipe from two different ends - what you see from both ends is the same, only mirrored.

9.) Now that we have a Relationship property setup, we can't forget to rename these properties in both the User's collection and the Trips collection. Let's rename the User's collection one "Trips Led" and the Trips collection one "Leader". You can rename them by clicking on the collection, then the relationship property, then filling in the field.

11.) In the top right of the database popup, click on the + Add Trip button. Some inputs will appear for the properties we added like Title and Trip Start Date. Go ahead and fill this in how you like, then click Save. You'll notice that the dropdown for Leader does not contain any options because we don't have any users yet! Why don't you try adding some users manually as well, then link them to some trips?

12.) Now that we have a database setup and some records inside it, we can use this data in Lists in our app. We can also create Forms for our users to create and update their own Trips in the database!

Before you start building your database, let's look at what a database actually is. A database is simply an organized collection of information that is accessed electronically. A database allows users to Create, Read, Update, and Delete information that is stored on a computer. We call these functions CRUD for short.

The most common analogy used to describe databases is that "it's like a spreadsheet". While it is true that a spreadsheet can function as a database, the two are not quite the same. Let's take a look a diagram to see some differences.

Adalo Database Basics

Upon opening the Database for your app, you will see the first and most important component of the Adalo Database - Collections.

1.) Collections

Collections divide the database into tables that correspond to different types of data. You can think of these as the "nouns" in your app such as Restaurants, Trips, Users, Orders, Menus, Activities, etc. In the same way that you might have a table of Users and a table of Events, you would have a Users Collection and an Events Collection. By default, every app starts with a Users collection and you get to add the rest!

It's often hard to determine what deserves its own Collection. To make it easier to determine your Collections, you can think about things that can be listed out, seen, or created by your users. Take, for instance, a social media app with Users and Posts where Users can "like" a post. It may be tempting to also create a Likes collection, but when we list Likes, we are really listing Users who "like" a specific post.

If you click on a Collection, it will drop down a list of more options for you to add and change called Properties.

2.) Properties

These properties define the characteristics of an item that might be in a Collection. In our User's Collection example, users may have a name, an email, a birthday, a profile photo, or even an eye color. All of these are considered properties of that user.

There are different types of properties that you can add as well that define the type of data that you put in. To add a property to a collection, click +Add Property

  • Text - Commonly known as a "string", this can be comprised of text, numbers, or symbols

  • True/False - Commonly known as a "boolean" value, true/false is visualized as a checkbox

  • Date/Time - Allows you to store date and time properties to the database. They are stored as UNIX timestamps in the database, but shown to us as friendly dates in various formats. Can be used in Custom Formulas.

  • Date - This property stores dates only and does not store time information. It's also stored as UNIX timestamps and shown to us in friendly formats. Can also be used in Custom Formulas.

  • Image - This property stores images into the database. It also allows you to access the stored image's public URL link as well. The file size limit is 50MB.

  • File - This property can hold any file type in the database. From PDFs and JPGs to Powerpoint and .MP4 files. The file size limit is 50MB.

  • Relationship - This property lets us link two collections together. Read on for more information on this property type.

Properties can be renamed simply by clicking on them and changing the input field. They can also be reorganized if there is more than one property by clicking and dragging them within the stack of properties.

A collection must always have at least one property. The Users collection has 4 properties that cannot be deleted, only renamed: Email, Password, Username, and Full Name.

3.) Relationships

Sometimes, instead of having to store hundreds of properties for a record, we create special types of Properties called Relationships (or links) between Collections to reduce the clutter in the database. In our Users and Events example, an Event may have an event host. But instead of creating properties in the Events collection to hold the host's name, email, and photo, we can create a relationship between the Users and Events collection. This allows us to lookup information about an Event's host from the Users collection without creating extra properties in the Events collection. Relationships also go both ways across collections - they are what is called "reciprocal". In the same way that User's may have Events they are hosting, Events will also have a host. There are 2 main types of relationships in Adalo that refer to the number of records that are being linked across Collections:

  • One-to-Many: This means that one record has a relationship with multiple other records in a different collection. The logic of this manifests itself in two ways - one from the collection you are viewing and the other from the collection you are linking to. For example, a single user can host multiple events or multiple events can have a single host - both are true one-to-many descriptions of the relationship.

  • Many-to-Many: This means that records from both collections can link to multiple records from another collection. For example, it's possible that events have multiple hosts and that hosts have multiple events.

In Adalo, anytime you setup Relationships between collections, you will be asked to define type of Relationship the Collections share. Again, these are really only two types (One-to-Many and Many-to-Many), but they are shown as 3 options depending on the usage.

When creating Relationships, it's often useful to think about what role each Collection plays in the Relationship. In the example above, we might want to create a relationship that defines that an Event can have only 1 Host. So instead of reading the options with the term "User", we can replace "User" with the word "Host" to get a better sense of which option to choose. In this case, it would be Option 1. Which one would you choose if we were creating a relationship between "Participants" and Events? Try it for yourself!

4.) Records

Records somewhat describe themselves in that they hold (or record) information within a Collection. Records are visually similar to rows in a spreadsheet except that all the cells in the row are bound to each other. In our Users example, 1 user would be considered 1 record in the Collection.

Example

Learn More

  • Properties may be left completely empty or not used at all

  • While One-to-One relationships do not exist in Adalo, sometimes it is necessary to adapt the One-to-Many relationship type for this purpose. These instances are rare, but do crop up from time to time. For example, if an event host can only be assigned one event at a time and the event can only have one host. The "Many" side of the relationship can be disregarded.

  • The first property in a collection is used by Adalo as the records' label. Typically unique values work best here and it's best not to leave the first property blank.

  • When uploading a CSV, relationships can only be imported if the value matches the label of the related collection. Typically numbers or IDs work best for this.

  • When creating properties, be sure to properly name them so you don't get confused later on. This is particularly important for Relationships since it creates properties in both related collections. Don't forget to name the relationship property in the other collection too!

  • When working with relationships please be aware that the first property on your "related" collection will be the one that will show up in your Relationship. If you are willing to pull another property from your "related" collection, you will have to make this property the first one in the Collection.

Related

Connecting Data to Screens

Watch this short video to learn how to connect Collections to your screen components.

Help

1.) To get started, click on the Database tab on the lefthand menu in the Adalo Builder

2.) You'll notice that a User's collection is provided for you by default - this collection cannot be deleted, only modified. Let's add another collection called Trips by clicking the +Add Collection button

5.) Next let's add a Date property to hold the date that a Trip begins. In the Trips collection, click on the + Add Property button and select Date.

10.) Now we have a basic database for Trips that have a title, start date, and a leader, but we don't actually have any Trips (records) in our database yet. We could build a form so that our users could create and add their own Trips, or we could also add records manually to the Database. To add them manually, just click on the Trips collection then click on the Records button.

You can also upload records to your database by .

In Adalo, anything related to the Database is marked by a magical Red color like you see in the iconic big plus sign . You can access the Adalo Database by clicking on the red Database button in the Adalo Builder:

Number - Commonly known as an "integer", this can only be whole numbers or decimals. It does support negative numbers and up to 15 digits. Can be used in .

Properties, including Relationships, can also be visualized as columns in Adalo's database, by clicking on the Records for the Collection which will also display the Records within that collection.

Ideally, your app will contain and other methods of allowing users to create, update, and delete records from the database, but you can also add records manually by clicking on +Add _____ in the top right of the records view. You can also search your database and to your Adalo collections using the buttons in the top right corner.

Now that you've got the basics of how to build a database, be sure to check out the cloneable version of the app used in this walkthrough by .

If you would like to further understand how to work with Relationships you would want to take our from .

If you need additional help with this article, you can always ask in our! Be sure to paste the link to this article in your post as well!

Do you have a tutorial or help doc request?

🗃️
Importing a CSV file
Custom Formulas
forms
upload or download .CSV files (spreadsheets)
clicking here
Collection Permissions
Importing Records from a CSV File
Location
Create a Robust, Flexible Shopping Cart System course
The Adalo App Academy
community forum
Let us know!
spreadsheet
Some sample Collections
Properties within a Collection called Users
Different property types you can add to your Collections