How to configure your core application tables to structure and manage data in Rayven.
Overview
Tables in Rayven store your structured data and form the backbone of your application. Every Rayven application must have a Primary Table, which holds the unique identifiers (UIDs) against which both structured and unstructured data is stored. Secondary Tables are optional and extend the Primary Table with additional, related datasets. This page explains how to set up these tables, configure their columns, and link them effectively.
Primary Tables
The Primary Table stores the core records for your application — for example, customers, products, or assets. Each row in the Primary Table contains a UID (unique identifier) that anchors all related data in your application, including workflow data stored in Rayven’s time-series Cassandra database.
When configuring your Primary Table:
-
Required: Your application must have at least one row in the Primary Table.
-
UID: Automatically generated or manually entered unique identifier for each row.
-
Column Types: You can add columns for text, numbers, dates, booleans, and more.
-
Labels: Use label-type columns for grouping and filtering records. You can choose:
-
Default (No Labelling) – Most efficient; no grouping.
-
Single Label – Group by this value independently.
-
Multi-Label – Group and combine with other multi-label columns for multi-level filtering.
-
Secondary Tables
Secondary Tables are used to extend the Primary Table with related or supporting datasets. They can contain multiple rows related to a single Primary Table record. For example:
-
Contacts for a Customer
-
Tasks for a Project
-
Components for a Product
When adding a column to a Secondary Table, you can configure:
-
Key Column – Unique identifier for each row, required for adding/editing via workflows.
-
Unique Values – Ensures all values in this column are distinct.
-
Required Value – Prevents blank entries in this column.
-
Column Lookup ID – Extra identifier for advanced lookups in the workflows, or CSV imports.
Linking Tables
You can link a Secondary Table to a Primary Table so that its rows are directly associated with a Primary Table record. This ensures data consistency and simplifies lookups in workflows.
There are two main methods:
-
Using the Table Linking Options (UI method)
-
Available in the Actions menu on a Secondary Table.
-
When you select Table Linking Options, you can choose:
-
Regular (Default) – No linking is applied.
-
Link to UID – Ensures the column value must match a valid UID from the Primary Table.
-
Link to Label – Ensures the column value must match a valid Label value from the Primary Table.
-
-
Linking via this method enforces data integrity automatically.
-
-
Manual linking via workflows
-
Use workflow nodes such as Query Table, Update Table, JavaScript, or UI Code nodes to reference and validate values from another table.
-
This method provides more flexibility but relies on your workflow logic to ensure linked values are valid.
-
Best Practices for Table Setup
-
Always define the Primary Table first before creating Secondary Tables.
-
Use labels sparingly unless grouping/filtering is essential for your application.
-
Keep column names concise and descriptive to improve workflow configuration and maintenance.
-
Use Key Columns in Secondary Tables if workflows will update rows programmatically.
Summary
Primary and Secondary Tables form the structured data layer in Rayven. The Primary Table anchors all data with UIDs, while Secondary Tables enrich it with related records. Correct configuration of columns, labels, and linking ensures data integrity and supports advanced workflows, filtering, and interface functionality.
FAQs
Do I need a Primary Table in every application?
Yes. Every Rayven application requires a Primary Table with at least one row.
Can I link two Secondary Tables directly?
Not through the UI — but you can do this using workflow logic with table nodes or JavaScript.
What happens if I change a Primary Table’s UID?
Changing a UID will orphan all data previously associated with that UID. This means existing workflow data, linked Secondary Table rows, and any other references to the old UID will no longer be connected to the record. Use extreme caution and only change UIDs if you fully understand the impact.
Are labels required in the Primary Table?
No. Labels are optional. If you don’t need grouping or filtering, use the default label setting for simplicity.