The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.
SharedPreferences and your own file structures, the third primary
means of persisting data locally on Android is via SQLite. For many applications,
SQLite is the app’s backbone, whether it is used directly or via some
This chapter will focus on how you can directly work with SQLite to store relational data.
SQLite is a very popular embedded database, as it combines a clean SQL interface with a very small memory footprint and decent speed. Moreover, it is public domain, so everyone can use it. Lots of firms (Adobe, Apple, Google, Symbian) and open source projects (Mozilla, PHP, Python) all ship products with SQLite.
For Android, SQLite is “baked into” the Android runtime, so every Android application can create SQLite databases. Since SQLite uses a SQL interface, it is fairly straightforward to use for people with experience in other SQL-based databases. However, its native API is not JDBC, and JDBC might be too much overhead for a memory-limited device like a phone, anyway. Hence, Android programmers have a different API to learn — the good news being is that it is not that difficult.
This chapter will cover the basics of SQLite use in the context of working on Android. It by no means is a thorough coverage of SQLite as a whole. If you want to learn more about SQLite, the SQLite Web site may help.
The preview of this section was accidentally identified as an Android 'tasty treat' by the Cookie Monster.
The preview of this section was stepped on by Godzilla.
The preview of this section was lost in the sofa cushions.
The preview of this section is off trying to sweet-talk the Khaleesi into providing us with a dragon.
The preview of this section will not appear here for a while, due to a time machine mishap.
The preview of this section was the victim of a MITM ('Martian in the middle') attack.
The preview of this section left for Hollywood to appear in a reality TV show.