即使是做網路應用,在斷線情況下,也需要考慮資料的本機存放區。在SQLite出現之前,資料量大的情況下,我們一直使用ACCESS,資料量小,則檔案儲存體。ACCESS不支援事務原子性,在斷電情況下(這種情況總是會發生)會導致資料很難恢複。 一:安裝 SQLITE,是一款輕型的資料庫,是遵守ACID的關聯式資料庫管理系統。我直接使用的是http://sqlite.phxsoftware.com/(An open source ADO.NET provider for the SQLite
1:SQL 指令以分號;結尾,兩個減號--則代表注釋2:建立表 create film(name,length)3:slite欄位可以儲存任何東西,會在適時自動轉換4:建立索引加快速度 create index mytitle on film(name)5:插入資料 insert into film values('myname',118) 如果沒有值則填 NULL6:查詢資料 select * from film 查詢資料限制條數 select * from film limit 10
今天經理給了我一個三十多M的sql檔案,讓我測試資料定位的問題。按照慣例,我使用navicat for sqlite建立一個表,然後將sql檔案匯入。我然後去幹其他事兒了,大約過了一個多小時,我想資料應該匯入的差不多了吧。我開啟一看,汗,死在那兒了。我關掉軟體又重新匯入一遍,還是那個德行。又得知經理曾經自己也導過,沒有成功。看來,用工具匯入的方法行不通了。 但是,想想就十多萬條資料,就是十多萬條insert
來源:http://www.sqlite.org/lang_keywords.htmlProgrammers are cautioned not to use the two exceptions described in the previous bullets. We emphasize that they exist only so that old and ill-formed SQL statements will run correctly. Future versions of
This is a Java wrapper including a basic JDBC driver for the SQLite 2/3 database engine. It is designed using JNI to interface to the SQLite API. That API is wrapped by methods in the SQLite.Database class. Since June, 2002, it includes a small