sqlite3数据库是关系型数据库,体积小,支持ACID事物。
  (ACID,指数据库事务正确执行的四个基本要素的缩写。包含:原子性(Atomicity)、一致性(Consistency)、隔离性(Isolation)、持久性(Durability)。一个支持事务(Transaction)的数据库系统,必需要具有这四种特性,否则在事务过程(Transaction processing)当中无法保证数据的正确性,交易过程极可能达不到交易方的要求。)
  /********************************************/
  sqlite是一个轻量级的嵌入式数据库。
  特征:
  1.零配置,无需安装和管理配置;
  2.储存在单一磁盘文件中的一个完整的数据库;
  3.数据库文件可以在不同字节顺序的机器间自由共享;
  4.支持数据库大小至2TB;
  5.足够小,全部源代码大致3万行c代码,250KB;
  6.比以前流行的大多数数据库对数据的操作要快;
  /*******************************************/
  SQLite数据库采用模块化设计,由8个独立的模块构成,这些独立模块又构成了三个主要的子系统,模块将复杂的查询过程分解为细小的工作进行处理。

  /*******************************************/
  手工建数据库:
  linux@ubuntu:~$ sqlite3 my.db
  查看帮助:
  sqlite> .help
  文件存放位置:
  sqlite> .database
  退出:
  sqlite> .quit
  查看表:
  sqlite> .tables
  显示表的结构:
  sqlite> .schema
  1.建表:
  sqlite> create table usr(id integer primary key, name text,age integer null, gender text, salary real not null);
  2.删除表
  sqlite> drop table usr;
  3.增:
  sqlite> insert into usr(id, name, age, salary) values(2, 'liu', 20, 6000);
  4.删
  sqlite> delete from usr where id = 2;
  5.改:
  sqlite> update usr set gender = 'man' where id = 3;
  6.查:
  sqlite> select * from usr where id = 2;