I'm using the built in sqlite library on the Android platform.
I'm considering adding several general purpose fields that users will be able to use for their own custom applications, but these fields will be blank most of the time.
My question is, how much overhead will these blank fields add to my database? Do null fields even take up per record memory in sqlite? If so, how much? I don't quite understand the inner workings of a sqlite database.
The SQLite file format is described here. A NULL field will take one byte.
One way to provide custom/optional fields is to put them in a separate table with a foreign key identifying the corresponding record. Then no additional record is required if there are no custom fields, though there will be a need to do joins to gather all the fields when there are custom fields.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With