Collections & Data Modeling
Model your platform's data with collections, properties, and entities.
Concepts
- Collection: a type of record in your platform — for example, "Articles", "Customers", or "Events". A collection defines the shape of its records.
- Property: a single field on a collection, such as a title, a date, or an image. Each property has a name and a type.
- Entity: an individual record that belongs to a collection. If "Articles" is the collection, each article is an entity.
Open Collections from your project's side menu to get started.
Creating a Collection
- Go to Collections.
- Click Create and enter a name.
- Open the new collection to define its properties.
Defining Properties
Inside a collection you build its list of properties. For each property you set:
- Property name: how the field is labelled.
- Type: the kind of value the field holds (see below).
- Required: whether a value must be provided.
- Validation pattern: an optional regular expression the value must match.
- Max repeat: how many times a repeating property may occur.
You can group properties into sections to keep larger collections organized.
Property Types
The builder offers the following field types:
| Type | Use for |
|---|---|
| Text Input | Short single-line text |
| Text Area | Longer multi-line text |
| Number | Numeric values |
| Toggle | An on/off switch |
| Checkbox | A boolean check |
| Single Select | One choice from a set of options |
| Multi Select | Several choices from a set of options |
| Date | A calendar date |
| An email address | |
| Phone | A phone number |
| Address | A postal address |
| Address w/ Country | A postal address including a country |
| Color | A color value |
| Image | An uploaded image |
| File | An uploaded file |
Select and multi-select properties draw their options from another collection, so you can link records together.
Adding Entities
Once a collection's properties are defined, you can add records:
- Open the collection and click View entities.
- Click Create to add a new entity.
- Fill in the fields according to the collection's properties and save.
If you change a collection's properties after entities already exist, any entity whose stored data no longer matches the current shape is flagged so you can update it.