Real-Time Data Sync with IOT-Tree Message Flow: Tag Data to Relational Database Tables
IOT-Tree Server is an open-source IoT software that can serve as the upper-level software for automation systems as a configuration (SCADA)…
Real-Time Data Sync with IOT-Tree Message Flow: Tag Data to Relational Database Tables
IOT-Tree Server is an open-source IoT software that can serve as the upper-level software for automation systems as a configuration (SCADA) tool. It provides access, data organization and management, control logic, and human-machine interface (HMI) capabilities. The IOT-Tree message flow feature provides visual function block composition support (intuitive and fast) after systematically integrating various device data. Through it, you can quickly implement data processing — storage, transformation, transmission, etc. — in most scenarios.

This is part of a series of articles on IOT-Tree Server. You can refer to other articles to learn more about the benefits IOT-Tree can bring you:
Using IOT-Tree Server to Connect Mitsubishi Q Series PLC via MC Protocol
Using IOT-Tree Server to Connect Siemens PLC S7–300/1200/1500
Using IOT-Tree Server to Connect Siemens PLC S7–200 via PPI (RS485)
The series also includes articles covering the complete process of using IOT-Tree to complete a specific project, very detailed, as follows:
Hands-on Guide to Computer Room Automation Monitoring — 10 Project Completion Summary
1 Background: Why This Feature Is Needed
After using IOT-Tree to connect field devices, configure channels (device drivers), and organize tag data, you may have additional requirements beyond basic field automation monitoring:
You have an IT system or model program whose core algorithm is based on relational database data analysis. To improve the IT system or algorithm, and to maintain a unified database as the development foundation — you want to obtain IOT-Tree’s real-time industrial field data through relational database tables.
In this case, you can easily fulfill this requirement by combining several nodes in the IOT-Tree message flow.
2 Detailed Configuration Process
2.1 Configuring the Relational Database Data Source
In IOT-Tree, data source configuration is not project-specific — the same data source can be used by all projects. After logging in as an administrator, you will see a “Data Source Management” section on the main management interface:

The data source supports multiple database types. For this case, we simply select JDBC type, which corresponds to traditional relational databases.

When editing the data source, fill in the parameters based on your database type, address, port, username, password, etc.:

After completion, click the “Test” button for the corresponding data source in the list. If successful, the data source configuration is correct.

2.2 Configuring the Database Table
With the data source set up, we can now configure the tag-to-database-table synchronization in the project message flow.
In the lower left corner of the IOT-Tree project management interface, add a message flow. After clicking, you will see the message flow configuration interface. In the left-side list, select the “Relational Database” node under the “Storage” category, and drag it to the configuration area. As shown below:

2.2.1 Configuring the Data Source for This Node
Double-click the “Relational Database 1” node. In the detailed configuration popup, select the previously configured data source:

2.2.2 Configuring the Database Table
Select the “Relational Database 1” node. You will see the associated sub-nodes in the left node list area. Drag the “DB Table” node to the editing area to add it:

Double-click the “DB Table 1” node. In the popup window, simply fill in the database table name — no other changes needed:

Now we have both the database and the table ready for storing real-time tag data.
2.3 Configuring the Data Sync Node
With the database and table name configured, we can now set up the data synchronization. In the left node list, select the “Tags RT To DB” node under the “devices” category, and drag it to the editor:

Whenever any message enters the left input of this node, it triggers a synchronization operation from real-time tag data to the relational database table. The node itself requires no parameter settings. However, the third output terminal on the right must be connected to the database table node. Simply connect this output terminal to the previously configured “DB Table 1” node.
Additionally, this node supports automatic table creation. After associating it with the database table, click the expand button on the node panel, then click the “Create Table” button inside. You should see a success message indicating the table was created. You can then verify in your database management tool that the table was successfully created.

2.4 Adding a Timer Trigger for Scheduled Data Sync
As mentioned above, the “Real-time Data Table Sync” node requires an input message to trigger the sync operation. The simplest approach is to add a timer node to the flow. You can set the sync interval as needed:

This completes the entire configuration process. If all goes well, it should take no more than 5 minutes.
3 Final Result
Start the project. If everything runs correctly, you will see all tag data from the project generated in the database table, automatically updating at the configured interval:

Note: The table structure is fixed. The TagPath column represents the unique tag path within the project.
메타데이터
- post_id
- a1aafd0cb0fe
- slug
- real-time-data-sync-with-iot-tree-message-flow-tag-data-to-relational-database-tables-a1aafd0cb0fe
- url
- https://medium.com/@jasonzhu8888/real-time-data-sync-with-iot-tree-message-flow-tag-data-to-relational-database-tables-a1aafd0cb0fe
- canonical_url
- https://medium.com/@jasonzhu8888/real-time-data-sync-with-iot-tree-message-flow-tag-data-to-relational-database-tables-a1aafd0cb0fe
- author_url
- https://medium.com/@jasonzhu8888
- status
- ok
- fetched_at
- 2026-06-17 15:18:21