Embedded databases are mostly used in embedded systems whose storage capacities are limit, such as palmtop computers, PDA and mobile telephones. Due to the limit of storage capacity, how to make full use of storage and improve storage utilization of embedded database is a major concern of many researchers. At present, mostly embedded databases provide B~+-trees. Because B~+-trees consist of an independent index and a sequence set, it is possible to process operations on the records of B~+-trees randomly and sequentially in a very time saving matter. But B~+-trees has great shortcoming of low storage utilization. This shortcoming has badly impact especially on embedded database systems. The statistic shows that B~+-trees method guarantees only about 50% storage utilization, that is, at any given time, the B~+-trees method has wasted about half storage.The paper discusses the design and implementation of an improved B~+-trees method based on embedded database system, which guarantees high storage utilization. The paper is organized as follow: Firstly, it analyses the main ideas of B~+-trees and presents an improved B~+-trees access method. Secondly, the improved B~+-tress is applied to an embedded database system—Berkeley DB, and the software system which provides base function of a database system is completed by using these API interface of improved Berkeley DB. Thirdly, through debugging and reducing the system time after time, the embedded Linux application system is implemented on the ES860 hardware platform designed by local lab. Finally, the last part gives the comparison results of the improved B~+-trees algorithm to the conventional B~+-trees algorithm through running test suite in Berkeley DB and the experimental results show that the improved B~+-trees algorithm can attain higher storage utilization at the expense of more execution time than the conventional B~+-trees algorithm, and N is more larger, the effect is more distinct. |