Embedded Storage DataBase

Nomi Hakanai 39cb1bef1c esp fsync 2 年之前
contrib 42819424a9 logo fix 2 年之前
src 39cb1bef1c esp fsync 2 年之前
test 544e80ae58 testing cats 2 年之前
LICENSE 8040dca67a license files 2 年之前
Makefile.am 513ca1f124 bootstrap project with tools 2 年之前
README.md 43eb8a6e26 benchmark example with a bit more cats 2 年之前
bootstrap 513ca1f124 bootstrap project with tools 2 年之前
configure.ac 513ca1f124 bootstrap project with tools 2 年之前

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