Simple example of Android using SQLite database
•
Android
First draw a diagram to understand the simple process of database operation under Android:
1. First, write your own database operation help class, which inherits from the sqliteopenhelper provided by Android
2. Write some methods of database operation in your Dao layer with your helper
3. The activity calls the database operation method of Dao layer for operation
The following examples are:
1.Helper
2. Write Dao layer
When this is done, other operations are simple
In addition, the database files are placed in this directory
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码