SQLite database larger than CSV flat file? SQLite database larger than CSV flat file? database database

SQLite database larger than CSV flat file?


There should be no expectation of the SQLite database file being smaller. The purpose of putting data in a database/table is to access that data according to business rules/SQL joins that are required. Indexes and other metadata like table definitions can easily explain the additional space requirements.


A sqlite db contains, reserved space for header, also contains table schemas and extra information like App Id, version, encoding see link for more information below:

http://www.sqlite.org/fileformat.html


Look at The SQLite Database File Format

you will see where the overhead comes from.

The purpose of a database is not only storing raw data. You get the whole relational structure, indexes... The only thing you might have expected is to have the datafile compressed but it would have probably hit performance.