Page 1 of 1

Sqlite3?

Posted: Sun Mar 23, 2014 2:22 pm
by jayfehr
I'm curious if it is going to be possible to use the Sqlite libraries with µPython? Having the ability to write to onboard flash memory is awesome, having the ability to store the same data in a relational manner would be a step above.

Re: Sqlite3?

Posted: Mon Mar 24, 2014 9:35 am
by pfalcon
There will be definitely sqlite module for "unix" port. For baremetal MCU ports, sqlite sounds too big/bloated. And the question whether it's possible at all depends on its heap memory usage. This posts doesn't show optimistic minimal memory usage, so it's likely not possible on a typical MCU without external RAM (without someone spending time to optimize it). And that's only minimal usage - with SQL, potential memory usage is unbound.

Re: Sqlite3?

Posted: Mon Mar 24, 2014 9:41 am
by pfalcon
Though that post is from 2009, and http://www.sqlite.org/malloc.html lists impressive properties of memory subsystem of modern sqlite, for example, ability work against static buffer. So, someone just needs to test how well it would work with say 16K memory arena ;-).

Re: Sqlite3?

Posted: Thu Apr 17, 2014 12:58 am
by pfalcon
FYI, I started implementing bindings for sqlite3: https://github.com/micropython/micropyt ... er/sqlite3