PATHIKA

WORK / CASE STUDY

SQL to NoSQL redesign for real-time IoT data

We helped an IoT device manufacturer for food facilities transition from SQL to a NoSQL database solution, enabling real-time data processing at scale, improved efficiency, and significant cost savings — a foundation for the AI-driven monitoring built on top.

AWSData EngineeringIoT

The challenge

An IoT manufacturer serving industrial food facilities was writing high-volume sensor telemetry into a relational database that had been designed for transactional application data. As device fleets grew, ingest lagged, queries for live facility views got expensive, and the cost of scaling SQL vertically stopped making sense.

Food facilities do not send tidy, occasional updates. Temperature, humidity, equipment state, and alarm signals arrive continuously from devices across cold stores and processing lines. The manufacturer’s platform needed to show operators what was happening now — and keep enough history to investigate what went wrong last night.

The original stack stored that telemetry in SQL alongside the rest of the application. It worked at modest scale. As more sites and sensors came online, writes contended with reporting queries, indexes grew heavy, and keeping the database “fast enough” meant paying for ever-larger instances. The team could feel AI monitoring features waiting on the other side of the bottleneck — but the data layer was not ready for them.

Why SQL was the wrong shape

Relational databases excel when you need strong relationships, multi-row transactions, and ad-hoc joins across a normalised schema. High-frequency IoT telemetry is a different problem: mostly append-only writes, queries scoped by device or facility and time range, and retention policies that treat last week’s readings differently from last year’s. Forcing that workload through row-oriented tables and secondary indexes creates write amplification and operational cost without buying you the join flexibility you actually use.

The redesign started with access patterns, not with a favourite NoSQL product. We mapped what the product needed in the first seconds after a reading arrives, what facility dashboards query repeatedly, and what analytical or AI workloads could tolerate a short delay. That split drove which data stayed relational (configuration, users, facility metadata) and which moved to a purpose-built NoSQL path for telemetry.

The AWS NoSQL path

On AWS, we moved sensor streams onto a NoSQL design suited to time-series keys and high write throughput — with partitioning that spreads load by facility and device rather than funneling everything through a single hot table. Ingest was decoupled from query: devices and edge gateways publish events into a streaming path, consumers write durable telemetry records, and read models serve the live views the product needs without scanning a transactional store.

Migration was incremental. New readings landed in the NoSQL store while historical windows were backfilled in controlled batches. Application read paths switched by feature and facility cohort, with dual-running long enough to prove parity on the dashboards operators rely on. The SQL database did not disappear — it kept owning the relational domain — but it stopped being asked to be a telemetry warehouse.

Efficiency, cost, and headroom for AI

Once telemetry sat in a model matched to how it is written and read, ingest kept up under peak load, live facility views stopped competing with bulk writes, and the bill for database capacity dropped — because the platform was no longer scaling a relational engine to compensate for the wrong workload shape. Operationally, retention and archival became explicit policies instead of emergency disk cleanup.

Just as important, the new path unblocked the product roadmap. AI agents that interpret sensor patterns and collaborate with facility managers need fresh, queryable data and predictable latency. Those features sit on top of the NoSQL foundation rather than fighting the old SQL bottleneck — which is why this migration was not only a cost play, but the prerequisite for the monitoring intelligence the manufacturer wanted to ship next.

What we would repeat

Start from access patterns and retention, keep relational data relational, and migrate telemetry behind clear service boundaries so the application can cut over gradually. Measure ingest lag, query latency, and unit cost before and after — those are the numbers that convince both engineering and finance that the redesign worked.

For IoT platforms growing into AI, the database decision is a product decision. Get the data path right, and everything built on top moves faster. Get it wrong, and no amount of model quality will make a slow, expensive foundation feel intelligent.

Outcomes

  • Real-time ingest and query paths that keep pace with growing device fleets instead of fighting relational write amplification
  • Materially lower database and operational cost by matching the data model to time-series access patterns
  • A clean foundation for AI agents and monitoring features that depend on fresh, queryable facility telemetry

RELATED SERVICE

AI-Led Legacy Modernisation

Using AI-assisted analysis, code transformation, and automated testing to migrate legacy systems to modern cloud-native architectures on AWS and Azure.

EXPLORE LEGACY MODERNISATION

Want results like these?

Every engagement starts with a conversation about where AI can genuinely move the needle for your business.

GET IN TOUCH