I have a database with 4 tables. Each table has 1 column. 3 of the tables will typically hold only around 8-12 values, the other maybe 100+. The values are basic, color, city, etc. The user clicks a butto开发者_JS百科n, up pops a list with values they can select, delete or add.
It seems like a lot to have a table for ~8 values. I was wondering if there was a better way to store this data given that values need to be able to be added, deleted and the number will be dynamic.
I'm not trying to turn you off of using sqlite, but just to put down some other options.
They are, direct from the Data Storage Developer doc:
- Shared Preferences
- Internal Storage
- External Storage
- Network Server
I would recommend either Shared Preferences or Internal Storage for such a small amount of values. Performance wise, my understanding is you will get better performance using one of these two but I would get confirmation, I'm just repeating what I've heard at SO before. For such a small amount of values, I'm not certain that the difference is even measurable or will have any effect on your app.
精彩评论