作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2010, Vol. 36 ›› Issue (15): 94-96. doi: 10.3969/j.issn.1000-3428.2010.15.033

• 软件技术与数据库 • 上一篇    下一篇

一种降低SQLite擦写Flash频率的方法

刘婷婷1,黄林春2   

  1. (1. 西安电子科技大学计算机学院,西安 710071;2. 陕西省信访局,西安 710071)
  • 出版日期:2010-08-05 发布日期:2010-08-25
  • 作者简介:刘婷婷(1985-),女,硕士,主研方向:嵌入式数据库;黄林春,工程师

Method for Reducing Frequency of Writing Flash in SQLite

LIU Ting-ting1, HUANG Lin-chun2   

  1. (1. School of Computer, Xidian University, Xi’an 710071; 2. Bureau for Letters and Calls of Shanxi Province, Xi’an 710071)
  • Online:2010-08-05 Published:2010-08-25

摘要: SQLite的事务处理机制在写操作密集的应用中会引起频繁擦写Flash,导致Flash过早失效。针对上述问题,通过分析SQLite的事务处理流程及自动提交模式,采用延时提交的方法降低Flash的擦写频率,并将数据分为关键或不可重现数据以及可重现数据,分别进行处理,以保证数据的安全性。

关键词: 事务处理, 动提交, 提交, 据分级

Abstract: In some applications with intensive writing, Flash becomes invalid earlier than expected if SQLite writes database file too frequently. In order to solve the problem, by analyzing the transaction processing procedure and auto-commit mode of SQLite, this paper uses the method of delay commit to reduce the frequency of erasing and writing Flash. It divides data into the key or un-reproducible data and reproducible data, and treats them with appropriate methods, which ensures the security of data.

Key words: transaction processing, auto-commit, lay commit, ata classification

中图分类号: