SQLite is a lightweight database. it is designed to be embedded and has been applied to many embedded products. it occupies very low resources, in an embedded device, only a few hundred KB of memory is required. It supports
SQLite is a lightweight database. it is designed to be embedded and has been applied to many embedded products. it occupies very low resources, in an embedded device, only a few hundred KB of memory is required. It supports mainstream control systems such as Windows, Linux, and Unix, and can be combined with many programming languages, such as Tcl, PHP, Java, and ODBC interfaces, similar to Mysql and PostgreSQL, the two world-renowned open-source database management systems, the processing speed is faster than that of them.
SQLite is small, but the supported SQL statements are not inferior to other open-source databases. the supported SQL statements include:
ATTACH DATABASE
BEGIN TRANSACTION
Comment
COMMIT TRANSACTION
COPY
CREATE INDEX
CREATE TABLE
CREATE TRIGGER
CREATE VIEW
DELETE
DETACH DATABASE
DROP INDEX
DROP TABLE
DROP TRIGGER
DROP VIEW
END TRANSACTION
EXPLAIN
Expression
INSERT
On conflict clause
PRAGMA
REPLACE
ROLLBACK TRANSACTION
SELECT
UPDATE
At the same time, it also supports the transaction processing efficiency and so on. Some people also say that it is like Microsoft's Access, and sometimes it is a bit similar, but in fact they are very different. For example, SQLite supports cross-platform, simple control, and can directly create databases using many languages. Unlike Access, it requires Office support. If you are using a small scale or want embedded development without a suitable database system, you can now consider using SQLite. Its latest version is 3.2.2, and its official website is: http://www.sqlite.org, which can get the source code and documentation above. At the same time, because the database structure is simple and the system source code is not much, it is also suitable for professionals who want to study database system development.
Now let's start with a brief introduction. I want to understand several titles, one is how to install the application, and the other is how to develop it with PHP.
I. Installation
1. Windows Platform
Download files under windows, is really a command line program, (: http://www.sqlite.org/sqlite-3_2_2.zip), this command line program is used to contain natural database files, performance SQL query, backup database and so on.
After the download, for example, We decompress to D: \ Downloads \ sqlite \ sqlite-3_2_2 directory, then we enter cmd, and into the directory:
Cdd: \ Downloads \ sqlite \ sqlite-3_2_2
D: \ Downloads \ sqlite> sqlite3 test. db
# If test. db does not exist, a database file is generated. If yes, the database file is directly applied, which is equivalent to the use in mysql.
SQLite version 3.2.2
Enter '. help' for instructions
Sqlite>
# SQLite prompt. if you want to view the command help input to. help, all system commands in sqlite start:
Sqlite>. help
. Databases List names and files of attached databases
. Dump? TABLE? ... Dump the database in an SQL text format
. Echo ON | OFF Turn command echo on or off