Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re: embedded databases #497

Open
jaskij opened this issue Jul 24, 2024 · 0 comments
Open

Re: embedded databases #497

jaskij opened this issue Jul 24, 2024 · 0 comments

Comments

@jaskij
Copy link

jaskij commented Jul 24, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant