SQLite is a lightweight database that implements the majority of SQL-92 standards, including transactions, which represent atomicity, consistency, isolation and durability (ACID ), trigger and most complex queries. SQLite database is a required database product for software development on the Android platform! A simple example of SQLite development in Ubuntu12.04 is as follows: 1. Install SQLite3 & n
SQLite is a lightweight database that implements the majority of SQL-92 standards, including transactions, which represent atomicity, consistency, isolation and durability (ACID ), trigger and most complex queries. SQLite database is a required database product for software development on the Android platform!
Simple examples of SQLite development in Ubuntu 12.04 are as follows:
1. Install SQLite3
Www.linuxidc.com @ linuxidc ~ $ Sudo apt-get install sqlite sqlite3
2. view the version number
Www.linuxidc.com @ linuxidc ~ $ Sqlite3-version
3. Create a test Database
Www.linuxidc.com @ linuxidc ~ $ Sqlite3 test. db
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ". help" for instructions
Enter SQL statements terminated with ";"
Sqlite>
4. view the database
Sqlite>. database
Seq name file
----------------------------------------------------------------------------
0 main/home/hadron/test. db
5. Create a data table
Sqlite> create table user (id, username, password );
6. insert data
Sqlite> insert into user (id, username, password) values (1, 'abc', '123 ');
7. query data
Sqlite> select * from user;
1 | abc| 123
8. log out of the database
Sqlite>. exit
9. Access the database again
Www.linuxidc.com @ linuxidc ~ $ Sqlite3
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ". help" for instructions
Enter SQL statements terminated with ";"
Sqlite>
10. Install the visualization tool:
Www.linuxidc.com @ linuxidc ~ $ Sudo apt-get install