# armink/FlashDB

An ultra-lightweight database that supports key-value and time series data |  一款支持 KV 数据和时序数据的超轻量级数据库

Repository: https://github.com/armink/FlashDB
Canonical: https://ross.abutalabs.com/products/flashdb
Language: C
License: Apache-2.0
License Family: permissive
Topics: database, tsdb, kvdb, key-value, embedded, iot, lightweight
Last push: 2026-08-15T10:49:19+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 44, longevity 100
- inputs: {"age_days": 2292, "days_push": 18, "days_rel": 163, "gap_med": 532, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2834, forks 560 (observed 2026-08-28T04:07:24.489798+00:00)

## What it is
FlashDB is an ultra-lightweight embedded database written in C that provides two storage modes: a key-value database (KVDB) and a time-series database (TSDB) that operate directly on flash memory without a file system. It is designed for resource-constrained IoT and embedded products, offering near-zero RAM usage, wear leveling to extend flash lifetime, and power-off protection for high reliability.

## Use cases
- store configuration and product parameters as key-value pairs on a microcontroller
- persist sensor readings with timestamps on an embedded device
- keep operation logs and alarm history in flash on IoT hardware
- manage small data records on a bare-metal MCU or RTOS without a file system
- survive power loss without corrupting stored settings
- extend SPI NOR flash lifetime through wear balancing
- upgrade stored KV values automatically after a firmware update

## When to choose
- you need a database on an MCU or RTOS device where a traditional file-system-based database won't fit
- you need extremely low RAM and ROM footprint with reliable flash storage
- you need to store time-series sensor data or key-value settings directly on raw flash
- you need power-fail-safe storage and wear leveling for embedded products

## When to avoid
- you need SQL queries, joins, or relational modeling (use SQLite or a server database)
- your target has ample resources and a file system, making conventional databases easier
- you need multi-client network access or concurrent writes from multiple processes

## Facets
- artifact type: library
- maturity: stable
- function: database
- domain: databases, time-series, iot, embedded-systems
- platform: embedded, iot, cross-platform
- tags: embedded-database, key-value-store, tsdb, kvdb, flash-memory, wear-leveling, power-fail-protection, microcontroller, rtos, nor-flash, lightweight, c-library, firmware

## Member repositories
- armink/FlashDB (main) score 79

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:24.489798+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:38:05.729202+00:00, confidence not recorded.
  - readme: https://github.com/armink/FlashDB (fetched 2026-08-28T04:07:24.489798+00:00, sha 957ddbaf2ad9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
