Overview
The SQLite3 is a lightweight 嵌入式 database. It occupies very low resources, in the embedded device, it may only need hundreds of K of memory is enough. It's 处理速度比Mysql、PostgreSQL这两款著名的数据库速度还快 .
Introduction to Databases
The common database can be divided into 2 major categories
- relational database (
主流 )
- Object Type Database
A common relational database
- PC-side: Oracle, MySQL, SQL Server, Access, DB2, Sybase
- Embedded \ Mobile Client: SQLite
Sqlitesqlitesql statements
The SQL (Structured Query Language) Structured Query language is a language that defines and operates data in a relational database. Case-insensitive, semicolon-terminated per statement; SQL statements are divided into three main categories: DDL, DML, DQL.
Ddl
DDL (data definition Language) data definition statements, including create and drop other operations, creating a new table or deleting a table ( creat table or drop table ) in a database
/* 创建表 */createtableifnotEXISTS t_student( idintegerPRIMARYKEY AUTOINCREMENT, name text, real);/* 删除表 */droptableifexists t_student;
Dml
DML (Data manipulation language) operation statements, including, insert update ,, and delete so on.
DQL
DML (data Query language), the keyword select is the most used statement for all SQL statements.
Navacateios in the development of SQLite
iOS Development Series-sqlite