SharedPreferences Vs. SQLite database

hi,
is there difference between "SharedPreferences" and "SQLite Database" as far as their work is concerned. means both are used to store data on device parmanently.
If I want to store something on device which could be more convenient ?

Thnx.:cool:
 

afonseca

Newbie
hi,
is there difference between "SharedPreferences" and "SQLite Database" as far as their work is concerned. means both are used to store data on device parmanently.
If I want to store something on device which could be more convenient ?

Thnx.:cool:

SharedPreferences are for quickly storing values like single strings, settings, flags, etc. The SQLite Database can do the same but is a little more heavy duty, think storing tables of information like customer data with multiple properties and being able to search (the Query in SQL).

So the answer is, "it depends" on what that "something" is you want to store? If it's a user setting then the SharedPreferences is quick and easy. If it's a set of records then the SQLite Database may make more sense.

Hope this helps.
 
Top