This topic defines the common terms used in Lindorm SQL, covering both LindormTable (wide table engine) and LindormTSDB (time series engine).
The following table shows which terms apply to each engine.
| Term | LindormTable | LindormTSDB |
|---|---|---|
| DATABASE | 〇 | 〇 |
| TABLE | 〇 | 〇 |
| PRIMARY KEY | 〇 | 〇 |
| TTL | 〇 | 〇 |
| COMPACTION | 〇 | 〇 |
| INDEX | 〇 | ✖ |
| DYNAMIC COLUMN | 〇 | ✖ |
| MUTABILITY | 〇 | ✖ |
| TAG | ✖ | 〇 |
| FIELD | ✖ | 〇 |
| TIME SERIES | ✖ | 〇 |
| DOWNSAMPLE | ✖ | 〇 |
DATABASE
A database is a structured collection used to store and manage data.
Supported by: LindormTable, LindormTSDB
TABLE
A table is a structured data object for storing and organizing data records. When you create a table, you define a schema that specifies the column names and data types.
Tables in LindormTable are called wide tables.
Tables in LindormTSDB are called time series tables.
Supported by: LindormTable, LindormTSDB
PRIMARY KEY
A primary key uniquely identifies each record in a table. Primary key values must be unique within a table and cannot be empty.
The composition of a primary key differs by engine:
In LindormTable: The primary key consists of one or more columns.
In LindormTSDB: The primary key consists of a timestamp column and one or more tag columns.
Limits for primary keys in LindormTable:
A single primary key column can be up to 2 KB in length.
The total length of all primary key columns cannot exceed 30 KB.
A non-primary-key column can be up to 2 MB in length.
Supported by: LindormTable, LindormTSDB
TTL
Time To Live (TTL) specifies how long data remains valid before it expires.
The scope of TTL configuration differs by engine:
In LindormTable: Configure TTL at the database level or the table level.
In LindormTSDB: Configure TTL at the database level only.
Supported by: LindormTable, LindormTSDB
COMPACTION
Compaction is a data management technology used to optimize and reduce the size of database files to improve database performance. The compaction policy varies by storage engine.
Supported by: LindormTable, LindormTSDB
INDEX
An index is a data structure that speeds up data retrieval and improves query performance by letting the database locate rows based on specific column values.
LindormTable supports multiple index types, including secondary indexes and search indexes. LindormTSDB does not support custom indexes.
Supported by: LindormTable only
DYNAMIC COLUMN
Dynamic columns are columns not defined in the table schema at creation time. In LindormTable, you can write data to dynamic columns at any time during normal operations. Whether dynamic columns are enabled is controlled by a table-level attribute set when the table is created.
Supported by: LindormTable only
MUTABILITY
Mutability is a table attribute in LindormTable that classifies the write pattern for a base table and determines how index data is organized. For more information, see Secondary indexes.
Supported by: LindormTable only
TAG
A tag describes a static characteristic of the data source that generates time series data. Tags do not change over time. Each tag consists of a tag key and a tag value, both of which are strings.
In a time series table, all columns in the primary index except the timestamp column are tag columns. To control sharding and improve query performance, specify a tag column as a primary key column when you create a time series table.
Supported by: LindormTSDB only
FIELD
Field columns store the measured values in a time series table. All columns except the timestamp column and tag columns are field columns.
Supported by: LindormTSDB only
TIME SERIES
A time series is the sequence of values recorded for a metric of a data source over time. A time series is determined by the combination of its tag columns.
Supported by: LindormTSDB only
DOWNSAMPLE
Downsampling is a query method that reduces the time granularity of sampled data. Use it when querying long time ranges where raw high-frequency data produces too many data points.
For example, if raw data is sampled every second, a downsampling query can aggregate it to hourly data points, reducing the size of the result set.
Supported by: LindormTSDB only