Table Definition Language (TDL)
Tavlon's Table Definition Language, or TDL, is a readable text format for defining table structures. A TDL file can describe table names, descriptions, headers, columns, data types, required fields, optional fields, nested columns, linked tables, and records.
The goal is to define the table once in text and reuse that definition across visual views, documents, exports, and other structured outputs.
Basic Table Structure
A Tavlon table starts with a table name, followed by a colon and a block enclosed in braces. Inside the block, the table can have an optional description, a required header section, and an optional records section.
Locations: {
description: "Locations used for planning and scheduling"
header: {
STRING Name *Required,
STRING Address *Optional
}
}In this example, Locations is the table name. The header section defines the table structure. The records section contains table data.
Headers and Columns
The header section defines the columns in the table. A column can include a data type, a column name, optional allowed values, optional child columns, and optional modifiers.
header: {
STRING Name,
STRING Address,
INTEGER Capacity,
BOOLEAN Active
}Column names are identifiers. They can contain letters, numbers, underscores, and dashes, but they must start with a letter.
Supported Data Types
TDL supports common scalar types and structured types.
STRING
INTEGER or INT
DOUBLE
BOOLEAN
DATE
TIME
Object
Array
Dates use slash-separated values, such as 01/15/2026. Times use a colon, such as 09:30. Boolean values are true and false.
Required and Optional Fields
A column can be marked as required or optional using modifiers.
header: {
STRING Name *Required,
STRING Address *Optional,
INTEGER Capacity *Optional
}These modifiers make the expected meaning of a column explicit in the table definition itself.
Nested Columns
A column can contain child columns. This allows a table definition to describe grouped or repeating structures without switching to a separate visual designer.
Locations: {
header: {
STRING Name *Required,
Array Shifts (
STRING ShiftName *Required,
TIME StartTime *Required,
TIME EndTime *Required
) *Optional
}
}In this example, Shifts is an array column with child columns for the shift name, start time, and end time.
Records and Rows
Table data can be placed in a records section. Rows are separated by semicolons, and cells are separated by commas.
Locations: {
header: {
STRING Name,
STRING Address,
INTEGER Capacity
}
records: {
"Main Office", "100 Main Street", 25;
"Warehouse", "200 Industrial Road", 40;
}
}Cell values can include text, identifiers, integers, doubles, booleans, dates, times, arrays, and objects.
Linked Tables
A column can link to a column in another table. This allows one table definition to reference another table definition.
People: {
header: {
STRING Name *Required,
STRING LocationName LinkTo:(%table:Locations, column:Name, ifinvalid:"Location was not found")
}
}The LinkTo modifier specifies the linked table, the linked column, and an optional message to use if the linked value is invalid.
Why TDL Is Useful
Table structure is readable as text
Definitions can be versioned and audited
The same definition can support multiple outputs
Nested and repeating table structures can be described explicitly
Linked tables can be represented in the definition
TDL is not intended to replace a database or spreadsheet. It gives Tavlon a structured, reusable definition of a table so that the table can be rendered, stored, reviewed, and exported consistently.