Handling SQLite Database from Android Programatically

Hi guys, first of all let me wish you all “A very Happy New Year”, i was working on a android project from couple of week ends so thought of putting it on my blog so that it can help some one and save his time.Android provides several ways to store user and application data. SQLite is one way of the way to store user data. SQLite is very light weight database which comes with Android OS. In this tutorial I’ll be discussing how to write classes to handle all SQLite operations.

Note: please follow the comments in the code carefully, this article is pretty simple
please find the below is the structure for the table.

AcctNo, Acct Holder Name, Acct Type, Bank Name, Created Date, amount

in order to hold the data between calls we can create the same old POJO classes, below is the OpeningBalance bean

once we are done with the bean class, now its time to write the database class, which can directly handle the SQLite db. now in order to handle all database CRUD(Create, Read, Update and Delete) operations we need to write our own class which will extend from a super class SQLiteOpenHelper