How to define the structured data model that underpins your application
Overview
Every Rayven application requires at least one table to store structured data. Tables define the schema and structure of the information your application will capture, display, and process. The first table you create—your Primary Table—is essential, as it anchors your app’s data model and enables the use of advanced features like labels, workflows, and user access filtering.
This guide walks you through creating your first table in the Rayven Workspace, covering Primary Tables, column configuration, data formats, and label types.
Accessing the Tables Section
To begin creating your first table:
-
Log in to the Rayven Workspace: https://workspace.rayven.io
-
Open the relevant application from the My Apps list.
-
Click on the Configure Tables option.
Creating the Primary Table
Every Rayven app requires a Primary Table. This is where your core records will live—such as customers, jobs, products, or assets. Each row must have a unique identifier (UID).
When you create your first Primary Table:
-
It must contain at least one record.
-
A default label column (
Primary Label = All
) is automatically included to enable application access and filtering.
Adding Columns to the Primary Table
Each column defines a data field. You can add columns via the table editor interface.
Column Configuration Options:
-
Name – the display name of the column
-
Data Type – choose from options like Text, Number, Date, Boolean, etc.
-
Label Type (optional) – see below for label types
-
Default Value – optionally set an initial value
-
Required – ensure a value must be entered
-
Unique – enforce uniqueness across records
Understanding Label Types
Labels are used to group and filter your data. When applied to columns, they determine how users and workflows can interact with and filter data records.
Label Type Options:
Label Type | Description | Performance Impact |
---|---|---|
Default | A regular column with no grouping or filter capabilities | Most efficient |
Single Label | Allows grouping/filtering by a single label value per row | Medium |
Multi-Label | Allows rows to have multiple labels and supports advanced filtering logic | Least efficient |
By default, every Primary Table includes a column with the Single Label setting: Primary Label = All
.
Adding Records to the Table
Once your table structure is defined, you can:
-
Add rows manually via the UI
-
Import data from a CSV file
-
Populate the table dynamically via workflows
- Create an interface that writes to the table via a workflow — for example, through a form or user interaction
Each row should have a unique value in the UID column.
Best Practices
-
Start with your core records — your Primary Table should represent the key entities that your app revolves around (e.g. customers, jobs, assets).
-
Use Secondary Tables for everything else — additional record types, lookups, child records, and form data should be stored in Secondary Tables to keep your model modular and clean.
-
Use clear, simple column names — these names appear in workflows and interfaces.
-
Be selective with label usage — labels are powerful for filtering and access control, but only apply them when grouping is required.
-
Avoid over-constraining fields — use
Required
andUnique
only where necessary to maintain flexibility during development.
What Happens Next?
Once your Primary Table is created, you can optionally add Secondary Tables to support additional structured data, such as:
-
Other record types related to your app’s domain but not suited to the Primary Table (e.g. in a CRM it might be opportunities, projects, contacts, quotes etc.)
-
Lookup values (e.g. status options, types, categories)
-
Child records (e.g. line items for a quote, tasks for a project)
-
Form submissions or activity records linked to a UID
-
Relationships to other entities (e.g. linking assets to sites)
You’ll then proceed to create a Workflow that uses and interacts with your table data.
Summary
Your Primary Table is the foundation of your application’s data model. It stores your main record type and enables grouping, filtering, and time series processing through unique UIDs and labels. But it’s just the beginning.
Rayven applications often include multiple tables—Secondary Tables are designed for everything that doesn’t belong in the Primary Table: related records, child entities, reference data, and structured form submissions. By separating your data into well-scoped tables, you keep your app scalable, logical, and easier to maintain.
FAQs
What’s the difference between a Primary Table and a Secondary Table?
Primary Tables store the main records for your application and are required. Secondary Tables support or extend those records with related data and can be linked via UID or label values.
Why does my table already have a label called “Primary Label = All”?
This default label ensures all users and workflows can access the full dataset unless more specific filters are applied later.
Do I need to assign labels to my columns?
No, label assignment is optional. Use them when you want to group or filter data, especially for controlling user access or interface display logic.
Can I rename my Primary Table later?
Yes, table names and column configurations can be edited from the Tables section, but changes may affect workflows or interfaces already relying on those names.
How is data stored in Rayven after it’s added to a table?
Structured table data is stored in MySQL. Any unstructured or time series data generated by workflows is stored in the Cassandra database, indexed by UID, node ID, and timestamp.