Working with Data
What's in This Chapter?
- Working with the SQLite database
- Working with remote data using SOAP-based web services
- Working with REST-style web services using XML and JSON
- Storing data efficiently
- Connecting and talking to a database off the device directly
Data is the lifeblood of companies and the applications they build for public and private consumption. The application might be an app to interact with Twitter, an instant-message application, or your own personal address book. This chapter looks at interacting with device databases, the SQLite database engine, and some of the strategies to store data off the device on a central server through SOAP and REST without tying up the user interface.
Working with SQLite
SQLite is a data engine running in Android and is the native database on Android. It is different from client/server-style databases, such as SQL Server, Oracle, and DB/2. With a client/server-style database, a query or operation is sent to the database engine, the operation is performed, and the result is sent back to the client. With this type of database engine, the database runs in a separate process and typically on a separate machine. SQLite does not run on a separate machine; it runs on the same machine, Android, and runs in the same process as the application. SQLite is embedded in the application and linked to the app during the compilation process. Calls made to SQLite are not made over a network, but stay on the physical device. ...