Skip to content

Re: embedded databases #497

@jaskij

Description

@jaskij

Having read your article, while it was nothing new to me, it's a very nice summary.

Personally, I have found that for simpler devices, it's often enough to have a version field, some form of checksum, and two copies. Simple, safeguards against failures, and expandable.

First, a minor nitpick: I am currently working on a project with STM32H7, and while the page is 32 bytes, you must erase whole sectors, which are 128k. That hurts.

Now to the meat of my comment:

SQLite

Have you considered it? It's probably a bit too massive for your simpler devices, but it has a few nice features to consider. Porting it also does not take long, speaking from experience.

Pros:

  • robust, battle-tested code that's been around for a long time
  • full-featured SQL engine
  • easy to port (once you get through the documentation)
  • stable file format which can serve as data exchange with other systems
    Cons:
  • as far as I know, it requires dynamic memory allocation, which is not always available
  • large, both in code size and RAM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions