摘要
SQLite是开放码源的嵌入式关系数据库,它采用的是B树存储结构。针对B树处理庞大数据时效率低的问题,提出了一种用红黑树代替B树的数据库索引机制的优化方案。总结了红黑树处理数据时的优点,构建了基于红黑树的SQLite数据库模型。通过大量实验比较了红黑树和B树的性能,结果表明,红黑树插入和删除的操作效率远远高于B树,可以实现对SQLite索引的优化。
SQLite is an open source,embedded database,It uses B-tree storage structure. In order to solve the problem of B-tree inefficient processing large data, a scheme of the B-tree substituted by Red-Black tree is presented. This paper summarizes the advantage of Red-Black tree and builds a model of SQLite database based on Red-Black tree. According to the experiment,we know that insert and delete operations of Red-black tree is for more efficient than B-tree and to achieve optimal SQLite.
出处
《电脑开发与应用》
2012年第2期15-17,共3页
Computer Development & Applications