Table Definitions

Available to: Developers, Admins Minimum plan: Free

A table definition is the blueprint for a reference data table. It describes the table's name, domain, and structure — the set of column definitions that specify each column's name, data type, constraints, and validation rules. Table definitions are metadata; the actual physical database table is created when you deploy.

Table definition show page


Table Definitions vs Deployed Tables

TitanRDM separates the definition of a table from its physical existence in the database:

ConceptWhat It IsWhere You Work With It
Table DefinitionThe editable metadata describing a table's structure (columns, types, keys). Lives on a branch.Development > Table Definitions
Deployed TableThe actual physical database table created from a table definition after deployment. Contains your data.Tables (sidebar)

This separation is fundamental to how TitanRDM works:

  1. You create or edit a table definition on your current branch
  2. You deploy to apply those changes to the physical database
  3. Users view and edit data in the deployed table

Changes to a table definition do not affect the deployed table until you explicitly deploy. This gives you a safe space to make structural changes, review them, and then apply them in a controlled way.


Table Definition Properties

When you create or edit a table definition, you configure these properties:

PropertyRequiredDescription
BranchYesThe branch this definition lives on. Pre-filled with your current branch (read-only).
DomainYesThe information domain this table belongs to (e.g., Finance, Sales).
NameYesA human-readable name for the table (e.g., Currency Codes). Must be unique within the branch. Must start with a letter or underscore.
Database Table NameNoThe physical name used in the database (e.g., currency_codes). Auto-generated from the name but can be customised. Must not contain spaces.
DescriptionNoFree-text description. Shown to users on the data entry page — useful for instructions or context.
Allow new rows to be added manuallyNoIf enabled, users can add new rows to this table through the UI. Data uploads are append/update only—new rows added by the user are preserved. If disabled, new rows can only be added to the table through an upload (manual or SDK/API). Users can still edit mappings, categorisation columns, etc. Upon upload, a full sync, including deletes, occurs. Generally suitable where the source is another system.
Lookup Display ColumnNoWhich column's value to show when this table is referenced by a foreign key in another table. Defaults to the first string column. Only available after columns are defined.
KeyAutoA system-generated numeric identifier that stays consistent across branches. Used to track the same table definition as it is promoted through environments.

Column Definitions

Each table definition has one or more column definitions that describe its columns. You manage columns from the Edit Columns page, which uses an interactive grid editor.

Column Properties

PropertyRequiredDescription
NameYesThe column name. Must start with a letter or underscore. Must be unique within the table.
Data TypeYesThe PostgreSQL data type. See Supported Data Types below.
LengthNoMaximum length for varchar/character, or fractional-second precision for timestamp/time types (0–6).
ScaleNoNumber of decimal places for decimal types.
Primary KeyNoMark this column as part of the table's primary key. At least one PK column is recommended.
RequiredNoIf checked, this column cannot be null.
Foreign KeyNoIf checked, this column references another table. Select the referenced table to enable lookup dropdowns in the data grid.
DescriptionNoDescribes the column. Shown as a tooltip in the data grid.
Valid ValuesNoA comma-separated list of allowed values. Enforced as a dropdown in the data grid.
Display OrderAutoControls the left-to-right order of columns in the data grid. Drag to reorder.

Importing Table Structure

Instead of defining columns manually, you can import a table structure from:

  • SQL DDL — paste or upload a CREATE TABLE statement and TitanRDM will parse the columns and data types
  • File upload — upload a data file (CSV, Excel, JSON, Parquet) and TitanRDM will infer the column names and data types using schema probing

See Importing Schema for more details.

This is a fast way to bootstrap a table definition from an existing source.


Supported Data Types

CategoryTypesNotes
Textvarchar, character, textvarchar and character support a length parameter. text is unlimited.
Integerinteger, smallint, bigintWhole numbers of different ranges.
Decimaldecimal, real, doubledecimal supports length (precision) and scale. real and double are floating-point.
BooleanbooleanTrue/false values.
Date/Timedate, time, timetz, timestamp, timestamptztimetz and timestamptz include timezone. Length parameter controls fractional-second precision (0–6).
BinarybinaryBinary data.

Lookup Table Columns

A Lookup Table column definition references another table definition. When editing data in the grid, Lookup Table columns display a lookup dropdown showing values from the referenced table. The dropdown shows the referenced table's lookup display column (configurable on the referenced table definition). A Lookup Table column definition will have its data type set to text and disabled.

Foreign key relationships also affect deployment ordering — TitanRDM automatically deploys referenced tables before tables that depend on them. There are controls to ensure that deployment ordering is respected when deploying tables.


System Columns

When a table definition is deployed, TitanRDM automatically adds system columns that you do not need to define:

System ColumnPurpose
trdm_skAuto-generated surrogate key (primary key for the physical table)
trdm_created_atTimestamp when the row was created
trdm_updated_atTimestamp when the row was last modified
trdm_updated_byThe user who last modified the row
trdm_is_deletedSoft-delete flag for tracking removed rows

These columns are managed by the system and are not visible in the column definition editor. They are visible (but disabled) in the Table data editor.


Table Definition Lifecycle

A table definition moves through several states during its life:

Create → Edit Columns → Deploy → (Edit → Deploy again) → Promote → Deploy on target branch
  1. Create — define the table name, domain, and load type
  2. Add/edit columns — define the structure
  3. Deploy — apply changes to create or alter the physical table
  4. Iterate — modify columns and redeploy as needed
  5. Promote — move the definition to another branch (Business/Enterprise only)
  6. Deploy on target — apply the promoted definition on the target branch

Note: A table definition that has been modified since its last deployment shows a "Needs Deploy" status on the dashboard and in the table definitions list.


Cloning Table Definitions

You can copy table definitions from higher branches to lower branches to make changes to them. Like best practice software development, you should only make changes in Private development branches. In-fact TitanRDM enforces this and doesn't support changes to table definitions directly in shared branches. To make changes to a table definition, you must first clone it to a Private development branch:

  • Switch to the parent branch and navigate to the Table Definitions page
  • Use the tick box column to select the table definition(s) you want to clone
  • Click the Clone button to clone the tables to your private development branch.

Alternatively.

  • Navigate to the Table Definition's show page - Development > Table Definitions and click on the table definition in the list
  • Click the Clone button to clone the table to your private development branch

Cloned definitions appear as new (undeployed) on your private development branch.


Removing Tables

  • Remove — permanently deletes the table definition and its deployed snapshot. The physical table is renamed with a _t_rem suffix so data is preserved, but the definition itself is hard-deleted and cannot be restored.
  • Automatic cleanup — physical tables left behind with the _t_rem suffix are dropped by a daily background job after 7 days.