thingsboard / thingsboard-gateway

Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/
Apache License 2.0
1.72k stars 827 forks source link

Question about file type and SQLite type storage #715

Closed ndrs-cwt closed 2 years ago

ndrs-cwt commented 2 years ago

Hi all

I have a question about choosing a storage type. Back then we have memory and file storage. The file type will keep data when power off and the memory type won't.

But now we have a new storage type, SQLite type, so I have some questions about it.

Best regard Chaiwat

samson0v commented 2 years ago

Hi @ndrs-cwt, SQLite pros:

  1. In many common cases, loading content from an SQLite database is faster than loading content out of individual files. See Internal Versus External BLOBs for additional information.
  2. The content can be viewed using third-party tools.
  3. The application file is portable across all operating systems, 32-bit and 64-bit and big- and little-endian architectures
  4. It is easiest to read data (debug)
  5. If you want to have some separate analytics of data

Thanks for your interest in ThingsBoard IoT Gateway!