SQLite Database

For more complex data structures, a database provides a quicker and more flexible access method than flat files or shared preferences.Android provides a built-in database called SQLite that provides full relational database capability utilizing SQL commands. Each application that uses SQLite has its own instance of the database, which is by default accessible only from the application itself. The database is stored in the /data/data/ <package_name>/databases folder of an Android device.A Content Provider can be used to share the database information between applications.The different steps for utilizing SQLite are

1. Create a database.

2. Open the database.

3. Create a table.

4. Create an insert interface for datasets.

5. Create a query interface for datasets.

6. Close the database.

The next recipe provides a general method to accomplish these steps.

Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook


Post a comment