Chapter 23. Using SQLite Databases in Our Apps
If we are going to make apps that offer our users significant features, then almost certainly we are going to need a way to manage, store, and filter significant amounts of data.
It is possible to efficiently store very large amounts of data with JSON, but when we need to use this data selectively, instead of simply restricting ourselves to the options of "save everything" and "load everything", we need to think about which other options are available.
A good computer science course would probably teach the algorithms necessary to handle sorting and filtering our data, but the efforts involved to do this would be quite extensive. Also, what are the chances of us coming up with a solution that is as good as one offered by the people who provide us with the Android API?
As always, it makes sense for us to use the solutions provided in the Android API. As we have seen, JSON
and SharedPreferences
classes have their place...