When experimenting with (embedded) Apache Derby DB, I noticed that a fresh database, with no tables in it, takes about 1.7 MB of disk space. It’s quite a bit more than my common wisdom would expect.
Why is that? Are there significant differences in this between various database engines? Can this be controlled with some “block size” -like settings?
There will be differences between different database engines.
Generally, there will be all the metadata tables that are needed to track the real tables/views/whatever else can appear in the database when they’re created, possibly some pre-allocated space ready for when tables are added or when transactions start occurring.
e.g. the model database for SQL Server (2000) occupies ~1.25MB of space, of which 0.5MB is empty. This DB is the basis for all other databases in SQL server.