package it372.smiths.studentsdb2; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class StudentsDbHelper extends SQLiteOpenHelper { private static final String DB_NAME = "students.db"; private static final int DB_VERSION = 1; StudentsDbHelper(Context context) { super(context, DB_NAME, null, DB_VERSION); } @Override // This method is only called if the database // does not exist. public void onCreate(SQLiteDatabase db) { db.execSQL("create table students(" + "name text, grade integer, gender text);"); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // This method is required, but not used // in this example } }