Operate SQLite in cmd
First, let's talk about the relationship between the SQLite database and the application. Many people are not very clear about it. In fact, unlike Java Web, an SQLite database only corresponds to one application, for example, the database name is test_mars_db.db.
The Application name is Mars. sqlite3, then the database file is directly placed in the data/data application of the simulator Mars. under databases in qlite3 (you can use the LS and LS-l commands to view the directory, in the CD
Use the LS command in the data/data directory to display information about all processes ). If the test_mars_db database is not available, sqlite3 test_mars_db will create a new database. You can use the following statement:Createtable user (ID int, name varchar (20), create a new table, insert data using insert, and perform other queries, updates, and deletes.
As follows:
Using SQLite in Android
The advantage of SQLite is its efficiency. The Android runtime environment contains the complete SQLite.
The biggest difference between SQLite and other databases is its support for data types. When creating a table, you can specify the Data Type of a column in the createtable statement, however, you can put any data type into any column. When a value is inserted into the database, SQLite checks its type. If this type does not match the associated column, SQLite will try to convert the value to the column type. If the conversion fails, the value is stored as its own type. For example, you can put a string in the integer column. SQLite calls this "weak type" (manifesttyping .).
In addition, SQLite does not support some standard SQL functions, especially the foreign key constraint (foreign ).
Key constrains), nested transcaction and right Outer Join and full
Outer Join, and some alter table functions.