數(shù)據(jù)庫的創(chuàng)建
定義一個類去繼承SQLiteOpenHelper
public class MyOpenHelper extends SQLiteOpenHelper {
/**
* name:數(shù)據(jù)庫的名字 factory 目的創(chuàng)建cursor對象 version 數(shù)據(jù)庫的版本 從1開始
*
* @param context
*/
public MyOpenHelper(Context context) {
super(context, "itheima.db", null, 1);
}