Entities
Entities, fields, and records
Think of an entity as a table in a spreadsheet or database. It describes one kind of thing your business needs to keep track of. A products entity is the table for your products; a customers entity is the table for customers; an orders entity is the table for sales. Each entity has fields (the columns) and records (the rows).
| Prop | Type | Description |
|---|---|---|
| Entity | Table | The definition for one kind of business information, such as products, customers, or orders. |
| Field | Column | One detail stored for each record, such as product name, price, or stock quantity. |
| Record | Row | One real item in the table, such as a particular product or a specific customer. |
For example, the products entity can have name, price, and stock fields. Each saved product is a separate record. When your team adds a product, edits its price, or searches the catalog, the app is working with records in that entity.
An entity is the structured database table behind your app. Before storing information, you decide what the table needs to contain by adding fields such as name, price, and stock. A form then gives people a clear way to enter those values, and saving the form creates a record (a row) in that entity. Tauriam uses the field definitions to validate forms, show records in tables, filter and search data, and calculate values.
Use entities in pages
Pages are the screens people use to work with those database records. A page can show a table of products, a form to add or edit one product, summary cards, or charts. Build the entity structure first, then create pages that help your team use that data. See Pages for how entities and screens work together.
Create an entity
Open Settings → Entities to create or edit entities. Choose a field type based on the information you need to store, set required fields or defaults, and then use those entities in your pages.
- Entity names use lowercase letters, digits and underscores, such as
productsororder_items. - Give each field a unique name within its entity so its value is easy to identify in forms, pages, and formulas.
- Required fields must have a value before a record can be saved. Optional fields can be left empty; defaults fill a value in when the record is created without one.
- Choose
selectfor a short fixed list, such as order status, and a relation when a field should link to another entity.
products {
name: text
price: number
stock: number
}
customers {
name: text
email: email
}
orders {
customer: customers snapshot
status: select [draft, confirmed, shipped]
items: order_items[]
}