The Sensor Squad’s diary is getting TOO BIG! How do they keep the important stuff?
Sammy the Sensor has been writing down the temperature every single second for a whole year. That is 31 MILLION entries! His diary is SO heavy he cannot even lift it!
“We need to clean up!” says Max the Microcontroller. But they cannot just throw away old data – what if they need it later?
So Max invents a clever system called data retention tiers:
Tier 1 - This Week (Full Detail) “For the last 7 days, keep EVERY single reading. We might need to zoom into exactly what happened at 3:47:12 PM last Tuesday!”
Tier 2 - This Month (1-Minute Summaries) “For the last 30 days, keep one summary per minute. Instead of 60 readings, we keep the average, minimum, and maximum. That is 57 readings we can delete!”
Tier 3 - This Year (Hourly Summaries) “For the last year, keep one summary per hour. We can still see daily patterns, but we save 3,599 out of every 3,600 readings!”
Tier 4 - Forever (Daily Summaries) “For anything older than a year, keep just one number per day. Was January 15, 2024 hot or cold? That is all we need!”
Lila the LED does the math: “Sammy’s 31 million readings shrink to just 50,000! That is a 99.8% reduction!”
Bella the Battery adds an important warning: “But ALWAYS keep the minimum and maximum along with the average. If you only keep averages, you will miss the 5-second spike when the oven almost caught fire!”
“Think of it like photos,” says Max. “Today’s photos: keep them all. Last month: keep the best ones. Last year: keep one per trip. 10 years ago: keep one per year. You still remember your life, but your photo album fits on one shelf instead of filling a whole room!”
Try This at Home!
Write down the temperature every hour for 3 days (or check a weather app). Now summarize each day with just 3 numbers: the average, the coldest, and the hottest temperature. See how much space you saved? You went from 72 numbers to just 9, but you still know the important stuff about each day!