基于Android的SQLite數(shù)據(jù)庫(kù)診斷工具的設(shè)計(jì)和實(shí)現(xiàn)
發(fā)布時(shí)間:2018-02-08 20:13
本文關(guān)鍵詞: SQLite數(shù)據(jù)庫(kù) SQL語(yǔ)句 診斷工具 Android系統(tǒng) 出處:《北京交通大學(xué)》2017年碩士論文 論文類型:學(xué)位論文
【摘要】:SQLite數(shù)據(jù)庫(kù)是一個(gè)獨(dú)立的、具有高可靠性的嵌入式數(shù)據(jù)庫(kù),是移動(dòng)設(shè)備上使用非常廣泛的數(shù)據(jù)庫(kù)引擎。在手機(jī)終端設(shè)備中,用戶與應(yīng)用軟件的交互本質(zhì)是與數(shù)據(jù)庫(kù)的交互,而數(shù)據(jù)庫(kù)與應(yīng)用軟件的交互越密切,數(shù)據(jù)庫(kù)相關(guān)的性能問(wèn)題就會(huì)越顯著。在手機(jī)終端產(chǎn)品中,許多應(yīng)用都會(huì)訪問(wèn)數(shù)據(jù)庫(kù),包括內(nèi)置應(yīng)用(比如聯(lián)系人、短信、圖庫(kù))和第三方應(yīng)用(比如微信、QQ、微博等),SQL語(yǔ)句的質(zhì)量對(duì)應(yīng)用軟件的數(shù)據(jù)訪問(wèn)效率有較大影響。有些應(yīng)用其內(nèi)部數(shù)據(jù)庫(kù)很小且查詢簡(jiǎn)單,該情況下SQL語(yǔ)句的質(zhì)量對(duì)查詢性能影響不大;但也存在許多應(yīng)用數(shù)據(jù)庫(kù)比較大,存在復(fù)雜查詢,該情況下質(zhì)量好的SQL語(yǔ)句相對(duì)于質(zhì)量差的SQL語(yǔ)句在性能上就會(huì)有較大的差別。該差別主要體現(xiàn)在系統(tǒng)的資源消耗情況和系統(tǒng)的響應(yīng)時(shí)間上。這就要求應(yīng)用開發(fā)者在提供SQL語(yǔ)句時(shí)要考慮到語(yǔ)句執(zhí)行效率問(wèn)題,盡可能從SQL語(yǔ)句的寫法上優(yōu)化,使執(zhí)行效率最高。然而現(xiàn)在的Android手機(jī)應(yīng)用中都存在著或多或少的低效SQL語(yǔ)句,公司亟需一套SQLite數(shù)據(jù)庫(kù)的SQL語(yǔ)句診斷工具來(lái)協(xié)助開發(fā)和測(cè)試人員定位低效的SQL語(yǔ)句。本課題正是從該角度出發(fā),分析SQLite數(shù)據(jù)庫(kù)在Android系統(tǒng)中的執(zhí)行原理和過(guò)程,結(jié)合Android系統(tǒng)的運(yùn)行機(jī)制,對(duì)SQLite數(shù)據(jù)庫(kù)診斷工具進(jìn)行設(shè)計(jì)和開發(fā)。作者在軟件開發(fā)過(guò)程中的主要工作包括:調(diào)研分析SQLite數(shù)據(jù)庫(kù)中SQL語(yǔ)句的優(yōu)化問(wèn)題的研究背景以及該問(wèn)題的國(guó)內(nèi)外研究現(xiàn)狀;調(diào)研分析SQLite數(shù)據(jù)庫(kù)中SQL語(yǔ)句的執(zhí)行原理,理解SQLite的SQL語(yǔ)句執(zhí)行過(guò)程;調(diào)研分析Android系統(tǒng)中的Framework層的運(yùn)行機(jī)制;著手Android系統(tǒng)中控制臺(tái)的開發(fā),控制臺(tái)是用戶與系統(tǒng)進(jìn)行交互的媒介,統(tǒng)一管理用戶的輸入輸出流,作為入口可以對(duì)用戶行為進(jìn)行規(guī)范;著手Android系統(tǒng)中內(nèi)容共享者組件ContentProvider的開發(fā),ContetProvider是不同應(yīng)用程序之間進(jìn)行數(shù)據(jù)交互的標(biāo)準(zhǔn),控制臺(tái)通過(guò)ContentProvider與系統(tǒng)中應(yīng)用數(shù)據(jù)進(jìn)行交互;對(duì)開發(fā)后的工具進(jìn)行實(shí)例驗(yàn)證,證明SQLite數(shù)據(jù)庫(kù)診斷工具的有效性和可行性。本課題針對(duì)SQLite數(shù)據(jù)庫(kù)使用過(guò)程中可能存在的SQL使用問(wèn)題提出并開發(fā)了一套SQL語(yǔ)句的診斷工具,該工具能夠獲取應(yīng)用中的劣質(zhì)SQL語(yǔ)句。該SQLite數(shù)據(jù)庫(kù)診斷工具已經(jīng)取得了一定的進(jìn)展,并合入公司的自動(dòng)化檢測(cè)工具中,能夠在開發(fā)和測(cè)試人員進(jìn)行SQL語(yǔ)句優(yōu)化時(shí)提供一定的幫助。
[Abstract]:SQLite database is an independent, highly reliable embedded database, which is a widely used database engine on mobile devices. In mobile terminal devices, the interaction between users and application software is essentially interaction with database. The closer the interaction between the database and the application, the more significant the performance problems associated with the database. In mobile terminal products, many applications access the database, including built-in applications (such as contacts, SMS, etc.). The quality of SQL statements, such as WeChat QQQ, Weibo and so on, has a great impact on the data access efficiency of the application software. Some applications have small internal databases and simple queries. In this case, the quality of SQL statements has little effect on query performance, but there are many large application databases and complex queries. In this case, there is a great difference in performance between SQL statements with good quality and SQL statements with poor quality. The difference is mainly reflected in the resource consumption of the system and the response time of the system. This requires the application developer. When providing SQL statements, consider the efficiency of statement execution, Optimize the writing of SQL sentences as much as possible, so that the execution efficiency is the highest. However, there are more or less inefficient SQL statements in current Android mobile applications. The company urgently needs a set of SQL statement diagnosis tools of SQLite database to help develop and test people to locate inefficient SQL statements. From this point of view, this paper analyzes the execution principle and process of SQLite database in Android system. Combined with the running mechanism of Android system, The main work of the author in the process of software development includes: investigating and analyzing the research background of SQL sentence optimization in SQLite database and the domestic and foreign research status of this problem; Investigate and analyze the execution principle of SQL statement in SQLite database, understand the SQL statement execution process of SQLite; investigate and analyze the running mechanism of Framework layer in Android system; start the development of console in Android system, the console is the medium for the user to interact with the system. The user's input and output streams are managed uniformly, which can be used as an entry point to standardize the user's behavior, and the ContetProvider is the standard for data exchange between different applications, starting with the development of ContentProvider, the content sharing component in the Android system. The console interacts with the application data in the system through ContentProvider. To prove the validity and feasibility of SQLite database diagnostic tools, this paper proposes and develops a set of SQL diagnostic tools for the possible problems of SQL usage in the process of using SQLite database. The tool can obtain poor quality SQL statements in application. The SQLite database diagnostic tool has made some progress and has been integrated into the automated testing tools of the company. Be able to help developers and testers optimize SQL statements.
【學(xué)位授予單位】:北京交通大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2017
【分類號(hào)】:TP311.13;TP316
【參考文獻(xiàn)】
相關(guān)期刊論文 前10條
1 何丹丹;;基于黑盒測(cè)試的嵌入式系統(tǒng)平臺(tái)設(shè)計(jì)與實(shí)現(xiàn)[J];現(xiàn)代電子技術(shù);2016年21期
2 崔娜;;面向數(shù)據(jù)庫(kù)性能的SQL語(yǔ)句解析與翻譯[J];現(xiàn)代電子技術(shù);2016年11期
3 范琛琛;施勇;薛質(zhì);;基于ADB調(diào)試的Andrio系統(tǒng)植入研究[J];信息安全與通信保密;2015年11期
4 王壘;;嵌入式數(shù)據(jù)庫(kù)關(guān)鍵技術(shù)的研究與實(shí)現(xiàn)[J];數(shù)字技術(shù)與應(yīng)用;2015年02期
5 黃玉坤;陳榕;裴喜龍;曹t,
本文編號(hào):1496172
本文鏈接:http://www.sikaile.net/kejilunwen/ruanjiangongchenglunwen/1496172.html
最近更新
教材專著