Updated on 2023-04-28 GMT+08:00

Basic Concepts

The following uses an electric power scenario as an example to describe how to create a correct data model in IoTDB.

Figure 1 Hierarchical structure of attributes in an electric power scenario

Figure 1 shows the power group layer, power plant layer, device layer, and sensor layer. ROOT is a root node, and each node at the sensor layer is a leaf node. According to the IoTDB syntax, the path from ROOT to a leaf node is separated by a dot (.). The complete path is used to name a time series in the IoTDB. For example, the time series name corresponding to the path on the left in the figure is ROOT.ln.wf01.wt01.status.

Basic Concepts

  • Device

    A device is a machine equipped with sensors in actual scenarios. In IoTDB, all sensors must have their corresponding devices.

  • Sensor

    A sensor is a detection machine in actual scenarios. It can sense the information to be measured, and can transform the sensed information into an electrical signal or other desired form of information output and send it to IoTDB. In IoTDB, all data and paths stored are organized in units of sensors.

  • Storage group

    You can set any prefix path as a storage group. If there are four time series, for example, root.vehicle.d1.s1, root.vehicle.d1.s2, root.vehicle.d2.s1, and root.vehicle.d2.s2, two devices d1 and d2 in the path root.vehicle may belong to the same owner or manufacturer, so d1 and d2 are closely related. In this case, the prefix path root.vehicle can be designated as a storage group, which will enable IoTDB to store the data of all devices under it in the same folder. Newly added devices in root.vehicle will also belong to this storage group.

    • A proper number of storage groups can improve performance. There is neither the slowdown of the system due to frequent I/O switching (which will also take up excessive memory and result in frequent memory-file switching) caused by too many storage files or folders, nor the block of write commands caused by too few storage files or folders (which reduces concurrency).
    • You need to balance the storage group settings of storage files according to their own data size and usage scenarios to achieve better system performance.
  • Time series

    Time series is a core concept in IoTDB. The time series can be considered as the complete path of the sensor that generates the time series data. In IoTDB, all time series must start with root and end with the sensor.