Skip to content

Commit 0a7f20b

Browse files
committed
Add basic concepts docs for V2.0.x
1 parent 4f2f08d commit 0a7f20b

28 files changed

Lines changed: 1504 additions & 29 deletions

src/.vuepress/sidebar/V2.0.x/en-Table.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export const enSidebar = {
3838
collapsible: true,
3939
prefix: 'Background-knowledge/',
4040
children: [
41-
{ text: 'Common Concepts', link: 'Cluster-Concept_apache' },
42-
{ text: 'Timeseries Data Model', link: 'Navigating_Time_Series_Data_apache' },
41+
{ text: 'Basic Concepts', link: 'Common-Concepts_apache' },
4342
{ text: 'Modeling Scheme Design', link: 'Data-Model-and-Terminology_apache' },
4443
{ text: 'Data Type', link: 'Data-Type_apache' },
4544
],

src/.vuepress/sidebar/V2.0.x/en-Tree.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ export const enSidebar = {
3838
collapsible: true,
3939
prefix: 'Background-knowledge/',
4040
children: [
41-
{ text: 'Common Concepts', link: 'Cluster-Concept_apache' },
42-
{
43-
text: 'Timeseries Data Model',
44-
link: 'Navigating_Time_Series_Data_apache',
45-
},
41+
{ text: 'Basic Concepts', link: 'Common-Concepts_apache' },
4642
{
4743
text: 'Modeling Scheme Design',
4844
link: 'Data-Model-and-Terminology_apache',

src/.vuepress/sidebar/V2.0.x/zh-Table.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export const zhSidebar = {
3838
collapsible: true,
3939
prefix: 'Background-knowledge/',
4040
children: [
41-
{ text: '常见概念', link: 'Cluster-Concept_apache' },
42-
{ text: '时序数据模型', link: 'Navigating_Time_Series_Data_apache' },
41+
{ text: '基础概念', link: 'Common-Concepts_apache' },
4342
{ text: '建模方案设计', link: 'Data-Model-and-Terminology_apache' },
4443
{ text: '数据类型', link: 'Data-Type_apache' },
4544
],

src/.vuepress/sidebar/V2.0.x/zh-Tree.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export const zhSidebar = {
3838
collapsible: true,
3939
prefix: 'Background-knowledge/',
4040
children: [
41-
{ text: '常见概念', link: 'Cluster-Concept_apache' },
42-
{ text: '时序数据模型', link: 'Navigating_Time_Series_Data_apache' },
41+
{ text: '基础概念', link: 'Common-Concepts_apache' },
4342
{ text: '建模方案设计', link: 'Data-Model-and-Terminology_apache' },
4443
{ text: '数据类型', link: 'Data-Type' },
4544
],
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# Basic Concepts
2+
3+
## 1. General Time Series Database Concepts
4+
5+
This section introduces basic concepts commonly used in time series databases, including time series data, time series, devices, timeseries or fields, data points, collection frequency, TTL, schema, encoding, and compression.
6+
7+
### 1.1 Time Series Data
8+
9+
In scenarios such as IoT, industrial production, energy and power, connected vehicles, and infrastructure monitoring, devices usually use sensors to continuously collect status data about themselves or their environment. For example, motors collect voltage and current, wind turbines collect blade speed, angular velocity, and power generation, vehicles collect longitude, latitude, speed, and fuel consumption, and bridges collect vibration frequency, deflection, and displacement.
10+
11+
![](/img/time-series-data-en-01.png)
12+
13+
The common feature of this type of data is that it is related to time: the same collection object continuously generates new records as time passes. Data that is continuously generated and recorded in chronological order is called time series data.
14+
15+
### 1.2 Time Series
16+
17+
In time series data scenarios, a collection point continuously generates data points over time. When these data points are arranged in ascending timestamp order, they form a time series. In table form, a time series can be represented as a data table made up of time and value. In graph form, a time series can be represented as a trend curve that changes over time, and can also be described figuratively as the "electrocardiogram" of a device.
18+
19+
![](/img/time-series-data-en-02.png)
20+
21+
### 1.3 Device
22+
23+
A device, also called an entity or equipment, is a device or apparatus with physical quantities in a real-world scenario. It can be a physical device, a measurement apparatus, or a collection of sensors.
24+
25+
Common examples are as follows:
26+
27+
| Scenario | Device Example | Identifier Example |
28+
| --- | --- | --- |
29+
| Energy | Wind turbine | Region, station, line, model, instance, etc. |
30+
| Factory | Robotic arm | Unique ID generated by an IoT platform |
31+
| Connected vehicle | Vehicle | Vehicle identification number (VIN) |
32+
| Monitoring | CPU | Equipment room, rack, hostname, device type, etc. |
33+
34+
### 1.4 Timeseries / Field
35+
36+
A timeseries or field can also be called a physical quantity, time series, timeline, signal, metric, point, or measured value. It is the measurement information recorded by a detection device in a real-world scenario. Usually, one physical quantity represents one collection point that can periodically collect a physical quantity from its environment or device. When the data points generated by a timeseries or field are arranged in ascending timestamp order, they form a time series.
37+
38+
Common examples are as follows:
39+
40+
| Scenario | Timeseries / Field Example |
41+
| --- | --- |
42+
| Energy and power | Current, voltage, wind speed, rotational speed |
43+
| Connected vehicle | Fuel level, vehicle speed, longitude, latitude |
44+
| Factory | Temperature, humidity |
45+
46+
### 1.5 Data Point
47+
48+
A data point consists of a timestamp and a value. The timestamp indicates when the data was generated, and the value indicates the collection result of the timeseries or field at that time. The value can be of various types, such as BOOLEAN, FLOAT, and INT32.
49+
50+
A row in a tabular time series, or a point in a trend chart, can be understood as a data point.
51+
52+
![](/img/time-series-data-en-03.png)
53+
54+
### 1.6 Collection Frequency
55+
56+
Collection frequency refers to the number of times a physical quantity generates data within a certain period. For example, if a temperature sensor collects temperature data once per second, its collection frequency is 1 Hz, that is, once per second.
57+
58+
The higher the collection frequency, the more data points are generated per unit of time, and the higher the requirements for write, storage, and query capabilities.
59+
60+
### 1.7 Data Retention Time (TTL)
61+
62+
TTL specifies the retention time of data. Data beyond the TTL will be automatically deleted.
63+
64+
Using TTL properly can control disk space usage, avoid exceptions such as disks becoming full, and help maintain query performance and reduce memory usage.
65+
66+
### 1.8 Schema
67+
68+
Schema is the data model information of a database and is used to describe the structure and definition of data. For time series data, schema usually includes devices, timeseries or fields, data types, and other information.
69+
70+
### 1.9 Encoding and Compression
71+
72+
Encoding is a compression technique used to represent data in binary form and improve storage efficiency. Compression further compresses the encoded binary data to improve storage efficiency.
73+
74+
> For details about encoding and compression supported by IoTDB, see [Compression and Encoding](../Technical-Insider/Encoding-and-Compression.md).
75+
76+
## 2. Common IoTDB Concepts
77+
78+
This section introduces common concepts in IoTDB data models, distributed architecture, and deployment. These concepts explain how IoTDB organizes, manages, and deploys time series data.
79+
80+
### 2.1 Data Model Concepts
81+
82+
#### 2.1.1 Data Model (sql_dialect)
83+
84+
IoTDB supports two data models: tree model and table model. The core objects managed by both models are devices and timeseries, but their organization methods and syntax are different.
85+
86+
- Tree model: Manages data through hierarchical paths, where one path corresponds to one timeseries of one device.
87+
88+
- Table model: Manages data through relational tables. It is recommended that one table correspond to one type of device.
89+
90+
Both model spaces can exist in the same cluster instance. Different models use different syntax and database naming methods, and are not visible to each other by default.
91+
92+
#### 2.1.2 Database
93+
94+
In the table model, a database is the upper-level organizational structure and can manage multiple types of devices and their tables. Before creating tables, writing data, or querying data, you usually need to create a database first.
95+
96+
#### 2.1.3 Table
97+
98+
In the table model, it is recommended that one table correspond to one type of device and be used to organize the time series data of that type of device. Devices of the same type usually have the same or similar sets of fields.
99+
100+
#### 2.1.4 Time Column, Tag Column, Attribute Column, and Field Column
101+
102+
Columns in the table model can be divided by purpose into time columns, tag columns, attribute columns, and field columns.
103+
104+
| Concept | Description |
105+
| --- | --- |
106+
| Time column (TIME) | Each table must contain one time column whose data type is TIMESTAMP |
107+
| Tag column (TAG) | Used to identify devices. It can serve as the composite primary key of devices and usually does not change over time |
108+
| Attribute column (ATTRIBUTE) | Used to describe static attributes of devices. It does not change over time and can be updated or added |
109+
| Field column (FIELD) | Used to store field values collected by devices. Values change over time |
110+
111+
In terms of data filtering efficiency, the usual order can be understood as: time columns and tag columns first, then attribute columns, and finally field columns.
112+
113+
### 2.2 Distributed Concepts
114+
115+
IoTDB supports cluster deployment. Common concepts in a cluster include nodes, Regions, and multiple replicas. A common cluster deployment mode is 3C3D, that is, 3 ConfigNodes and 3 DataNodes.
116+
117+
![](/img/Cluster-Concept03N.png)
118+
119+
#### 2.2.1 Node
120+
121+
An IoTDB cluster includes three types of nodes: ConfigNode, DataNode, and AINode.
122+
123+
- ConfigNode: Manages node information, configuration information, user permissions, schema, partition information, and other cluster information. It is responsible for scheduling distributed operations and load balancing. All ConfigNodes are full backups of each other.
124+
125+
- DataNode: Serves client requests and is responsible for data storage and computation.
126+
127+
- AINode: Provides machine learning capabilities. It supports registering trained machine learning models and invoking models for inference through SQL.
128+
129+
#### 2.2.2 Data Partition (Region)
130+
131+
In IoTDB, both schema and data are divided into smaller partitions, namely Regions, and are managed by DataNodes in the cluster.
132+
133+
- SchemaRegion: A schema partition used to manage the schema of some devices and timeseries or fields.
134+
135+
- DataRegion: A data partition used to manage the data of some devices within a period of time.
136+
137+
Regions with the same RegionID on different DataNodes are replicas of each other.
138+
139+
#### 2.2.3 Multiple Replicas
140+
141+
The number of replicas for data and schema is configurable. Multiple replicas can provide high-availability services.
142+
143+
| Category | Configuration Item | Recommended Standalone Configuration | Recommended Cluster Configuration |
144+
| --- | --- | --- | --- |
145+
| Schema | schema_replication_factor | 1 | 3 |
146+
| Data | data_replication_factor | 1 | 2 |
147+
148+
### 2.3 Deployment Concepts
149+
150+
IoTDB has two running modes: standalone mode and cluster mode.
151+
152+
#### 2.3.1 Standalone Mode
153+
154+
An IoTDB standalone instance includes 1 ConfigNode and 1 DataNode, that is, 1C1D.
155+
156+
- Features: Easy for developers to install and deploy, with low deployment and maintenance costs and convenient operations.
157+
158+
- Applicable scenarios: Scenarios with limited resources or low high-availability requirements, such as edge servers.
159+
160+
- Deployment method: [Standalone deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md).
161+
162+
#### 2.3.2 Cluster Mode
163+
164+
An IoTDB cluster instance consists of 3 ConfigNodes and no fewer than 3 DataNodes, usually 3 DataNodes, that is, 3C3D. When some nodes fail, the remaining nodes can still provide services externally, ensuring high availability of database services. Database performance can also be improved by adding nodes.
165+
166+
- Features: High availability and high scalability. System performance can be improved by adding DataNodes.
167+
168+
- Applicable scenarios: Enterprise application scenarios that require high availability and reliability.
169+
170+
- Deployment method: [Cluster deployment](../Deployment-and-Maintenance/Cluster-Deployment_apache.md).
171+
172+
#### 2.3.3 Feature Summary
173+
174+
| Dimension | Standalone Mode | Cluster Mode |
175+
| --- | --- | --- |
176+
| Applicable scenarios | Edge deployment; low high-availability requirements | High-availability services; disaster recovery scenarios, etc. |
177+
| Required number of machines | 1 | >= 3 |
178+
| Safety and reliability | Cannot tolerate a single point of failure | High; can tolerate a single point of failure |
179+
| Scalability | Can scale DataNodes to improve performance | Can scale DataNodes to improve performance |
180+
| Performance | Can scale with the number of DataNodes | Can scale with the number of DataNodes |
181+
182+
Standalone mode and cluster mode have similar deployment steps: ConfigNodes and DataNodes are added one by one. The differences are only in the number of replicas and the minimum number of nodes that can provide services.

src/UserGuide/Master/Table/Background-knowledge/Data-Model-and-Terminology_apache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This section introduces how to transform time series data application scenarios
2525

2626
## 1. Time Series Data Mode
2727

28-
Before designing an IoTDB data mode, it's essential to understand time series data and its underlying structure. For more details, refer to: [Time Series Data Mode](../Background-knowledge/Navigating_Time_Series_Data_apache.md)
28+
Before designing an IoTDB data mode, it's essential to understand time series data and its underlying structure. For more details, refer to: [Basic Concepts](../Background-knowledge/Common-Concepts_apache.md)
2929

3030
## 2. Tree-Table Twin Mode in IoTDB
3131

src/UserGuide/Master/Table/QuickStart/QuickStart_apache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This guide will assist you in quickly installing and deploying IoTDB. You can qu
4545

4646
1. Database Modeling Design: Database modeling is a crucial step in creating a database system, involving the design of data structures and relationships to ensure that the organization of data meets the needs of specific applications. The following documents will help you quickly understand IoTDB's modeling design:
4747

48-
- Introduction to Time Series Concepts: [Navigating Time Series Data](../Background-knowledge/Navigating_Time_Series_Data_apache.md)
48+
- Introduction to Time Series Concepts: [Basic Concepts](../Background-knowledge/Common-Concepts_apache.md)
4949

5050
- Introduction to Modeling Design:[Data Model and Terminology](../Background-knowledge/Data-Model-and-Terminology_apache.md)
5151

0 commit comments

Comments
 (0)