[]
A table schema defines how raw data is interpreted and managed inside DataManager.
Within a schema, columns are the core modeling units.
Each column describes how a field in a record behaves inside a table.
Columns are not UI elements.
They are data modeling definitions that determine identity, type, behavior, and presentation metadata.
When data is loaded into a table, each object in the data source becomes a record (row).
const table = dataManager.addTable("orders", {
data: [
{ id: 1, price: 10, quantity: 2 }
],
schema: {
columns: {
id: { dataType: "number", isPrimaryKey: true },
price: { dataType: "number" },
quantity: { dataType: "number" },
total: {
dataType: "formula",
value: "=[@price] * [@quantity]"
}
}
}
});In this example:
id defines record identity.
price and quantity define typed fields.
total is a computed column derived from other fields.
Without column definitions, fields are interpreted using default behavior.
By defining columns explicitly, you control how data is structured and managed.
A column definition can specify:
How a field maps to raw data
How its value is parsed and typed
Whether it uniquely identifies a record
Whether it is computed or event-driven
Validation and indexing behavior
Default presentation metadata
To keep responsibilities clear, column configuration is organized into the following categories:
Define identity and structural mapping.
Examples include:
Column name and data mapping
dataType
isPrimaryKey
Formula-based value definitions
These settings determine how records are structurally interpreted.
Control how column values behave after parsing.
Examples include:
Required and readonly rules
Default values
Parsing patterns
Indexing
Display substitutions for null and empty values
These settings influence validation, normalization, and performance.
Enable dynamic and relational behaviors.
Examples include:
Formula columns
Trigger formulas
Lookup definitions
Relationship-aware capabilities
These settings introduce computation and controlled value domains.
Define default presentation behavior when rendered by a view.
Examples include:
Caption and width
Cell styles and header styles
Conditional formatting
Validation rules
Interaction controls
These settings do not modify stored data.
They provide baseline metadata that views can consume and override.
Column definitions belong to the table schema.
They:
Model how data behaves inside DataManager
Remain independent from specific UI implementations
Views consume column metadata to render data.
View-level configuration can override presentation-related settings without altering the schema.
This separation ensures that data modeling and presentation remain decoupled within the documentation system and the product architecture.