开发者

Storage of values?

开发者 https://www.devze.com 2023-02-15 00:18 出处:网络
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 b

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:

  1. Shared Preferences
  2. Internal Storage
  3. External Storage
  4. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消