Some important conclusion I drawed from tutorial.
- The created database will be saved in the private application folder(./data/data/YOUR_PACKAGE/database/***.db), so only the application which created the database can connect the database.
- If you want to make the database to be public, then you must use content provider and create the database class(sqliteOpenHelper) as private class in content provider. Besides, the merit of using content provider lies in the easy modification of the different database systems you choosed to use.
- Subclass extends SQLiteOpenHelper
- If you want to create more than one table, you should run execSQL("Create ... ") respectively. One execSQL can only create one table, other create commando will not be concerned.
- It is strongly recommanded that, all the static parameter for the construction of the table in database should be put in an interface or a final class, easy to make update. Personal recommandation is to use a final class. Each table will be a private class in this final class. Private classes of tables should extends BaseColumn, so they will have the attribute _id naturally!