Sqlite on an embedded system Sqlite on an embedded system database database

Sqlite on an embedded system


The smallest sqlite3 I came up with was 327 KBytes (for PowerPC), which was sufficient for the system so I stopped trying to make it smaller. This was the full sqlite3 CLI binary, the C APIs alone would have been somewhat smaller.

I had set SQLITE_OMIT_AUTHORIZATION, SQLITE_OMIT_EXPLAIN, SQLITE_OMIT_PROGRESS_CALLBACK, and SQLITE_OMIT_TCL_VARIABLE to trim the size of the binary, and used -Os to get it to that size.


If you don't need the full power of SQL it might be interesting to look into alternative solutions, like Berkeley DB.


You may want to have a look at cdb it is great for 'constant' data, the code is opensource and will compile to tiny executables, you can even gut it to get the exe smaller. Under 10k should be easy.google cdb