What is SQLite
SQLite is a very lightweight relational database system that supports most SQL92 standards. SQLite does not need to install settings before use, no process to start, stop or configure, and most of the other SQL database engine as a separate server process, the program uses some kind of internal process communication (typically TCP/IP), to complete the task of sending requests to the server and receiving query results. SQLite does not use this way of working. When using SQLite, the program that accesses the database reads and writes directly from the database file on disk without intermediate server processes. Using SQLite generally requires only a single DLL, so you can use all of its features.
The main application scenarios for SQLite are databases for mobile phone applications and small desktop software.
Install using SQLite
The official of SQLite for http://www.sqlite.org/ Download.html, which offers a variety of versions of SQLite, since the native environment is WIN8, I chose to download the version prefixed with Sqlite-shell-win32-x86-3080500.zip. After the download is directly extracted to the disk, you can see the decompression only sqlite3.exe this file.
Next, you need to add sqlite to the PATH environment variable (adding environment variables is to make it easier to use sqlite), right-click My Computer-Properties-Advanced system settings-environment variables, find the path in the system variable, add the extracted folder directory to the back (note the folder directory, For example, my native directory E:\Tools\sqlite). Open cmd, enter Sqlite3, if the following message pops up, it means success.
SQLite Common operations
1. Create a new database file
> Command line go to the folder location where you want to create the db file
> Create a database file with a command: sqlite3 the DB file name to create
> Using commands to view attached database files:. databases
2. Open an established database file
> Command line enter the folder location of the db file you want to open
> Open an established DB file using the command line: Sqlite3 file name (Note: If the file name does not exist, a new db file will be created)
3. View Help Commands
> Command line Input sqlite3, go to sqlite3 command line interface
> input. Help view common commands
Using the SQLite management tool
Although the shell script provides a very powerful function, but it is not easy to use, fortunately, SQLite has a lot of open source and excellent dbms!
Here I will use a software called Sqlitespy, the official website address is http://www.yunqa.de/delphi/doku.php/products/sqlitespy/index, this software is green free installation version, Unzip to run directly on it.
As you can see, the interface layout of Sqlitespy is very similar to SQL Server, it is very convenient to operate, and it is not going to be described in detail here. (One thing to know is that you can create a SQLite database simply by using this software, without having to associate with the shell tools mentioned above)
[Not to be continued]