In the previous post,We discuss about Android SQLite Database . In this post we are going to discuss about how to create multiple tables in SQLite database.Here, We are going to use four classes.There are, 1.SQLiteActivity 2.DatabaseHandler 3.StudentModel 4.TeacherModel SQLiteActivity : SQLiteActivity is used to create the instance of DatabaseHandler and access its methods. DatabaseHandler : DatabaseHandler is used to create the SQLite database and to perform CRUD operation. StudentModel : StudentModel contains student get() and set() method. TeacherModel : TeacherModel contains teacher get() and set method. You can download source code here . This is code for SQLiteActivity package com.etr.sqlitedatabasewithtwotablesexample; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.Menu; public cl...
Comments
Post a Comment