ESP-IDF component for libsdb

Your Name bccb3f7d59 no spiffs deps před 2 roky
components bccb3f7d59 no spiffs deps před 2 roky
contrib 18e94e0d32 1000kbench před 2 roky
main 41899d62d7 using fatfs před 2 roky
CMakeLists.txt 083c193dbc esp-idf component před 2 roky
LICENSE ff5c50544f initial commit před 2 roky
README.md 57e938c0d5 benchmark more cats před 2 roky
partitions.csv 41899d62d7 using fatfs před 2 roky
sdkconfig 41899d62d7 using fatfs před 2 roky
sdkconfig.old 41899d62d7 using fatfs před 2 roky

README.md

logo

.. is a Storage DataBase.

What ?

A simple, embedded, CRUD database for applications and embedded systems which guaranties data consistency.

Why ?

Because I wanted to keep things as simple as possible to increase performance and decrease memory usage.

How ?

By implementing minimal functionality.

  • Database locking support (it is not a thread-safe though)
  • Every record has its own checksum.
  • Works directly with the database file
    • Has No Cache (every VFS has its own)
    • Has No Queue

ESP-IDF-LIBSDB

Timings example for esp32 which runs sdb on spiffs.

I (842) app: Append 100 cats
I (2712) app: Took: 1868ms
I (2712) app: Added 0/10
I (2712) app: Append 100 cats
I (4592) app: Took: 1887ms
I (4592) app: Added 1/10
I (4592) app: Append 100 cats
I (6492) app: Took: 1894ms
I (6492) app: Added 2/10
I (6492) app: Append 100 cats
I (8402) app: Took: 1910ms
I (8402) app: Added 3/10
I (8402) app: Append 100 cats
I (10322) app: Took: 1916ms
I (10322) app: Added 4/10
I (10322) app: Append 100 cats
I (12242) app: Took: 1925ms
I (12242) app: Added 5/10
I (12242) app: Append 100 cats
I (16212) app: Took: 3963ms
I (16212) app: Added 6/10
I (16212) app: Append 100 cats
I (28422) app: Took: 12215ms
I (28422) app: Added 7/10
I (28422) app: Append 100 cats
I (41442) app: Took: 13015ms
I (41442) app: Added 8/10
I (41442) app: Append 100 cats
I (54092) app: Took: 12651ms
I (54092) app: Added 9/10
I (54092) app: Read test
I (54092) app: Found 1000 cats in /spiffs/cat_names.sdb
I (86012) app: Took: 31919ms
I (86032) app: Delete test
I (86032) app: Found 1000 cats in /spiffs/cat_names.sdb
I (127142) app: Removed 10 records
I (127142) app: Took: 41112ms
I (127142) app: Update test
I (127142) app: Found 990 cats in /spiffs/cat_names.sdb
I (127152) app: Lets make their names start with J
I (192162) app: Took: 65016ms
I (192162) app: Read test
I (192162) app: Found 990 cats in /spiffs/cat_names.sdb
I (223022) app: Took: 30857ms

License

GPLv2

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  Author: hakanai