Objective
SQLite is a software library that implements a self-contained, server-free, 0-configured, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. SQLite source code is not subject to copyright restrictions.
After a simple understanding of sqlite, I really wanted to try it out. He was so light-weight, as a procedural ape, that I had no reason not to learn a bit.
SQLite Download and basic usage
1, download temporarily only see 32-bit, http://www.sqlite.org/download.html
2. Unzip after downloading. Then copy the exe file to the C:\Sqlite
3. Open the Execution form and enter CMD
Enter cd\ to return to the C packing folder
Re-enter the CD Sqlite, will jump to the C:\Sqlite directory (assuming you want to go to D, then enter D: you can)
4. Start creating a database now: Call the Sqlite3.exe file under C:\Sqlite and enter the command as sqlite3 C:\Sqlite\aehyok.db
Now you can see the version of SQLite. At the same time, let's look at the files under C:\Sqlite.
5, re-enter once Sqlite3 C:\Sqlite\aehyok.db; Despite the command error, but the database is still generated, do not know why, now can use, then continue
6. To create a database table Input command the Create table Test (ID integer primary key,name text);
Then insert two data entry commands insert into Test (id,name) VALUES (1, ' aehyok ');
Insert into Test (Id,name) VALUES (2, ' Candy ');
7. Check now for select * from Test;
8, next try to change the data bar Update test set name= ' Aehyoks ' where id=1;
9. Finally come again to delete the Le delete from Test where id=1;
10. Change the display mode
11. Create a View
12. Create an index
13. Display table structure
14. Displaying Tables and views
15. Get the index of the specified table
16. Export data to SQL file
17. Import Database from SQL file
18. List the database in the current data file
19. Backing Up the database
20. Recovering data or databases
1 means the data has been emptied
2 represents the recovery data or database can be the following three error is actually the process of recovering data structure
3 data has been recovered and the original data can be detected.
Summarize
A simple test of some basic SQL instructions, the feeling is relatively simple, this can also be used as a tool for app data storage development. Good stuff. Plan to use this super lightweight SQLite database in Python learning.
Hold:-O.
Simple use of SQLite under Win7