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

›› 1985, Vol. 11 ›› Issue (06): 36-.

• 论文 • 上一篇    下一篇

主副结构顺序文件

楼荣生   

  1. 复旦大学
  • 发布日期:1985-12-25

THE MASTER-SLAVE STRUCTURE OF SEQUENTIAL FILES

Lou Rongsheng   

  • Published:1985-12-25

摘要: 顺序文件虽然可在O(ln n)时间内完成检索,但维护效率恰是O(n),这里n是文件中的记录数。 本文分析了一种称为主副文件的结构方法代价甚低,但可同时改进顺序文件的检索和维护效率,在某种特殊情况下,主副结构甚致可优于B-树和散列。 文中也给出了一个合并主副两个文件成为一个文件的算法。

Abstract: If we arrange n records according to one or more attributes' values, the record will be found which matches the given values of these attributes by O(ln n) time. This is well-known as the sequential file Unfortunately, the sequential file has a poor ef-ficiency of maintenance. It will cost us O(n) time to insert or delete a record. We have analyzed a two-file structure of sequential file in this paper. It has been proved that this structure costs very little and can improve the efficiency of both finding and maintenance of the sequential file. In some special cases, the two-file structure is even priorer to the B-free and the hashing file, which are the most popular files in the data management systems. An algorithem of combining the two files into one has also been given.