Roger
Roger

Reputation: 4259

Storage of values?

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 button, 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.

Upvotes: 0

Views: 145

Answers (1)

user432209
user432209

Reputation: 20167

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.

Upvotes: 2

Related Questions