IoT Database
CrateDB is an IoT database designed to ingest large volumes of fast moving device data, index it automatically, and make it available for real time analytics. It combines distributed SQL, high throughput ingestion, and native support for time series, JSON, text, geospatial, and vector data, giving IoT platforms a single engine that handles both operational and analytical workloads.
CrateDB simplifies IoT architectures by unifying ingestion, storage, search, analytics, and AI features in one scalable system.
Built for high velocity IoT ingestion
IoT systems generate continuous streams of sensor values, logs, and device events. CrateDB captures this data at high speed and makes it queryable immediately.
- High throughput ingestion
- Automatic indexing
- Low latency writes
- Real time query readiness
- Support for MQTT through bridges, Kafka, REST, and connectors
- No manual tuning required
Distributed SQL for real time and historical analytics
CrateDB distributes SQL queries across the cluster, which accelerates analytics on large amounts of IoT time series.
- Joins and relational modeling for device metadata
- Window functions and time series analysis
- Real time aggregations on fresh data
- Analytics on long term historical datasets
- Ad hoc queries without pre aggregation
- Parallel execution across all nodes
Multi model support for complex IoT workloads
IoT payloads are rarely uniform. Devices may send structured metrics, nested JSON objects, location coordinates, logs, or AI features. CrateDB stores them all.
- Time series
- JSON documents
- Relational tables
- Geospatial coordinates and shapes
- Full text data
- Vector data for AI features
- BLOB storage for binary content
Designed for industrial and edge environments
CrateDB adapts to the architecture of your IoT ecosystem, whether it runs in the cloud, on premise, or in remote or industrial locations.
- Cloud, on premise, hybrid, and edge deployments
- Same features across all environments
- Lightweight edge nodes for local processing
- Synchronization with central clusters
Geospatial and mobility analytics
Many IoT platforms track mobile or location aware devices. CrateDB includes native geospatial support for real time and large scale analytics.
geo_pointandgeo_shapeDistance,intersects,within,disjoint- Geofencing and routing queries
- Location based aggregations
This allows you to analyze fleets, mobility patterns, asset locations, and operational zones at scale.
Built In search and AI features
IoT data often includes logs, metadata, and signals that benefit from search or AI powered analysis. CrateDB integrates these capabilities directly in SQL.
- Full text search
- Vector search
- SQL functions for similarity and ranking
- Real time feature extraction
- Unified storage for sensors, logs, and embeddings
Reliability and security for connected systems
IoT platforms require continuous operations and strong protection for device and operational data.
- Shared nothing architecture
- Automatic replication
- Fault tolerant clusters
- Encryption at rest
- TLS for data in transit
- Role based access control
- ISO 27001 and SOC 2 certifications for CrateDB Cloud
CrateDB supports both production grade reliability and compliance requirements.
Digital twins
CrateDB offers a unique repository to store and retrieve metadata associated with digital twins. This includes information about the physical entity, data sources, data quality and modeling assumptions.
Time-series data can be contextualized with this information in real-time. An easy switch can be made from a technical view to a business view.
Integration with data analytics and AI technologies make it fluid to run complex algorithms, machine learning models, and statistical analysis directly on the stored data.
Open source
CrateDB open source licensing model reduces your IT costs and provides the support of an active community.
Whether you want to get everything managed for you with the SaaS model or prefer deploy the product yourself, we have the right option for you if you decide to go for a fast and scalable IoT database.
Sensor data queries with SQL
Hyper-fast. Results in milliseconds.
/* Based on IoT devices reports, this query returns the voltage variation over time
for a given meter_id */
WITH avg_voltage_all AS (
SELECT meter_id,
avg("Voltage") AS avg_voltage,
date_bin('1 hour'::INTERVAL, ts, 0) AS time
FROM iot.power_consumption
WHERE meter_id = '840072572S'
GROUP BY 1, 3
ORDER BY 3
)
SELECT time,
(avg_voltage - lag(avg_voltage) over (PARTITION BY meter_id ORDER BY time)) AS var_voltage
FROM avg_voltage_all
LIMIT 10;
+---------------+-----------------------+
| time | var_voltage |
+---------------+-----------------------+
| 1166338800000 | NULL |
| 1166479200000 | -2.30999755859375 |
| 1166529600000 | 4.17999267578125 |
| 1166576400000 | -0.3699951171875 |
| 1166734800000 | -3.7100067138671875 |
| 1166785200000 | -1.5399932861328125 |
| 1166893200000 | -3.839996337890625 |
| 1166997600000 | 9.25 |
| 1167044400000 | 0.4499969482421875 |
| 1167174000000 | 3.220001220703125 |
+---------------+-----------------------+
/* Based on IoT devices reports, this query returns the voltage corresponding to
the maximum global active power for each meter_id */
SELECT meter_id,
max_by("Voltage", "Global_active_power") AS voltage_max_global_power
FROM iot.power_consumption
GROUP BY 1
ORDER BY 2 DESC
LIMIT 10;
+------------+--------------------------+
| meter_id | voltage_max_global_power |
+------------+--------------------------+
| 840070437W | 246.77 |
| 840073628P | 246.69 |
| 840074265G | 246.54 |
| 840070238E | 246.35 |
| 840070335K | 246.34 |
| 840075190M | 245.15 |
| 840072876X | 244.81 |
| 840070636M | 242.98 |
| 84007B113A | 242.93 |
| 840073250D | 242.28 |
+------------+--------------------------+
IoT Device Integration with Python
# Send IoT data to CrateDB with a simple HTTP request
import requests
import json
from datetime import datetime
def send_iot_data(device_id, temperature, humidity):
url = "http://localhost:4200/_sql"
headers = {'Content-Type': 'application/json'}
payload = {
"stmt": "INSERT INTO iot_data (device_id, temperature, humidity)
VALUES ('{device_id}', {temperature}, {humidity})"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
if response.status_code == 200:
print("Data sent successfully!")
else:
print(f"Error sending data. Status code: {response.status_code}")
# Example Usage
send_iot_data('device-3', 22.5, 58.3)
Want to know more?
User stories
"Working with CrateDB brings positive outcomes. The ingestion and throughput have very good performance, with 1 million values/sec, the horizontal scalability where we can add as many nodes as we need and the automatic query distribution across the whole cluster"
Marko Sommarberg
Lead, Digital Strategy and Business Development at ABB
"With CrateDB, we can continue designing products that add value to our customers. We will continue to rely on CrateDB when we need a database that offers great scalability, reliability and speed."
Nixon Monge Calle
Head of IT Development and Projects
SPGo! Business Intelligence
"CrateDB is the only database that gives us the speed, scalability and ease of use to collect and aggregate measurements from hundreds of thousands of industrial sensors for real-time visibility into power, temperature, pressure, speed and torque."
Jürgen Sutterlüti
Vice President, Energy Segment and Marketing at Gantner Instruments.
Additional resources
FAQ
An IoT database is a specialized storage system designed to manage and process the vast amounts of data generated by Internet of Things (IoT) devices. These databases are optimized to handle high-speed data ingestion, storage, and retrieval from numerous devices in real-time. They support diverse data types and provide advanced analytics capabilities to derive actionable insights from IoT data streams.
Examples of such IoT databases include CrateDB. InfluxDB, MongoDB, and Cassandra. CrateDB's helps businesses harness the full value of high-volume data from thousands of IoT sensors with its fast data ingestion, versatile data modeling, and real-time querying capabilities. Its uniqueness resides in its performance, multi-model support and Edge coverage.
IoT data types primarily include structured data (e.g. sensor readings and timestamps), semi-structured data (e.g. JSON payloads), and unstructured data (e.g. images, video files, and audio recordings). The diversity of these data types requires a flexible database capable of efficiently managing and processing various formats to support different IoT applications. In CrateDB, you can store any type of data—structured, semi-structured, and unstructured—and leverage native SQL to query the data, as well as advanced time-series and search functionalities. CrateDB offers data collection and storage for any type of IoT data source: sensor data, historical data, geospatial data, operational parameters, and environmental conditions.
IoT data is stored in databases designed to handle large-scale, real-time data. Smart partitioning strategies are key to manage multiple periods of time efficiently. Depending on the specific application and requirements, these databases can be on-premises, cloud-based, or edge-based. CrateDB is highly flexible and can be deployed on private or public cloud, on-premises, or edge to meet your organization's unique needs. It also supports hybrid scenarios out of the box.
An IoT database architecture typically includes several key components: IoT devices that generate data, a network for transmitting this data, a storage system for data accumulation, and an analytics component for data processing. The architecture is designed to manage data flow from devices to storage and ultimately to analysis platforms, ensuring timely and accurate insights. CrateDB addresses these needs by providing easy and seamless integration with popular IoT stack software such as Kafka, Grafana, and Node-RED, leveraging native SQL and the PostgreSQL Wire Protocol.
An IoT database needs to manage large volumes of data, support a variety of data types, and offer real-time data processing capabilities. It's crucial for it to be highly scalable in order to handle the increasing number of devices and data streams. CrateDB meets these requirements by providing instant query availability after data ingestion, offering millisecond response times even for complex queries across billions of records. This ensures real-time insights and responsiveness, making CrateDB the right choice for IoT applications.
An IoT database must process continuous streams of sensor values, logs, and device events without delays. It typically uses distributed ingestion, batching, and optimized write paths to accept large volumes of data per second while keeping latency low. CrateDB ingests data at high speed and makes it queryable immediately thanks to automatic indexing and parallel processing.
Yes. A modern IoT database provides real time query capabilities on fresh data, allowing teams to run dashboards, alerts, anomaly detection, and monitoring workloads without waiting for batch jobs. CrateDB executes SQL queries on recent and historical data in milliseconds, even at large scale.
Many IoT systems require a mix of local processing at the edge and centralized analytics in the cloud. An IoT database should support both environments and allow data to synchronize across them. CrateDB runs on the edge, on premise, and in the cloud with the same SQL interface and multi model capabilities.
Connected devices often generate coordinates or movement patterns. An IoT database should store and query geospatial data natively, including points, shapes, and location based operations. CrateDB supports geo_point and geo_shape data types, along with functions for distance, geofencing, routing, and spatial analysis.
Yes. IoT platforms increasingly rely on AI for anomaly detection, forecasting, and predictive maintenance. An IoT database should store features, embeddings, and time series inputs used by models. CrateDB supports vector data types, similarity search, and real time feature extraction through SQL, which enables AI driven IoT applications.