学习资料:
菜鸟教程: http://www.runoob.com/sqlite/sqlite-tutorial.html
1.SQLite:
一款轻型的数据库,整个数据库都存储在一个单一文件中,通过api直接调用,在开始一个事务时锁定整个数据库.无需安装和管理配置,没有额外依赖
嵌入式,支持多种操作系统,多种开发语言
足够小,大致13万行C代码,4.43M,资源占用很低,支持数据库大小至2TB
简单, 轻松的API
处理速度快
SQLite和mysql的区别:
SQLite的数据库权限只依赖于文件系统, 没有用户账户的概念.
参考:
http://blog.51cto.com/ivanzz/1130544
https://blog.csdn.net/zbw1185/article/details/47975965
2.安装SQLite
一般操作系统自带,可通过sqlite3命令检查是否安装.若没有安装,安装步骤见: http://www.runoob.com/sqlite/sqlite-installation.html
3.数据类型
integer | int, integer, tinyint, smallint, mediumint, bigint, unsigned big int, int2, int8 |
text | character(20), varchar(255), varying character(255), nchar(55), native character(70), nvarchar(100), text, clob |
none | blob, no datatype specified |
real | real, double, double precision, float |
numeric | numeric, decimal(10,5), boolean, date, datetime |
4.运算符
一般用于where语句