Java Android Program to Write to a SQLite Database in Android

Here is source code of the Program to Write to a SQLite Database in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below.

Android Application by uses SQLite Database for handling the Application Specific data in this class teaches you how to create a database and to write to it.Before we go on further let us discuss something about SQLiteOpenHelper.
SQLiteOpenHelper is an abstract class used to implement the best practice pattern for creating, opening, and upgrading databases.
By implementing an SQLiteOpenHelper, you hide the logic used to decide if a database needs to be created or upgraded before it’s opened, as well as ensure that each operation is completed efficiently. It’s good practice to defer creating and opening databases until they’re needed. The SQLiteOpenHelper caches database instances after they’ve been successfully opened, so you can make requests to open the database immediately prior to performing a query or a transaction.