SQLite 数据库初学

以前,我开发一直都是采用MSSql + dot Net 或者 MySql + dot Net

如果是小型的什么项目,我会采用Access + dot Net

呵呵呵  说实在的,我开始并不了解Sqlite是什么玩意儿...  十分惭愧啊

先了解下Sqlite是啥?

  SQLite是一款轻型的数据库,它的设计目标是嵌入式的,而且目前已经在很多嵌入式产品中使用了它,它占用资源非常的低,在嵌入式设备中,可能只需要几百K的内存就够了。它能够支持Windows/Linux/Unix等等主流的操作系统,同时能够跟很多程序语言相结合,比如Tcl、PHP、Java等,还有ODBC接口,同样比起Mysql、PostgreSQL这两款开源世界著名的数据库管理系统来讲,它的处理速度比他们都快。SQLite虽然很小巧,但是支持的SQL语句不会逊色于其他开源数据库

      于是就到官方网站: http://www.sqlite.org/download.html  去下载了个 Sqlite

Precompiled Binaries For Windows
  sqlite-3_6_3.zip
(233.97 KiB)
  A command-line program for accessing and modifing SQLite databases. See the documentation for additional information.
  tclsqlite-3_6_3.zip
(296.75 KiB)
  Bindings for Tcl/Tk. You can import this shared library into either tclsh or wish to get SQLite database access from Tcl/Tk. See the documentation for details.
  sqlitedll-3_6_3.zip
(224.99 KiB)
  This is a DLL of the SQLite library without the TCL bindings. The only external dependency is MSVCRT.DLL.
  sqlite3_analyzer-3.6.1.zip
(508.70 KiB)
  An analysis program for database files compatible with SQLite version 3.6.1 and later.

我就下载了第一个,是命令行下操作sqlite的,然后我解压出来,就一个文件 sqlite3.exe,开始还真有点蒙了,看了官网的 Document

SQLite In 5 Minutes Or Less A very quick introduction to programming with SQLite

 

下面我进行配置

1、设置环境变量,这个我想都会的吧

就在我的电脑的属性 -  高级 - 环境变量 ,然后在Path 结尾处加入 “;sqlite3.exe所在的目录地址”保存设置

2、进入command模式

开始 - 运行 输入“cmd“  输入 “sqlite3  testdb.db”  

然后系统会提示

这样就创建了一个数据库在当前目录下了,但是这时候你可以去找下,估计还是没有的

然后输入 “create table tb1 (city varchar(20), name varchar(20));”

这样 ok  一个数据库内涵一个数据表就建好了    嘿嘿

 

感觉好像很麻烦的,不过大家可以去  http://sqliteadmin.orbmu2k.de/  下载一个  SQLite Administrator   就很方便了 

 

呵呵  写的很乱呐

 

注:原创文章,转载请添加出处,谢谢( http://chenjilv.cnblogs.com )

posted on 2008-10-09 02:25  jerreychen  阅读(721)  评论(3编辑  收藏  举报

导航