3 ms·
LittleD targets devices the size of an Arduino, while SQLite requires at least some sort of operating system offering a filesystem interface. The feature set of
by raimue 11y ago
LittleD targets devices the size of an Arduino, while SQLite requires at least some sort of operating system offering a filesystem interface. The feature set of LittleD is also reduced as it supports only simple queries.
The corresponding paper [1] claims "SQLite requires at least 200 KB of code space and cannot run on popular platforms such as the Arduino." For comparison, Arduinos based on ATmega microcontrollers only offer up to 256 KB of flash memory at maximum.
[1] https://dl.acm.org/citation.cfm?id=2554891 https://dl.acm.org/citation.cfm?id=2554891
- jly 11y agoSQLite definitely does not require a filesystem interface, or even standard OS interface. It does require some kind of storage, though, but that could be direct flash, RAM, etc. I have spent a lot of time with it on ARM Cortex-M-class devices on small RTOSes or even bare metal, and you can adapt it to almost anything by plugging in new VFS interfaces (http://www.sqlite.org/vfs.html http://www.sqlite.org/vfs.html). It does require at least 10s of kb of RAM as a heap to do pretty much anything, as others have stated.
- to3m 11y agoThe ATmegas only go up to 16KBytes RAM, with 4KBytes or less being usual. As a Harvard architecture device, none of your binary is memory-mapped, which can make porting existing code a bit annoying. sizeof(int)==2, which doesn't help either (however sizeof(void *)==2 as well, so there is at least that). It's rather unusual by today's standards. Certainly quite different from an ARM.
- listic 11y ago...though still the latest and sanest of that crop of micro's, IMHO. Designed in 1996, it was once marketed as "the first new 8-bit architecture designed in 20 years", I believe :-)
- pfalcon 11y agoYou can adapt, or have you adapted? I looked at SQLite internals, and decided that I'll skip that adaptation for now, seeing if someone else would do that. LittleD's author says that he looked into adapting SQLite, and that's how he decided to write LittleD.
- geedy 11y agoHow little memory have you managed? They claim 100KiB, but if it could be even half that then there are some tremendous opportunities to use it. I'd love to hear more about your work adapting SQLite for Cortex-M-class devices.
- geedy 11y agoYou can read that paper here: https://people.ok.ubc.ca/rlawrenc/research/Papers/LittleD.pdf https://people.ok.ubc.ca/rlawrenc/research/Papers/LittleD.pd...