寶馬2019年9月上旬最新中文數(shù)據(jù)庫SQLiteDBs 4.19.12支持新款F、G和I系列車型,以及勞斯萊斯,MINI,寶馬摩托。
新版本提供Multi-VCI,可支持D-CAN線,ENET線,ICOM,OPS/GT1直接連接診斷。
可查看維修資料、電路圖等等 。
包含以下文件:
DiagDocDb.sqlite
streamdataprimitive_OTHER.sqlite
streamdataprimitive_ZHCN.sqlite
xmlvalueprimitive_OTHER.sqlite
xmlvalueprimitive_ZHCN.sqlite
注意事項:
1、購買本數(shù)據(jù)庫,寶馬匯只提供數(shù)據(jù)下載,不支持任何免費技術(shù)支持,如需有償技術(shù)支持請點擊這里。
2、本站所售商品為虛擬物品,鏈接一旦發(fā)出,概不退款。
3、獲取中文數(shù)據(jù)庫“解壓密碼”,需要支付網(wǎng)站30元,點擊下方的地址購買。
購買地址:
手機或電腦登錄微店購買
到寶馬匯網(wǎng)站查看此地圖
1。
創(chuàng)建一個新的通用應(yīng)用程序 2。在Visual Studio 2015上安裝SQLite Visual Studio拓展包(點此下載) 3。
添加NuGet包,運行程序包管理器控制臺命令:Install-Package SQLite。Net-PCL 4。
增加所需的參照:在Windows通用 -擴展中找到通用應(yīng)用程序平臺的SQLite,并在SQLite擴展安裝進行到第2步時添加 5。更新MainPage。
xaml 6。創(chuàng)建消息模型:創(chuàng)建一個模型,并用SQLite來存儲數(shù)據(jù)。
該模型被轉(zhuǎn)換成本地數(shù)據(jù)庫中的表。 普通的模型和使用SQLite的唯一區(qū)別是,必須添加一些額外的屬性,例如:[主鍵,自動遞增]。
要利用這些屬性,必須添加以下引用:using SQLite。Net。
Attributes; 7。串聯(lián)所有的東西:轉(zhuǎn)至MainPage。
xaml的代碼;定位SQLite文件;建立與數(shù)據(jù)庫的連接;基于步驟6,創(chuàng)建消息模型的表;點擊添加按鈕,該應(yīng)用程序?qū)⑻峤晃谋究虻膬?nèi)容到的SQLite數(shù)據(jù)庫;點擊檢索按鈕,應(yīng)用程序會獲取所有添加的消息,并在文本塊中顯示出來。
1.當(dāng)在A機安裝完Oracle數(shù)據(jù)庫后在B機安裝Oracle數(shù)據(jù)庫時,一定要先將磁盤陣列D盤格式化,而不是只將D盤中已由A機安裝的Oracle數(shù)據(jù)庫刪除,否則可能會出現(xiàn)意想不到的錯誤,例如Oracle偵聽服務(wù)失敗等; 2.最終安裝好Oracle數(shù)據(jù)庫后,要對D:\Oracle\Orant\network\Admin\ Listener。
ora文件進行修改,其中Server名稱一定要改為Active host name Alias,如不進行修改將使客戶端的Oracle數(shù)據(jù)庫用戶無法連接到Oracle數(shù)據(jù)庫中。 3.在Hosts文件中增加一條記錄,使Active IP Address和Active Host Name相互對應(yīng),這樣系統(tǒng)就會自動起到解析作用。
Hosts文件位于c:\Winnt\ system32\drivers\etc目錄下。 4.要注意不到萬不得已,不要強行切換,避免產(chǎn)生數(shù)據(jù)錯誤。
如必須對雙機進行切換,可先進入Svrmgr Oracle服務(wù)器控制臺,用Shutdown命令關(guān)閉Oracle數(shù)據(jù)庫,再進行切換。
1:Android SQLite數(shù)據(jù)庫創(chuàng)建數(shù)據(jù)庫 1。
Context。createDatabase(String name,int version , int mode,CursorFactory factory) 如果創(chuàng)建不成功則拋出FileNotFoundException異常 Java代碼 1。
SQLiteDatabase DataBase=this。openOrCreateDatabase ("DataBase。
db", 2。MODE_PRIVATE, 3。
new CursorFactory(){ 4。//創(chuàng)建新的數(shù)據(jù)庫,名稱Database,模式MODE_PRIVATE 5。
public Cursor newCursor(SQLiteDatabase db, 6。SQLiteCursorDriver masterQuery, 7。
String editTable, 8。SQLiteQuery query){ 9。
return null; 10。} 11。
}); 12。SQLiteDatabase DataBase=this。
openOrCreateDatabase ("DataBase。db", 13。
MODE_PRIVATE, 14。new CursorFactory(){ 15。
//創(chuàng)建新的數(shù)據(jù)庫,名稱Database,模式MODE_PRIVATE 16。public Cursor newCursor(SQLiteDatabase db, 17。
SQLiteCursorDriver masterQuery, 18。 String editTable, 19。
SQLiteQuery query){ 20。return null; 21。
} 22。}); 2:Android SQLite數(shù)據(jù)庫打開已經(jīng)存在的數(shù)據(jù)庫。
[1]SQLite,是一款輕型的數(shù)據(jù)庫,是遵守ACID的關(guān)系型數(shù)據(jù)庫管理系統(tǒng),它的設(shè)計目標(biāo)是嵌入式的,而且目前已經(jīng)在很多嵌入式產(chǎn)品中使用了它,它占用資源非常的低,在嵌入式設(shè)備中,可能只需要幾百K的內(nèi)存就夠了。
它能夠支持Windows/Linux/Unix等等主流的操作系統(tǒng),同時能夠跟很多程序語言相結(jié)合,比如 Tcl、C#、PHP、Java等,還有ODBC接口,同樣比起Mysql、PostgreSQL這兩款開源世界著名的數(shù)據(jù)庫管理系統(tǒng)來講,它的處理速度比他們都快。 SQLite第一個Alpha版本誕生于2000年5月。
至今已經(jīng)有13個年頭,SQLite也迎來了一個版本 SQLite 3已經(jīng)發(fā)布。 目錄 1簡介 2功能 3特性 4語言綁定 5類型 6客戶端管理 7使用技巧 8SQLite 常用函數(shù) 9版本發(fā)布 10注意事項 1簡介 編輯 SQLite是遵守ACID[2]的關(guān)系型數(shù)據(jù)庫管理系統(tǒng),它包含在一個相對小的C庫中。
它是D。RichardHipp建立的公有領(lǐng)域項目。
[3] 不像常見的客戶-服務(wù)器范例,SQLite引擎不是個程序與之通信的獨立進程,而是連接到程序中成為它的一個主要部分。所以主要的通信協(xié)議是在編程語言內(nèi)的直接API調(diào)用。
這在消耗總量、延遲時間和整體簡單性上有積極的作用。 整個數(shù)據(jù)庫(定義、表、索引和數(shù)據(jù)本身)都在宿主主機上存儲在一個單一的文件中。
它的簡單的設(shè)計是通過在開始一個事務(wù)的時候鎖定整個數(shù)據(jù)文件而完成的。[3] 2功能 編輯 SQLite雖然很小巧,但是支持的SQL語句不會遜色于其他開源數(shù)據(jù)庫,它支持的SQL包括: ATTACH DATABASE BEGIN TRANSACTION comment COMMIT TRANSACTION COPY CREATE INDEX CREATE TABLE CREATE TRIGGER CREATE VIEW DELETE DETACH DATABASE DROP INDEX DROP TABLE DROP TRIGGER DROP VIEW END TRANSACTION EXPLAIN expression INSERT ON CONFLICT clause PRAGMA REPLACE ROLLBACK TRANSACTION SELECT UPDATE 同時它還支持事務(wù)處理功能等等。
也有人說它象Microsoft的Access,有時候真的覺得有點象,但是事實上它們區(qū)別很大。比如SQLite 支持跨平臺,操作簡單,能夠使用很多語言直接創(chuàng)建數(shù)據(jù)庫,而不象Access一樣需要Office的支持。
如果你是個很小型的應(yīng)用,或者你想做嵌入式開發(fā),沒有合適的數(shù)據(jù)庫系統(tǒng),那么你可以考慮使用SQLite。 到2013年10月17日最新版本是 3。
8。1 。
它的官方網(wǎng)站是: 。cn,能在上面獲得源代碼和文檔。
同時因為數(shù)據(jù)庫結(jié)構(gòu)簡單,系統(tǒng)源代碼也不是很多,也適合想研究數(shù)據(jù)庫系統(tǒng)開發(fā)的專業(yè)人士 3特性 編輯 1。 ACID事務(wù) 2。
零配置 – 無需安裝和管理配置 3。儲存在單一磁盤文件中的一個完整的數(shù)據(jù)庫 4。
數(shù)據(jù)庫文件可以在不同字節(jié)順序的機器間自由的共享 5。支持?jǐn)?shù)據(jù)庫大小至2TB 6。
足夠小, 大致13萬行C代碼, 4。43M 7。
比一些流行的數(shù)據(jù)庫在大部分普通數(shù)據(jù)庫操作要快 8。 簡單, 輕松的API 9。
包含TCL綁定, 同時通過Wrapper支持其他語言的綁定 10。 良好注釋的源代碼, 并且有著90%以上的測試覆蓋率 11。
獨立: 沒有額外依賴 12。 源碼完全的開源, 你可以用于任何用途, 包括出售它 13。
支持多種開發(fā)語言,C, PHP, Perl, Java, C#,Python, Ruby 4語言綁定 編輯 可以從C/C++程序中使用這個庫,還可以獲得對Tcl和一些其他腳本語言的綁定。 在CPAN的DBD::SQLite上有一個Perl的DBI/DBD模塊,它不是到SQLite的接口,而是包括整個SQLite數(shù)據(jù)庫引擎在其中并不需要任何額外的軟件。
還有一個Python模塊叫做PySQLite。 PHP從PHP5。
0開始包含了SQLite,但是自5。 1版之后開始成為一個延伸函式庫。
SQLite能與PHP4一起工作但不包含在其中。 Rails2。
0。3將缺省的數(shù)據(jù)庫配置改為了SQLite 3。
[3] 5類型 編輯 SQLite的數(shù)據(jù)類型 首先你會接觸到一個讓你驚訝的名詞: Typelessness(無類型)。 對! SQLite是無類型的。
這意味著你可以保存任何類型的數(shù)據(jù)到你所想要保存的任何表的任何列中, 無論這列聲明的數(shù)據(jù)類型是什么(只有在一種情況下不是, 稍后解釋)。 對于SQLite來說對字段不指定類型是完全有效的。
如: Create Table ex1(a, b, c); 誠然SQLite允許忽略數(shù)據(jù)類型, 但是仍然建議在你的Create Table語句中指定數(shù)據(jù)類型。 因為數(shù)據(jù)類型對于你和其他的程序員交流, 或者你準(zhǔn)備換掉你的數(shù)據(jù)庫引擎時能起到一個提示或幫助的作用。
SQLite支持常見的數(shù)據(jù)類型, 如: CREATE TABLE ex2 a VARCHAR(10), b NVARCHAR(15), c TEXT, d INTEGER, e FLOAT, f BOOLEAN, g CLOB, h BLOB, i TIMESTAMP, j NUMERIC(10,5) k VARYING CHARACTER (24), l NATIONAL VARYING CHARACTER(16) 前面提到在某種情況下, SQLite的字段并不是無類型的。 即在字段類型為”Integer Primary Key”時。
6客戶端管理 編輯 SQLite亦可以作為桌面數(shù)據(jù)庫使用,以下為第三方SQLite的GUI軟件。例如, SQLiteMan,使用QT開發(fā)的一個SQLite客戶端,支持多語言、跨平臺。
SQLiteMan SQLite Manager, 以 火狐瀏覽器的擴展形式提供的SQLite客戶端。 SQLite Database Browser, a 。
Appropriate Uses For SQLite SQLite is different from most other SQL database engines in that its primary design goal is to be simple: Simple to administer Simple to operate Simple to embed in a larger program Simple to maintain and customize Many people like SQLite because it is small and fast。
But those qualities are just happy accidents。 Users also find that SQLite is very reliable。
Reliability is a consequence of simplicity。 With less complication, there is less to go wrong。
So, yes, SQLite is small, fast, and reliable, but first and foremost, SQLite strives to be simple。 Simplicity in a database engine can be either a strength or a weakness, depending on what you are trying to do。
In order to achieve simplicity, SQLite has had to sacrifice other characteristics that some people find useful, such as high concurrency, fine-grained access control, a rich set of built-in functions, stored procedures, esoteric SQL language features, XML and/or Java extensions, tera- or peta-byte scalability, and so forth。 If you need some of these features and do not mind the added complexity that they bring, then SQLite is probably not the database for you。
SQLite is not intended to be an enterprise database engine。 It is not designed to compete with Oracle or PostgreSQL。
The basic rule of thumb for when it is appropriate to use SQLite is this: Use SQLite in situations where simplicity of administration, implementation, and maintenance are more important than the countless complex features that enterprise database engines provide。 As it turns out, situations where simplicity is the better choice are more common than many people realize。
Another way to look at SQLite is this: SQLite is not designed to replace Oracle。 It is designed to replace fopen()。
Situations Where SQLite Works Well Application File Format SQLite has been used with great success as the on-disk file format for desktop applications such as financial analysis tools, CAD packages, record keeping programs, and so forth。 The traditional File/Open operation does an sqlite3_open() and executes a BEGIN TRANSACTION to get exclusive access to the content。
File/Save does a COMMIT followed by another BEGIN TRANSACTION。 The use of transactions guarantees that updates to the application file are atomic, durable, isolated, and consistent。
Temporary triggers can be added to the database to record all changes into a (temporary) undo/redo log table。 These changes can then be played back when the user presses the Undo and Redo buttons。
Using this technique, an unlimited depth undo/redo implementation can be written in surprisingly little code。 Embedded devices and applications Because an SQLite database requires little or no administration, SQLite is a good choice for devices or services that must work unattended and without human support。
SQLite is a good fit for use in cellphones, PDAs, set-top boxes, and/or appliances。 It also works well as an embedded database in downloadable consumer applications。
Websites SQLite usually will work great as the database engine for low to medium traffic websites (which is to say, 99。 9% of all websites)。
The amount of web traffic that SQLite can handle depends, of course, on how heavily the website uses its database。 Generally speaking, any site that gets fewer than 100K hits/day should work fine with SQLite。
The 100K hits/day figure is a conservative estimate, not a hard upper bound。 SQLite has been demonstrated to work with 10 times that amount of traffic。
Replacement for ad hoc disk files Many programs use fopen(), fread(), and fwrite() to create and manage files of data in home-grown formats。 SQLite works particularly well as a replacement for these ad hoc data files。
Internal or temporary databases For programs that have a lot of data that must be sifted and sorted in diverse ways, it is often easier and quicker to load the data into an in-memory SQLite database and use queries with joins and ORDER BY clauses to extract the data in the form and order needed rather than to try to code the same operations manually。 Using an SQL database internally in this way also gives the program greater flexibility since new columns and indices can be added without having to recode every query。
首先介紹我用Sqlite解決的實際問題是什么? 問題1:某個功能的數(shù)據(jù)需要連接一個遠(yuǎn)程數(shù)據(jù)庫查詢速度很慢,查一次數(shù)據(jù)不容易,希望能夠重復(fù)利用之前查過的數(shù)據(jù)集。
問題2:非常大的數(shù)據(jù)量比如幾千萬甚至幾億條數(shù)據(jù),一次性讀取到DataTable中,會內(nèi)存溢出的,所以在第一次分析時就是通過Reader的方式,分析完一條后并不在內(nèi)存中保存,但是緊接著用戶的第二次分析、第三次分析還是要用到的第一次分析的數(shù)據(jù),如果我們重新查詢一次遠(yuǎn)程服務(wù)器,效率可想而知啊。 結(jié)合上面的2個問題,為了解決效率問題和數(shù)據(jù)重復(fù)利用度,減少數(shù)據(jù)庫服務(wù)器的壓力,我才用Sqlite緩存數(shù)據(jù)(當(dāng)然這不是唯一也不是最好的解決方案) 。
優(yōu)化SQLiteHelper 陸兄的SQLiteHelper類我增加了幾個有用的方法: 第一個方法是GetSchema,得到某個表的表結(jié)構(gòu)。 ///
/// public DataTable GetSchema() { using (SQLiteConnection connection = new SQLiteConnection(connectionString)) { connection.Open(); DataTable data = connection.GetSchema("TABLES"); connection.Close(); //foreach (DataColumn column in data.Columns) //{ // Console.WriteLine(column.ColumnName); //} return data; } } 第二個方法是IsTableExist,判斷SQLite數(shù)據(jù)庫重某個表是否存在 。
///
/// 要創(chuàng)建的SQLite數(shù)據(jù)庫文件路徑 public bool IsTableExist(string tableName) { using (SQLiteConnection connection = new SQLiteConnection(connectionString)) { connection.Open(); using (SQLiteCommand command = new SQLiteCommand(connection)) { command.CommandText = "SELECT COUNT(*) FROM sqlite_master where type='table' and name='" + tableName + "'"; int iaaa = Convert.ToInt32(command.ExecuteScalar()); if (Convert.ToInt32(command.ExecuteScalar()) == 0) { return false; } else { return true; } } } } 第三個方法是Query,執(zhí)行查詢語句,返回DataSet ///
/// 查詢語句 /// DataSet public DataSet Query(string SQLString) { using (SQLiteConnection connection = new SQLiteConnection(connectionString)) { DataSet ds = new DataSet(); try { connection.Open(); SQLiteDataAdapter command = new SQLiteDataAdapter(SQLString, connection); command.Fill(ds, "ds"); } catch (System.Data.SQLite.SQLiteException ex) { throw new Exception(ex.Message); } return ds; } } 構(gòu)建緩存對象模型和緩存控制器 每一塊緩存對象,在數(shù)據(jù)庫中會產(chǎn)生一個表,而表名稱是有緩存控制器自動生成的,訪問緩存的工作全部交由緩存控制器完成,通過緩存項的ID和ModuleKey來訪問。 在Sqlite中還需要一個系統(tǒng)表來維護每個緩存項和實際緩存存儲表之間的對應(yīng)關(guān)系,我們稱之為配置表,它將在緩存控制器創(chuàng)建Sqlite緩存數(shù)據(jù)庫文件時創(chuàng)建。
配置表共有以下幾個字段,分別和緩存對象模型CdlCacheItem類映射: 列名稱 說明 Id 緩存的唯一數(shù)字編號 ModuleKey 緩存模塊名稱,一個模塊可以有多個緩存數(shù)據(jù),ID可以區(qū)分。實際應(yīng)用時,某個功能時會經(jīng)常緩存數(shù)據(jù)的,所以通過ModuleKey就可以得到這個功能所有的緩存列表,然后選定其中的部分緩存來進行使用。
Comments 緩存說明 TableName 緩存數(shù)據(jù)存儲的數(shù)據(jù)表名稱 AddDate 緩存時間戳 創(chuàng)建數(shù)據(jù)庫的方法如下: static void CreateDB() { //總共有ID、ModuleKey、Comments、AddDate這幾列 string sql = "CREATE TABLE SYSCDLTABLES(ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,MODULEKEY VARCHAR(200),COMMENTS VARCHAR(500),TABLENAME VARCHAR(100),ADDDATE DATETIME)"; SQLiteDBHelper.CreateDB(CACHEFILEPATH, sql); } 每個緩存項(緩存對象模型)定義如下,和配置表對應(yīng): ///
/// Tecky Lee /// 2011-1-11 15:11 public class CdlCacheItem { int m_id; public int Id { get { return m_id; } set { m_id = value; } } string m_moduleKey; public string ModuleKey { get { return m_moduleKey; } set { m_moduleKey = value; } } string m_comments; public string Comments { get { return m_comments; } set { m_comments = value; } } string m_tableName; public string TableName { get { return m_tableName; } set { m_tableName = value; } } DateTime m_timestamp; public DateTime Timestamp { get { return m_timestamp; } set { m_timestamp = value; } } } 下面是控制器的接口定義: public interface ICdlCacheController { void BeginLoadRow(); void EndLoadRow(); System.Collections。.。
內(nèi)存溢出導(dǎo)致程序崩潰,也分是java層崩了,還是mysql崩了。
如果是java層崩了,注意不要一次性加載太多的數(shù)據(jù)到內(nèi)存,并且不在使用的數(shù)據(jù)要徹底放棄引用關(guān)系。java雖然是自動回收,回收的原則就是一個對象不再被持有,即引用計數(shù)為零。
如果數(shù)據(jù)太大,可考慮臨時文件。如果是mysql崩了,首先增加配置緩存。
一般來說mysql是不容易崩的,特別是插入操作的時候。查詢的時候如果查詢結(jié)果記錄集特別大,會導(dǎo)致一個查詢需要使用很大的內(nèi)存空間,這種是有問題的。
而插入操作都是一條一條的執(zhí)行,不會導(dǎo)致大內(nèi)存的使用。如果僅僅是數(shù)據(jù)移植,也盡量不要用ORM框架,比如hibernate,mybatis這些東西,因為他們都有自己的緩存,直接使用JDBC比較好。
聲明:本網(wǎng)站尊重并保護知識產(chǎn)權(quán),根據(jù)《信息網(wǎng)絡(luò)傳播權(quán)保護條例》,如果我們轉(zhuǎn)載的作品侵犯了您的權(quán)利,請在一個月內(nèi)通知我們,我們會及時刪除。
蜀ICP備2020033479號-4 Copyright ? 2016 學(xué)習(xí)鳥. 頁面生成時間:2.789秒