windowsÏÂsqlite°²×°Ê¹ÓúÍÐÔÄÜÓÅ»¯¼°ÉèÖÃ
ÔÎÄÁ´½Ó£ºhttp://edu.codepub.com/2008/1231/805.php
windowsÏÂsqlite°²×°Ê¹ÓúÍÐÔÄÜÓÅ»¯¼°ÉèÖÃ
sqliteÊÇǶÈëʽSQLÊý¾Ý¿âÒýÇæSQLite£¨SQLite Embeddable SQL Database Engine£©µÄÒ»¸öÀ©Õ¹¡£SQLiteÊÇÒ»¸öʵÏÖǶÈëʽSQLÊý¾Ý¿âÒýÇæСÐÍCÓïÑԿ⣨C library£©£¬ÊµÏÖÁ˶ÀÁ¢µÄ£¬¿ÉǶÈëµÄ£¬ÁãÅäÖõÄSQLÊý¾Ý¿âÒýÇæ¡£ÌØÐÔ°üÀ¨£ºÊÂÎñ²Ù×÷ÊÇÔ×Ó£¬Ò»Ö£¬¹ÂÁ¢£¬²¢Çҳ־õģ¬¼´Ê¹ÔÚϵͳ±ÀÀ£ºÍµçÔ´¹ÊÕÏÖ®ºó¡£ ÁãÅäÖ×—²»ÐèÒª°²×°ºÍ¹ÜÀí¡£ÊµÏÖÁ˾ø´ó¶àÊýSQL92±ê×¼¡£Õû¸öÊý¾Ý¿â´æ´¢ÔÚÒ»¸öµ¥Ò»µÄÎļþÖС£Êý¾Ý¿âÎļþ¿ÉÒÔÔÚ²»Í¬×Ö½ÚÐòµÄ»úÆ÷Ö®¼ä×ÔÓɵع²Ïí¡£Ö§³Ö×î´ó¿É´ï2TµÄÊý¾Ý¿â¡£×Ö·û´®ºÍBLOBÀàÐ͵ĴóСֻÊÜÏÞÓÚ¿ÉÓÃÄÚ´æ¡£ÍêÕûÅäÖõÄÉÙÓÚ250KB£¬ºöÂÔһЩ¿ÉÑ¡ÌØÐÔµÄÉÙÓÚ150KB¡£ÔÚ´ó¶àÊý³£¼û²Ù×÷ÉϱÈÁ÷ÐеĿͻ§/·þÎñÆ÷Êý¾Ý¿âÒýÇæ¸ü¿ì¡£ ¼òµ¥Ò×ÓÚʹÓõÄAPI¡£ ÄÚ½¨TCL°ó¶¨¡£ ÁíÍâÌṩ¿ÉÓÃÓÚÐí¶àÆäËûÓïÑԵİ󶨡£¾ßÓÐÁ¼ºÃ×¢Ê͵ÄÔ´´úÂ룬´úÂë95%ÓнϺõÄ×¢ÊÍ¡£¶ÀÁ¢£ºÃ»ÓÐÍⲿÒÀÀµ¡£Ô´´úÂëλÓÚ¹«¹²Óò£¬¿ÉÓÃÓÚÈκÎÓÃ;¡£ÓÃSQLiteÁ¬½ÓµÄ³ÌÐò¿ÉÒÔʹÓÃSQLÊý¾Ý¿â£¬µ«²»ÐèÒªÔËÐÐÒ»¸öµ¥¶ÀµÄ¹ØϵÐÍÊý¾Ý¿â¹ÜÀíϵͳ½ø³Ì£¨separate RDBMS process£©¡£SQLite²»ÊÇÒ»¸öÓÃÓÚÁ¬½Óµ½´óÐÍÊý¾Ý¿â·þÎñÆ÷£¨big database server£©µÄ¿Í»§¶Ë¿â£¨client library£©£¬¶øÊǷdz£ÊʺÏ×ÀÃæ³ÌÐòºÍСÐÍÍøÕ¾µÄÊý¾Ý¿â·þÎñÆ÷¡£SQLiteÖ±½Ó¶Áд£¨reads and writes directly£©ÔÚÓ²ÅÌÉϵÄÊý¾Ý¿âÎļþ¡£
ÏÂÃæÊÇÎÒ×Ô¼ºµÄʹÓùý³Ì:
SQLite°²×°·½°¸
SQLiteµÄ×îа汾¿ÉÒÔ´ÓÕâÀïÏÂÔØ¡£ÏÂÃæÎÒÃÇÒÔWindows°æ±¾sqlite-3_5_1.zip ΪÀý½éÉÜÆä°²×°·½·¨¡£
£¨´ó¼Ò¿ÉÒÔÑ¡ÔñÏÂÔØ°²×°ÊʺÏ×Ô¼ºµÄ°æ±¾£©
ÏÂÔغ󣬽«sqlite-3_5_1.zip½âѹËõÖÁC:\sqliteĿ¼¼´Íê³É°²×°¡£
C:\sqliteĿ¼¹¹ÔìΪ£º
C:\sqlite
|
+--sqlite3.exe
´ò¿ªÒ»¸öCMDÃüÁî´°¿Ú
C:\>cd sqlite
C:\sqlite>sqlite3.exe mydb.db
SQLite version 3.5.1
Enter ".help" for instructions
sqlite> create table user ( id integer primary key, name varchar(32) );
sqlite> .schema
CREATE TABLE user ( id integer primary key, name varchar(32) );
sqlite>.quit
Í˳öºó£¬²é¿´C:\sqliteĿ¼£¬»á·¢ÏÖ¶à³öÒ»¸ömydb.dbÎļþ£º
C:\sqlite
|
+--sqlite3.exe
+--mydb.db
SQLiteÐÔÄÜÓÅ»¯
ºÜ¶àÈËÖ±½Ó¾ÍʹÓÃÁË£¬²¢Î´×¢Òâµ½SQLiteÒ²ÓÐÅäÖòÎÊý£¬¿ÉÒÔ¶ÔÐÔÄܽøÐÐ
Ïà¹ØÎĵµ£º
SQLite ÊÇÒ»¸öʵÏÖÁËÍ걸µÄ£¨self-contained)£¬¿ÉǶÈëµÄ(embeddable)£¬ÁãÅäÖÃ(zero-configuration)µÄSQLÊý¾Ý¿âÒýÇæµÄСÐ͵ÄCº¯Êý¿â¡£Ëü°üº¬ÒÔϵÄÌص㣺
.
ÊÂÎñ´¦ÀíÔ×Ó»¯(atomic)£¬Ò»Ö»¯(consistent)£¬³Ö¾Ã»¯(isolated)£¬¾øÔµ»¯(durable)£¬¼´Ê¹ÊÇÔÚϵͳ±ÀÀ£ºÍµôµçʱ
ÁãÅäÖ㬲» ......
2010ÄêSQLiteѧϰ±Ê¼ÇÖ®Ò»
Ò»£® ÈçºÎ»ñÈ¡SQLite×îа汾
¹Ù·½Õ¾µã£ºhttp://www.sqlite.org/
´Óhttp://www.sqlite.org/ÍøÕ¾µÄDownloadÒ³Ãæ»ñÈ¡
¼´ÈçÏÂÒ³ÃæÏÂÔØ
http://www.sqlite.org/download.html
¶þ£®WindowsϵÄSQLiteµÄÔ´´úÂëÊÇÄĸöÈí¼þÑ¹Ë ......
sqliteÊý¾Ý¿âµÚÈý·½javaÀ©Õ¹°üÏÂÔصØÖ·£ºhttp://www.zentus.com/sqlitejdbc/
ÓÐ2¸ö°ü£¬Ò»¸öÊÇnested£¨Ç¶ÈëʽµÄ£©£¬Ò»¸öÊÇnative(±¾µØµÄ)¡£
Çø±ðÔÚÓÚ:nested ²»ÐèÒª¶îÍâµÄdllÎļþ£¬µ«ÊÇËÙ¶ÈÂý¡£nativeÐèÒªÒ»¸ö¶îÍâµÄdllÎļþ£¬ËٶȺܿ졣
1.ʹÓÃnested°ü£ºsqlitejdbc-v037-nested.jar
java´úÂ룺
java ´úÂë
packa ......