@@ -0,0 +1,1531 @@
+package com.hutao.coolweather.db;%0A%0Aimport android.content.Context;%0Aimport android.database.sqlite.SQLiteDatabase;%0Aimport android.database.sqlite.SQLiteOpenHelper;%0A%0A/**%0A * Created by ubuntu on 16-6-1.%0A */%0Apublic class CoolWeatherOpenHelper extends SQLiteOpenHelper %7B%0A    @Override%0A    public void onCreate(SQLiteDatabase db) %7B%0A        db.execSQL(CREATE_PROVINCE); // %E5%88%9B%E5%BB%BAProvince%E8%A1%A8%0A        db.execSQL(CREATE_CITY); // %E5%88%9B%E5%BB%BACity%E8%A1%A8%0A        db.execSQL(CREATE_COUNTY); // %E5%88%9B%E5%BB%BACounty%E8%A1%A8%0A    %7D%0A%0A    @Override%0A    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) %7B%0A%0A    %7D%0A%0A    /**%0A     * Province%E8%A1%A8%E5%BB%BA%E8%A1%A8%E8%AF%AD%E5%8F%A5%0A     */%0A    public static final String CREATE_PROVINCE = %22create table Province (%22%0A            + %22id integer primary key autoincrement, %22%0A            + %22province_name text, %22%0A            + %22province_code text)%22;%0A%0A    /**%0A     * City%E8%A1%A8%E5%BB%BA%E8%A1%A8%E8%AF%AD%E5%8F%A5%0A     */%0A    public static final String CREATE_CITY = %22create table City (%22%0A            + %22id integer primary key autoincrement, %22%0A            + %22city_name text, %22%0A            + %22city_code text, %22%0A            + %22province_id integer)%22;%0A%0A    /**%0A     * County%E8%A1%A8%E5%BB%BA%E8%A1%A8%E8%AF%AD%E5%8F%A5%0A     */%0A    public static final String CREATE_COUNTY = %22create table County (%22%0A            + %22id integer primary key autoincrement, %22%0A            + %22county_name text, %22%0A            + %22county_code text, %22%0A            + %22city_id integer)%22;%0A%0A    public CoolWeatherOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory%0A            factory, int version) %7B%0A        super(context, name, factory, version);%0A    %7D%0A%0A%7D%0A

add database helper