

To overcome this problem, both TDengine and QuestDB support schemaless data ingestion with built-in support for automatic table creation. Since SQL is supported, many analytical tools, BI tools and graphing tools can be used without any effort and queries can be reused with little or no change.ĭefining a schema is viewed as hurdle for developers used to NoSQL models who may want to adopt a relational data model. TimeScale, QuestDB and TDengine all support SQL with some extensions. One of the best advantages of the relational data model is the query language – SQL. Requiring schema design at the beginning of the project, forces developers to be thoughtful about the data model, which reduces the effort for analysis and change management later on and reduces risk.

the design of the schema is useful in validating the user’s input. In addition, each metric has a dedicated column and a data type. In the case of time-series data, there is always a timestamp column. In applications that use a relational data model, the schema is always defined first. Proprietary query languages impose an unnecessary learning cost which is better spent on robust development especially in a fast-moving IoT world. Prometheus also has its own query language, PromQL and OpenTSDB adopts a set of its own APIs for querying. The early version of InfluxDB’s query language is SQL-like, but the new version is powered by its proprietary Flux query language. This makes it impossible to filter within a range for example.Īnother drawback of the Tag Set data model is that the query language is always proprietary. In our simple connected vehicles scenario if we add color as one more dimension for analysis, the Tag Set model treats it as a new time-series even though it is actually not.Īdditionally, in the Tag Set model, tags are always treated as strings, and no other data types are supported. While typically tags may not be changed, as IoT grows and devices become more complex and capable of capturing more data, we can anticipate that tags/labels will in fact be added probably quite frequently. If we add one more tag or change the tag value, it is treated as a different time-series. To aggregate multiple time-series, a label/tag set filter has to be applied. This makes it very attractive for developers. On the other hand writing to the database is very simple and it is quite easy to prototype simplistic applications. In fact, indexes on metrics are not allowed to be created which is a shortcoming of the tag set model. Indexes on tags are created automatically, but indexes on metrics are not created. The Tag Set model resembles NoSQL, where schema and indexes are not required to be defined.

In the case of InfluxDB, the time-series could be written as: gps, vin=vin1, brand=tesla, model=s3 In our connected vehicles scenario, each time-series is identified by:įor Prometheus/OpenTSDB, a time-series for connected vehicles could be written like this: gps_x In a tag set data model, every time series is uniquely identified by a metric name (measurement in InfluxDB nomenclature) and a set of labels (tags in InfluxDB nomenclature ). Prometheus shares the same tag set data model as OpenTSDB with some minor enhancements and so in this blog, we will not address OpenTSDB specifically. While TimeScale, TDengine and QuestDB adopt a relational data model, OpenTSDB, Prometheus and InfluxDB adopt a Tag Set data model.
#TIME SERIES DATABASE SERIAL#
Each DCP has static attributes, like serial number, model, color, host name, app name, etc.

Let’s call it a data collection point, DCP. The metrics are always generated by a single device, sensor or data collection agent. Particularly we look at InfluxDB, TDengine, TimeScale, Prometheus, OpenTSDB and QuestDB.Ī time-series dataset contains a sequence of time-stamped metrics. To help developers deploy the right TSDB for their application, this blog compares data models for a few popular TSDBs on GitHub. Different TSDBs adopt different data models. The data model is the most important part of any data management system. Time-series databases (TSDB) are aimed at processing time-stamped data points in an efficient way.
