SQLite Introduction
SQLite is a lightweight, embedded, and relational database. It is currently used in iPhone, Android, and other mobile phone systems. SQLite is portable, easy to use, small, efficient, and reliable. SQLite is embedded into applications that use it.Progra
1. SQLite 1.1 SQLite IntroductionSQLite is a lightweight database, is an acid-compliant relational database management system, the Android system has been in the framework of the use of the user-friendly statements.1.2 SQLite data typeSQLite uses dynamic data types, which are automatically judged based on the value of
In Android databases, the SQLiteOpenHelper class is inherited first. The following code is directly pasted:
Public class DBHelper extends SQLiteOpenHelper {/*** @ Fields name: Database name*/Private final static String name = "info. db ";/*** @ Fields version: version Number*/Private final static int version = 1;Private Class Public DBHelper (Context context, String name, CursorFactory factory,Int version ){Super (context, name, factory, version );}P
If you don't talk much about it, directly add the code, and the comments in the Code are clear.
Package mars.com; import android. app. activity; import android. content. contentvalues; import android. database. cursor; import android. database. SQLite. sqlitedatabase; impor
Android SDK Manager cannot obtain the SDK list.
1. Open the running Android SDK Manager, Tool menu, select Options, open the settings menu, check the "Force https://...sources to be fetched using http ://... ", and click Close to Close, for example:
2. Set the hostes file to access the Google download center on the com
Details about features and concepts of the SQLite database in android!2. Database Operation Process[Usage conditions] Prepare a DATABASE system (MySQL) --> Create a DATABASE --> Create/design a TABLE --> Data Operations[Data operations] Connection --> prepare SQL statements (String SQL) --> Execute SQL statements (Statement/PreparedStatement) --> processing result (int/ResultSet)3. Use SQLite1) Create a dat
In view of the frequent use of Sqlite database for data persistence, a little encapsulation, easy to use.This package class mainly supports the function
Supports multi-user data storage
Support for SQLite database upgrade
Support for incoming SQL statement build table
Support Sqlitedatabase basic operation. For example: Execsql, rawquery, insert, etc.
Resolves a database concurrency
SQLite is a little different from other common database, that is, the SQLite database is stored in a file, you can directly export the file from the phone, as a file, and then put on the computer to view.The Android operations database has the following steps:1, inherit Sqliteopenhelper, realize the method inside.Publicclassmydbhelperextendssqliteopenhelper{publi
Android apps will inevitably deal with SQLite. With the continuous upgrade of the application, the original database structure may no longer adapt to the new features, this time, you need to upgrade the structure of the SQLite database.
SQLite provides ALTER TABLE commands that allow users to rename or add new fields
This is also achieved through Android Juint.Based on the last project continued, the last project Portal: "Android–android juint and Sqlite" http://www.cnblogs.com/yydcdut/p/3790579.htmlUpdate Database public Personsqlite (context context) {super (context, "person.db", null , 2 ); // TODO auto-generated con
Android provides four Data Storage Methods: Shared preferences: used to store data in the "key"-"value" format. It is a lightweight key-value storage mechanism, only basic data types can be stored. Filws: file storage SQLite: a standard database provided by Android. Supports SQL statement Network: stores and obtains data through the network.Shared preferences is
Introduce the encryption module to SQLite in the Android JNI Environment
Free SQLite Open Source Code provides only two functions. Only these two functions can achieve the overall database encryption. Then waste a little effort from the Internet to find a good open source library http://sourceforge.net/projects/wxcode/files/Components/wxSQLite3/ has been achieved
Android Development Learning-SQLite database and unit test, androidsqlite
SQLite DatabaseLightweight relational databasesThe api required to create a database: SQLiteOpenHelper
Public class Myopenhelper extends SQLiteOpenHelper {// public Myopenhelper (Context context, String name, CursorFactory factory, int version) {// name database file name, cursor factory, d
[Android] mobile guard blacklist function (ListView combined with SQLite addition, deletion, and modification), androidsqlite
On the modify page, add an Add button on the top horizontal bar, click to open a custom dialog box, enter the phone number and intercept mode, and save it to the database.
See this http://www.cnblogs.com/taoshihan/p/5370378.html in the Custom dialog box
Add record
Call the show () m
Transfer from http://hi.baidu.com/hfutonline/blog/item/62b1e4de8bdf4b2e5882dd28.htmlRecently when doing Android project encountered a problem, the application initialization needs to batch to SQLite to insert a large number of numbers, causing the application to start too slow.Android using SQLite database, SQLite is a
sqlite3 User manualView Database VersionSqlite3-versionOpen or create a databaseSqlite3DatabaseName.DBView database file information. Database View database Tables. Table exit SQLite . Quit or. Exitlist configurations for the current display format. ShowShow database structure/show the structure of a table. Schema .Schema table name Set delimiter . Separator separators Show title bar. Headers on/offSetting the display mode . mode Set a NULL value
Recently I am looking at the source code of the Android platform. Next I will summarize the relationship between sqlitedatabase and its underlying sqllite database. How does the upper-layer sqlitedatabase call the underlying SQLite database operation.
Sqlitedatabase is a class used by the android framework layer to encapsulate sqllite database operations. Apps c
As a complete application, data storage operations are essential. Therefore, the android system provides four data storage methods. They are sharepreference, SQLite, content provider, and file. In Android, data is basically private and stored in the "Data/data/package name" directory. Therefore, to share data, use content provider.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.