JPH0449132B2 - - Google Patents

Info

Publication number
JPH0449132B2
JPH0449132B2 JP60000843A JP84385A JPH0449132B2 JP H0449132 B2 JPH0449132 B2 JP H0449132B2 JP 60000843 A JP60000843 A JP 60000843A JP 84385 A JP84385 A JP 84385A JP H0449132 B2 JPH0449132 B2 JP H0449132B2
Authority
JP
Japan
Prior art keywords
record
records
storage area
key
registered
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP60000843A
Other languages
Japanese (ja)
Other versions
JPS61160133A (en
Inventor
Takashi Oowaki
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP60000843A priority Critical patent/JPS61160133A/en
Publication of JPS61160133A publication Critical patent/JPS61160133A/en
Publication of JPH0449132B2 publication Critical patent/JPH0449132B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、電子計算機による情報処理におけ
る、データの保存、検索、更新・削除のための方
法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a method for storing, retrieving, updating and deleting data in information processing by a computer.

〔発明の背景〕[Background of the invention]

電子計算機による情報処理においては記録(=
レコード:関連する情報(データ)の集まり)を
主記憶装置または補助記憶装置上に実現されるフ
アイルに保存し、必要に応じフアイル内のレコー
ドを検索、更新したり、フアイルへ新たにレコー
ドを登録したり、また、フアイルからレコードを
削除したり、といつたことが一般に行われる。こ
の時のレコードの登録・検索・削除のしかたに
は、レコードが個有に持つている索引情報(キー
情報)の値によつてレコードを検索、登録、削
除、更新を行つたり、索引情報(キー情報)の値
の大きさの順にレコードを読み出したり、ある指
定された索引情報(キー情報)の値を持つ全ての
レコードを走査したり、といつたフアイル・アク
セスの形態があり、計算機システムには、これら
多様なデータ・アクセスの形態を高速に且つ効率
良く実現することが要求されている。
In information processing by electronic computers, records (=
Record: A collection of related information (data)) is saved in a file realized on the main memory or auxiliary storage, and records in the file can be searched and updated as necessary, and new records can be registered in the file. Common actions include editing records and deleting records from files. The methods of registering, searching, and deleting records at this time include searching, registering, deleting, and updating records based on the value of index information (key information) unique to the record; There are forms of file access such as reading records in the order of their value (key information), or scanning all records that have a specified value of index information (key information). Systems are required to realize these various forms of data access quickly and efficiently.

索引データ(キー)を持つレコードに対する、
フアイルへの格納構造及びアクセスの方法につい
ての従来技術として、以下のような方法およびフ
アイル構成法がある。
For records with index data (key),
Conventional techniques regarding file storage structures and access methods include the following methods and file configuration methods.

(1) 線形検索法 フアイルへのレコード登録は、フアイル内の
任意の位置に追加し、レコード検索はフアイル
内の全てのレコードについてキーの一致するレ
コードが見つかるまで順番に照合をくり返して
いくという方法である。
(1) Linear search method To register a record to a file, add it to any position in the file, and to search for a record, repeat matching in order for all records in the file until a record with a matching key is found. It is.

(2) 2分検索法 フアイル内にレコードをそのキーの値の順番
になるように並べておき検索範囲を2分しなが
ら、その対象を絞り込んでいきキーの一致する
レコードを検索する。また、レコードの追加・
削除時には追加又は削除すべきレコードのキー
の値によつて、それ以降の全てのレコードの詰
め換えを行う方法である。
(2) Binary search method Records are arranged in the file in the order of their key values, and the search range is divided into two, narrowing down the target and searching for records with matching keys. You can also add records and
At the time of deletion, all subsequent records are refilled according to the key value of the record to be added or deleted.

(3) ハツシユ法 ハツシユ法とは、あるレコードのキーが与え
られた時に、キーに依存して生成される(ハツ
シユ関数による)アドレスによつて探索場所を
決定し、指定されたキーを含むレコードを探索
する手法である。これの基本的な考え方は、キ
ーからアドレスへの変換を行うハツシユ関数を
適当に選択することにより、レコードをフアイ
ル記憶領域内になるべく衝突のないように分散
して格納し、探索時に少ない記憶参照回数で、
目的とするレコードを探索しようとするもので
ある。
(3) Hashing method The Hashing method is when the key of a certain record is given, the search location is determined by the address generated depending on the key (by the hashing function), and records containing the specified key are searched. This is a method to explore. The basic idea is to store records in a distributed manner within the file storage area with as few collisions as possible by appropriately selecting a hashing function that converts keys into addresses, and to reduce memory references during searches. In number of times,
It attempts to search for the desired record.

(4) 木構造による探索法 この方法は、(n−1)個のキーとn個の下
位の節へのポインターとから成る節により、木
構造を構成し、この木の根にある節から枝の方
向へ節を辿つていくことにより、指定されたキ
ーを持つレコードを探索しようとするものであ
る。nが2の場合には、2分探索木となり、ま
た、これを応用して追加・削除時の木構造の再
構成時に木のバランス化を図つたものにB木探
索法がある。
(4) Search method using tree structure This method constructs a tree structure with nodes consisting of (n-1) keys and n pointers to lower nodes, and searches the branches from the root node of this tree. It attempts to search for a record with a specified key by following the nodes in this direction. When n is 2, it becomes a binary search tree, and the B-tree search method is an application of this to balance the tree when reconfiguring the tree structure when adding or deleting.

ここに挙げた従来技術の他に、これらの変形の
方法が種々あり、これらは、情報処理学会発行
「情報処理」VOL.24No.4(1983.4)p.391〜p.400
や、Knuth.D.E著「The Art of Computer
Programming VOl.3(Sorting and Searching)」
(Addison−Wesley、1973)等に詳しく記載され
ている。
In addition to the conventional techniques listed here, there are various methods for modifying these, and these are described in "Information Processing" published by the Information Processing Society of Japan, Vol. 24 No. 4 (April 1983), p. 391 - p. 400.
``The Art of Computer'' by Knuth.DE
Programming VOl.3 (Sorting and Searching)”
(Addison-Wesley, 1973) and others.

以上に述べた従来の方法においては、しかしな
がら、次のような問題点があつた。
However, the conventional method described above has the following problems.

() 方法(1)及び(3)では、レコードをキーの値の
順に読み出そうとした場合、フアイル内の全レ
コードをソーテイングする必要があり、読み出
しに著しく処理時間がかかる。
() In methods (1) and (3), when trying to read records in the order of key values, it is necessary to sort all the records in the file, and reading takes a significant amount of processing time.

() 方法(2)では、追加、削除の度に、平均し
て、フアイル内総レコードのうちの約半分のレ
コードの詰め換えが発生し、詰め換えのオーバ
ーヘツドのために、計算機処理性能の低下を招
く結果となる。
() With method (2), on average, approximately half of the total records in the file are refilled each time a file is added or deleted, and the overhead of refilling reduces computer processing performance. This results in a decrease in

() 方法(4)においては、木構造における各節を
ポインターにより結合して構成しているため、
このポインターの部分が破壊される、または、
故障した場合、その影響を局所化できず、フア
イル全体のダウンとなつてしまうという危険性
がある。また、ポインターで複雑に構成されて
いるため故障の可能性が高いという欠点があ
る。
() In method (4), each node in the tree structure is connected by a pointer, so
part of this pointer is destroyed, or
In the event of a failure, there is a risk that the effect cannot be localized and the entire file will go down. Furthermore, since it is complicatedly configured with pointers, there is a high possibility of failure.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、索引(キー)を持つデータに
対する高速かつ効率の良いフアイル入出力方法を
提供することにある。
An object of the present invention is to provide a fast and efficient file input/output method for data having an index (key).

〔発明の概要〕[Summary of the invention]

本発明は記憶装置へのデータの入力を管理する
方法であつて、連続記憶領域にデータを記録登録
する記憶単位領域を複数有するとき、それぞれの
単位領域について記録が登録されているか否かを
識別管理してデータの順序付けキー情報の順序を
保持し、かつ記憶領域上に空実状態が平均的に散
在するように入力記憶せしめることに特徴があ
る。
The present invention is a method for managing input of data to a storage device, and the present invention is a method for managing data input to a storage device, which identifies whether or not records are registered for each unit area when a continuous storage area has a plurality of storage unit areas for recording and registering data. It is characterized in that it manages and maintains the order of data ordering key information, and inputs and stores data so that empty states are evenly scattered on the storage area.

平均的散在の具体的手法にはレコードの追加は
空き状態範囲の中央に順次入力する方法、あるい
は該空き範囲両端のキー情報値と追加される入力
データのキー情報の値の大きさの比率による方法
などが考えられる。
Specific methods for average scattering include adding records sequentially to the center of the free range, or by using the ratio of the key information values at both ends of the free range to the key information values of the input data to be added. There are many possible methods.

〔発明の実施例〕[Embodiments of the invention]

本発明は、前記した問題点を解決し、索引(キ
ー)順でのデータの読み出し、及び、データの検
索、登録、削除、更新を高速に行い、且つ、局所
的な記憶領域の破壊や故障によりフアイル全体の
故障を招かないようなフアイル構成法を実現す
る、索引付きデータの管理方法及び入出力装置で
ある。はじめにその基本的な考え方及び構成方法
を第2図、第3図により説明する。
The present invention solves the above-mentioned problems, reads data in index (key) order, searches, registers, deletes, and updates data at high speed, and prevents local storage area destruction and failure. This invention provides an indexed data management method and input/output device that realizes a file configuration method that does not cause failure of the entire file. First, the basic concept and configuration method will be explained with reference to FIGS. 2 and 3.

第2図は、本発明における基本的なデータの構
成方法の考え方を示す図である。1はレコードを
格納するレコード格納メモリ(記憶領域)であ
り、1〜Nの各記憶単位に対してレコード(記
録)を1ケずつ保持できる。記憶単位のうち、斜
線の施してある部分は、レコードが登録されてい
ない(空の)記憶単位であり、各記憶単位毎に、
2で示すレコード空、実管理ビツトマツプ・メモ
リなどにより、その空/実が管理される記憶単位
の中にある数字は、そこに格納されているレコー
ドのキー情報の値を示すものであり、連続する記
憶領域上に、レコードがそのキー情報の値の順番
に、均一的に散在して配置されるように構成す
る。つまり、本発明におけるデータ構成法の特徴
は、 (1) レコードを格納する記憶領域上に、レコード
がなるべく均一的な密度で、まばらに散らばる
ようにする (2) レコードを格納する記憶領域上に、レコード
のキーの値の順番にレコードが並ぶようにする
という2つの条件を満たすようにすることであ
り、これを実現するためのレコードの追加登録
は以下に示すような方法により行う。
FIG. 2 is a diagram illustrating the concept of the basic data configuration method in the present invention. 1 is a record storage memory (storage area) for storing records, and can hold one record for each storage unit from 1 to N. Among the storage units, the shaded areas are storage units in which no records are registered (empty), and for each storage unit,
The numbers in the storage unit whose empty/real status is managed by record empty/actual management bitmap memory, etc., shown in 2, indicate the value of the key information of the record stored there, and are continuous. The records are arranged so that they are uniformly scattered on the storage area in the order of the values of their key information. In other words, the characteristics of the data configuration method in the present invention are: (1) records are scattered sparsely on the storage area where records are stored, with as uniform a density as possible; (2) records are distributed sparsely on the storage area where records are stored. , and the records are arranged in the order of the record key values.Additional registration of records to achieve this is performed by the method shown below.

(レコード登録の方法) (1) 登録すべき新たなレコードのキーの値から、
記憶領域上にレコードがキーの値の順番に並ぶ
ような空きの記憶領域を求める。このための方
法としては、2分検索法(バイナリ・サーチ
法)と同様の方法が可能であり、探索する記憶
領域の範囲をせばめていくことにより新たなレ
コードを登録可能な空きの記憶領域を範囲及
び、その直前・直後にあるレコードのキーの値
を効率良く求めることが出来る。
(Record registration method) (1) From the key value of the new record to be registered,
Find an empty storage area where records are arranged in the order of key values. A method similar to the binary search method can be used for this purpose, and by narrowing down the range of storage areas to be searched, free storage areas in which new records can be registered can be found. It is possible to efficiently obtain the range and the key values of the records immediately before and after it.

(2) (1)で求めた空きの記憶領域の中から、新たな
レコードを登録すべき記憶単位を決定する。記
憶単位を決定するための判定基準として、記憶
領域上のレコードの登録状況(空、実状態)が
出来るだけ片寄らず、平均的に分散してまばら
な状態となるようにする。このための1つの方
法として、空きの記憶領域の両端にあるレコー
ドのキーの値と、新たに追加するレコードのキ
ーの値とを評価し、空きの記憶領域の範囲が追
加するレコードにより、適当な割合に分割され
る。この方法は、なるべく今後追加されるであ
ろうキーの値の割合いが、分割された空き領域
の配分に近くなるようにすることであり、これ
により次に述べる、「レコードの移動」の量を
少なくする。
(2) Determine the storage unit in which the new record should be registered from among the free storage areas found in (1). As a criterion for determining the storage unit, the registration status (empty, actual status) of records in the storage area is made to be as uniform as possible and evenly distributed and sparse. One method for this is to evaluate the key values of the records at both ends of the free storage area and the key values of the newly added record, and then adjust the range of the free storage area depending on the record to be added. divided into proportions. This method is to ensure that the proportion of key values that will be added in the future is as close as possible to the distribution of the divided free space, which will result in the amount of "record movement" described next. Reduce.

(3) (1)において、登録すべき記憶領域の範囲に空
きがない場合は、別の空き領域へ既に登録され
ているレコードをキーの値の順序は変えずに、
順番に移動させることにより、新たなレコード
を登録すべき空きの記憶領域を作り、しかる
後、(1)、(2)の方法に従つてレコードを追加す
る。この時、レコードを移動させるに当つて
は、移動するレコードの個数が出来るだけ少な
くなるように、また、レコードの登録状況(記
憶領域の空実状態)がなるべく、平均的に分散
且つまばらな状態となるように、移動すべきレ
コード群と移動位置を決定する。
(3) In (1), if there is no free space in the storage area to be registered, the records that have already been registered in another free area are stored without changing the order of the key values.
By moving the records in order, a free storage area is created in which to register a new record, and then records are added according to methods (1) and (2). At this time, when moving records, try to keep the number of records to be moved as small as possible, and keep the record registration status (storage area empty/real status) as evenly distributed and sparse as possible. Determine the record group to be moved and the moving position so that

このレコード登録の方法の手順を第2図に示
す。第3図において、Bの部分は、ある限られ
た、新しいレコードを追加すべき記憶領域の範囲
内でのレコード登録空実状態の均一化のための処
理であり、Aの部分が、フアイル全体に及ぶ記憶
領域空実状態均一化のための処理である。
The steps of this record registration method are shown in FIG. In Figure 3, part B is a process for equalizing the record registration status within a limited range of storage area to which new records are to be added, and part A is a process for equalizing the record registration status within a certain limited range of storage area where new records are to be added. This is a process to equalize the empty and real states of storage areas.

以上述べた、本発明の方法では、 (a) ある特定のキーを持つレコードの検索は、2
分検索法と同様の検索方法により行える、 (b) レコードの削除は、(a)によりレコードを検索
し、該レコードの登録されている記憶単位を空
き状態にするだけでよい、 (c) レコードの追加は、空き記憶領域へデータを
登録し、該記憶単位を実の状態とするのみ、ま
たは、レコードの移動を必要とする場合でも、
フアイルへのレコードの登録比率(ロート比率
=(登録レコード数÷フアイル内記憶単位数))
を低く抑えることによつて、平均して数レコー
ドの移動のみで可能となる、 (d) レコードをキーの値の順番に取り出すために
は、フアイルの記憶領域を物理的に順に読み出
すだけでよい、 といつた特徴がある。
In the method of the present invention described above, (a) retrieval of a record with a certain key is performed by two steps.
(b) To delete a record, simply search for the record using (a) and empty the storage unit in which the record is registered. (c) Records can be deleted using the same search method as the minute search method. The addition of the data can be done only by registering data in the free storage area and making the storage unit into a real state, or even if it is necessary to move the record.
Ratio of records registered in the file (rot ratio = (number of registered records ÷ number of storage units in the file))
(d) To retrieve records in order of key value, it is only necessary to physically read the file storage area in order. It has the following characteristics.

次に本発明の特徴を従来技術との対比で述べ
る。
Next, the features of the present invention will be described in comparison with the prior art.

まず、実現手段レベルでの最も近い従来技術と
の対比として、ハツシユ法との相違点を述べる。
First, we will discuss the differences with the hash method as a comparison with the closest prior art at the implementation level.

<ハツシユ法との相違点> ハツシユ法はフアイルに登録されるレコードの
キーの値を特定の関数によりフアイル領域上のア
ドレスにマツピングして、レコードを登録・参照
するものであり、その要点は、同一アドレスに対
して複数レコードが対応(衝突)しないようにマ
ツピングを出来るだけ、フアイル領域上に平均的
に且つ一様に分散させるようにすることにある。
つまり、ハツシユ法では、ある時点においてフア
イルに登録されるキーの集合に対して、その値を
フアイル内アドレスの変換した結果が、フアイル
内アドレスの領域に対して一様になるようにす
る。このために、キーからアドレスへの変換の関
数としてランダマイズ関数が用いられる。
<Differences from the Hashing method> The Hashing method maps the key value of a record registered in a file to an address on the file area using a specific function to register and refer to the record.The main points are as follows. The purpose is to distribute the mapping as evenly and uniformly over the file area as possible so that multiple records do not correspond to the same address (collision).
That is, in the hashing method, for a set of keys registered in a file at a certain point in time, the result of converting the value into an address within the file is made uniform for the area of addresses within the file. For this purpose, a randomization function is used as a key-to-address conversion function.

一方、本発明では、フアイル内に登録すべきレ
コードを、そのキーの値の順番にフアイル内記憶
領域に出来るだけ空実状態が均一にまばらに並ぶ
ようにする。つまり、レコードの登録時において
レコードを追加すべき記憶単位のアドレスは、キ
ーの値の順序関係に従つて決定され、レコードを
追加すべき空き領域がない場合に、フアイル内の
レコードを順次移動させて再構成させるようにす
ることにより、結果的に、均一にまばらに並ぶよ
うにするものである。
On the other hand, in the present invention, the records to be registered in a file are arranged in the storage area of the file in the order of their key values so that the empty and real states are evenly and sparsely arranged as much as possible. In other words, when registering a record, the address of the storage unit to which the record should be added is determined according to the order of the key values, and if there is no free space to add the record, the records in the file are moved sequentially. By rearranging them, they are arranged uniformly and sparsely.

よつて、ハツシユ法と本発明の方法との、原理
上の基本的な相違は、ハツシユ法が、フアイル上
へのレコードの一様な分散を、レコードのキー値
に依存するランダマイズ関数により、静的に実現
しようとしているのに対し、本発明の方法では、
レコードの追加・削除を行つていく過程で、レコ
ードの分散の仕方がまばらになるように徐々にレ
コードを移動させていくことにより、動的にこれ
を実現しようとしている点にある。
Therefore, the fundamental difference in principle between the hashing method and the method of the present invention is that the hashing method distributes records uniformly over a file statically by using a randomization function that depends on the key values of the records. However, in the method of the present invention,
In the process of adding and deleting records, this is achieved dynamically by gradually moving records so that the records are sparsely distributed.

次に、実現機能レベルでの最も近い従来技術と
の対比として、B−tree(又はB- +tree)法との相
違点を述べる。
Next, the differences with the B-tree (or B - + tree) method will be described as a comparison with the closest conventional technology at the level of realized functions.

<B-tree法との相違点> B-tree法又はその変形であるB+ -tree法は、既
に述べた様に、木構造を利用した探索法の応用で
あり、レコードの追加・削除の度に、木構造を再
構成し、木構造の各節の間をポインターで結合・
つなぎ替えを行い、ポインターをたどつていくこ
とにより、レコードをキーの値の順番に読み出せ
るようにしたものである。B-tree系の方法と本
発明の方法との差は、B-tree法が、レコード間
の順序をポインターで管理するのに対し、本発明
の方法では、キーの値の順に物理的にレコードを
並べるため、ポインターを持つ必要がないことで
ある。このことにより、本発明では、ポインター
異常によるフアイル構造破壊の発生可能性が極め
て低い。また、B-tree法では、キー順のレコー
ドをポインターで結合しており、必ずしも各レコ
ードはキーの値の順に物理的に並んでいる訳では
ないので、キー順にレコードを読み出した場合、
フアイルが磁気デイスクなどの場合には、デイス
ク上ランダムなアクセスが発生しアクセス時間が
多くかかるのに対し、本発明では、デイスク上を
シーケンシヤルに読み取れば済むため、キー順で
のレコード・アクセスは極めて効率が良いという
差がある。
<Differences from the B - tree method> As already mentioned, the B - tree method or its variant, the B + -tree method, is an application of a search method that uses a tree structure. At the same time, the tree structure is reconfigured, and each node of the tree structure is connected and connected using pointers.
By changing connections and following pointers, records can be read in the order of key values. The difference between the B - tree method and the method of the present invention is that the B - tree method manages the order between records using pointers, whereas the method of the present invention physically records records in the order of key values. There is no need to have a pointer to line up the . As a result, in the present invention, the possibility of file structure destruction due to pointer abnormality is extremely low. In addition, in the B - tree method, records in key order are connected using pointers, and each record is not necessarily physically arranged in the order of key values, so when reading records in key order,
If the file is on a magnetic disk, random access occurs on the disk and takes a long time to access, but with the present invention, the disk can be read sequentially, so accessing records in key order is extremely simple. The difference is that it is more efficient.

次に本発明を具体的な実施例について説明す
る。第1図に本発明の索引付きデータ入出力装置
の構成を示す。第1図において、1,2は、前述
のレコード格納メモリ、とレコード空実管理ビツ
トマツプ・メモリであり、フアイル・デイレクト
リ3には、レコード格納メモリとレコード空実管
理ビツトマツプ・メモリとで構成されるフアイル
18に関する個有情報(フアイルのサイズ、レコ
ードのサイズ、メモリ上のフアイルの開始アドレ
スなど)が予め定義された情報として記憶されて
いる。制御装置4は、モード・レジスター5で指
定されたモードに従い、フアイル・デイレクトリ
ー3の情報を参照しながら、レコード格納メモリ
1、レコード空実管理ビツトマツプ・メモリ2の
状態を前述の如く、実レコードの配置が、キーの
値の順番に且つ、均一にまばらに分散するように
制御する。モード・レジスター5で指定されるモ
ードとは、フアイルに対するレコードの、登録、
参照、削除、更新のいずれかを行うことを指示す
る制御情報であり、制御装置4は、 (a) 登録(追加)のとき:キー情報記憶バツフ
ア・メモリ6から入力されるキーの値から、レ
コードの追加位置を求め、レコード記憶バツフ
ア・メモリ7から入力されるレコードをフアイ
ルへ登録する。
Next, the present invention will be described with reference to specific examples. FIG. 1 shows the configuration of an indexed data input/output device according to the present invention. In FIG. 1, numerals 1 and 2 are the aforementioned record storage memory and record/actual management bitmap memory, and the file directory 3 is composed of the record storage memory and the record/actual management bitmap memory. Unique information regarding the file 18 (file size, record size, file start address on memory, etc.) is stored as predefined information. According to the mode specified by the mode register 5, the control device 4, while referring to the information in the file directory 3, changes the status of the record storage memory 1, record blank/actual management bitmap memory 2, from real record to real record, as described above. The arrangement is controlled so that the key values are uniformly and sparsely distributed in the order of the key values. The mode specified by mode register 5 is the registration, registration, and
This is control information that instructs to perform either reference, deletion, or update, and the control device 4: (a) At the time of registration (addition): From the key value input from the key information storage buffer memory 6, The additional position of the record is determined, and the record input from the record storage buffer memory 7 is registered in the file.

(b) 参照のとき:索引データ(キー)記憶バツフ
ア・メモリ6から入力されるキーの値と等しい
キーを持つレコードをフアイルから探索し、該
レコードをフアイルから読み出し、レコード記
憶バツフア・メモリ7へ出力する。
(b) When referencing: Search the file for a record with a key equal to the key value input from the index data (key) storage buffer memory 6, read the record from the file, and transfer it to the record storage buffer memory 7. Output.

(c) 削除のとき:索引データ(キー)記憶バツフ
ア・メモリ6から入力されるキーの値と等しい
キーを持つレコードをフアイルから探索し、該
レコードをフアイルから削除(レコード空実管
理ビツトマツプ・メモリの対応するレコード
空、実管理フラグをオフ(“0”)状態に)す
る。
(c) When deleting: Search the file for a record with a key equal to the key value input from the index data (key) storage buffer memory 6, and delete the record from the file (record blank/real management bitmap memory The corresponding record is empty and the real management flag is turned off (“0”).

(d) 更新のとき:索引データ(キー)記憶バツフ
ア・メモリ6から入力されるキーの値と等しい
キーを持つレコードをフアイルから探索し、該
レコードを、レコード記憶バツフア・メモリ7
から入力されるレコードの内容で更新する。
(d) When updating: Search the file for a record with a key equal to the key value input from the index data (key) storage buffer memory 6, and store the record in the record storage buffer memory 7.
Update with the contents of the record input from.

上記における、()レコードの追加の方法、
および()レコードの探索の方法、の詳細を第
4,5図に示す。第4図、第5図における、各記
号及び処理名の意味は下記のようなものである。
In the above, how to add a record (),
4 and 5 show details of the record search method and (). The meanings of each symbol and process name in FIGS. 4 and 5 are as follows.

<記号> RN…求めるレコードのレコード番号(レコー
ド格納メモリ上のアドレスに対応)を格納するレ
ジスター SP…サーチ・ポインター BP…開始ポインター AP…終了ポインター WRN、WRNX レコード番号格納用ワーク−レジスター MP…レコード移動先ポインター IP…レコード追加位置ポインター 以上は全て、第1図の制御装置4における内部
レジスターである。第4図A,Bはステツプ101
〜123から成る。
<Symbols> RN...Register that stores the record number of the desired record (corresponding to the address on the record storage memory) SP...Search pointer BP...Start pointer AP...End pointer WRN, WRNX Work register for storing record number MP...Record Destination pointer IP: Record addition position pointer All of the above are internal registers in the control device 4 in FIG. Figure 4 A and B are steps 101
Consisting of ~123.

処理ステツプ:(a)<off−bit−search−fo−
rward from(X)→Y>はレコード空実管理ビ
ツトマツプ・メモリ上のXで指定されたレコード
番号に対応するビツトから始めて、レコード番号
の増加方向へ、off−bit(“0”のもの)をサーチ
し、最初に検出されたoff−bitに対応するレコー
ド番号をYへ格納する。これは例えば第4図Aの
ステツプ107、112についての説明である。
Processing step: (a)<off-bit-search-fo-
rward from (X) → Y> starts from the bit corresponding to the record number specified by Search and store the record number corresponding to the first detected off-bit in Y. This is, for example, a description of steps 107 and 112 in FIG. 4A.

処理ステツプ:(b)<off−bit−search−ba−
ckward from(X)→Y>は(a)と同様。但し、レ
コード番号の減少方向へoff−bitをサーチするこ
とを意味する(第4図Aステツプ105)。
Processing step: (b)<off-bit-search-ba-
ckward from (X) → Y> is the same as (a). However, this means searching for off-bits in the decreasing direction of the record number (step 105 in FIG. 4A).

処理ステツプ:(c)<on−pit−search−fo−
rward from(X)→Y>は(a)と同様。但し、レ
コード番号の増加方向へon−bitをサーチする
(第4図Aステツプ113)。
Processing step: (c)<on-pit-search-fo-
rward from (X) → Y> is the same as (a). However, the on-bit is searched in the direction of increasing record number (step 113 in FIG. 4).

処理ステツプ:(d)<on−bit−search−ba−
ckward from(X)→Y>は(a)と同様。但し、レ
コード番号の減少方向へ、on−bitをサーチする
(第4図Aステツプ109)。
Processing step: (d)<on-bit-search-ba-
ckward from (X) → Y> is the same as (a). However, the on-bit is searched in the decreasing direction of the record number (step 109 in FIG. 4).

処理ステツプ:(e)<Move from(X)to(Y)
count(Z)>はXで示されるレコードからZ個の
レコードを、Yで示されるレコード位置からZ個
分のレコード格納領域へ移動する(第4図ステツ
プ117、119)。
Processing step: (e)<Move from (X) to (Y)
count(Z)> moves Z records from the record indicated by X to the record storage area for Z records from the record position indicated by Y (steps 117 and 119 in FIG. 4).

処理ステツプ:(f)<data write to(X)>はレ
コード格納メモリ上のX番目のレコード格納領域
へレコード記憶バツフア・メモリの内容を書き込
む(第4図B)。
Processing step: (f) <data write to (X)> writes the contents of the record storage buffer memory to the Xth record storage area on the record storage memory (FIG. 4B).

処理ステツプ:(g)<bit−set−to(X)>はレコ
ード空実管理ビツトマツプ・メモリ上のX番目の
ビツトをオン(“1”)にする(第4図B)。
Processing step: (g) <bit-set-to (X)> turns on (to "1") the Xth bit on the record empty/real management bitmap memory (FIG. 4B).

上記については第5図のステツプ151〜166につ
いても同様である。
The above also applies to steps 151 to 166 in FIG.

a,b,c,d各処理の機能説明図を第6図
に、また、処理eの機能説明図を第7図に示す。
これら、a〜gの各処理自体は、メモリに対する
既存のオペレーシヨン又は既存の技術により明ら
かに実現可能なものであり、公知のものであるた
め、その詳細については記載を省略する。なお、
a,b,c,dにて求めるパターンのビツトがメ
モリ内に存在しない場合には、forwardの時は
(最大レコード番号+1)を、backwardのとき
は、0をYに返す。
A functional explanatory diagram of each process a, b, c, and d is shown in FIG. 6, and a functional explanatory diagram of process e is shown in FIG.
Each of these processes a to g can obviously be realized using existing memory operations or existing techniques, and is well known, so a detailed description thereof will be omitted. In addition,
If the bits of the pattern sought by a, b, c, and d do not exist in the memory, (maximum record number + 1) is returned to Y for forward, and 0 is returned to Y for backward.

以下、第4図、第5図に示す、「レコード追加
の方法」、「レコード探索の方法」について説明す
る。
The "record addition method" and "record search method" shown in FIGS. 4 and 5 will be explained below.

レコードの追加においては、まず、追加しよう
とするレコードのキーと同一の値をもつレコード
の探索(第4図Aのブロツク101:後述)し、追
加すべきフアイル内のレコード格納位置(BPと
APとで示されるレコード位置の実レコードには
さまれた空き領域)を求める。この時、BPとAP
との間に空き領域が無い場合は、BP又はAPより
連なる実レコード列に隣接する空き領域までの距
離の短かい方向へ実レコード列を移動する(ブロ
ツク104〜120の処理)。この時、実レコード列を
移動する先のレコード格納位置は、ある予め定め
られた空き領域の配分規則Rによつて決定するよ
うにする(ブロツク115)。こうして求められた、
レコードを追加可能な空き領域内において、実際
にレコードを追加すべきレコード格納位置は、予
め定められた空き領域の配分規則R´によつて決定
(ブロツク120)し、該領域に追加レコードのデー
タを書き込み、対応するレコード空実管理フラグ
をオン(“1”)とする(ブロツク120〜122の処
理)。
When adding a record, first search for a record that has the same value as the key of the record to be added (block 101 in Figure 4A, described later), and then find the record storage position (BP and BP) in the file to be added.
Find the empty area between the actual records at the record position indicated by AP. At this time, BP and AP
If there is no free space between BP or AP, the real record string is moved in the direction of shortening the distance to the free space adjacent to the continuous real record string (processing in blocks 104 to 120). At this time, the record storage position to which the actual record string is moved is determined according to a predetermined free area allocation rule R (block 115). In this way, it was requested
Within the free area where records can be added, the record storage position where the record should actually be added is determined according to the predetermined free area distribution rule R' (block 120), and the data of the additional record is placed in the area. is written, and the corresponding record empty/real management flag is turned on (“1”) (processing of blocks 120 to 122).

次に、レコードの探索処理においては、BPと
APで囲まれる探索対象レコード領域を、まず全
領域(BP=0、AP=(最大レコード番号+1)
とし(第5図、ブロツク102、103)、該領域を予
め定められた配分規則R″によつて分割するよう
な検索対象レコード番号を求め、その近傍にある
実レコードのキーの値と、求めるキーの値とを比
較することにより、探索対象範囲をせばめていく
(BP、APを更新する:ブロツク104〜115の処
理)。これを、キーの一致するレコードが検出さ
れるか、探索対象レコードの範囲が全て空き領域
となる(キーの値の一致する該当レコードがフア
イル内に存在しない場合)までくり望す。第5図
の処理では該当するレコードが検出できた場合
は、そのレコード番号をRNに、また、該当する
レコードが検出できなかつた場合には、そのレコ
ードが格納されるべき領域が、BPとAPとで示さ
れるようになつている。
Next, in the record search process, BP and
First, select the search target record area surrounded by AP (BP = 0, AP = (maximum record number + 1)
(Figure 5, blocks 102 and 103), find the search target record number that divides the area according to the predetermined distribution rule R'', and find the key value of the real record in the vicinity. The search target range is narrowed down by comparing with the key value (updating BP and AP: processing of blocks 104 to 115). (If there is no corresponding record in the file with a matching key value), the range is completely empty (if there is no corresponding record in the file with the matching key value).If the corresponding record is detected in the process shown in Figure 5, the record number is In the RN, if a corresponding record cannot be detected, the area where the record should be stored is indicated by BP and AP.

なお、ここで使用される配分規則R,R′,
R″は、少なくとも或る領域の両端を指定する2
つのポインターの値に依存し、2つのポインター
で囲まれる領域をある配分に分割するような領域
内のレコード格納位置レコード番号を導出する関
数である。この関数は、フアイルに格納されるべ
きレコードのキーの値の特性、分散のし方に依存
して任意に定めることのできるものであるが、そ
の目的は、フアイル内レコード格納メモリ上に、
実レコードが一ケ所にかたよることなく、均一に
まばらに散らばつて存在するようにすることにあ
る。
Note that the distribution rules R, R′,
R″ is 2 that specifies at least both ends of a certain area.
This is a function that derives record storage position record numbers within an area that depends on the values of two pointers and divides the area surrounded by two pointers into certain distributions. This function can be arbitrarily defined depending on the characteristics and distribution method of the key values of the records to be stored in the file, but its purpose is to
The purpose is to ensure that the actual records are scattered evenly and sparsely, without being concentrated in one place.

以下、前記の配分規則に具体的に評価関数を適
用した場合について、その特性及び、本発明のフ
アイルにおける実レコード格納状態の遷移一ふる
まいについて説明する。
Hereinafter, when an evaluation function is specifically applied to the above-mentioned distribution rule, its characteristics and the transition and behavior of the actual record storage state in the file of the present invention will be explained.

<配分規則の具体例> 本発明の実施例の1つとして、配分規則を次の
ように定める場合を考える。
<Specific Example of Distribution Rule> As one of the embodiments of the present invention, consider a case where the distribution rule is defined as follows.

MP←R(WRNX、WRN):MP←
WRNX+WRN/2 IP←R′(BP、AP):IP←BP+AP/2 SP←R″(BP、AP):SP←BP+AP/2 つまり、レコードの追加は、空き領域の中央に
行い、また、探索は、探索範囲を常に2分しなが
ら行つていくこととする。この時の、フアイルへ
のレコードの追加による、フアイル内のレコード
の並びの状態の変化を第8図に示す。但し追加す
るレコードは、以下のキーの値の順に入力される
場合を仮定する。
MP←R (WRNX, WRN): MP←
WRNX+WRN/2 IP←R′(BP, AP): IP←BP+AP/2 SP←R″(BP, AP): SP←BP+AP/2 In other words, record addition is done in the center of the free area, and the search The search range is always divided into two parts. Figure 8 shows how the arrangement of records in the file changes as records are added to the file. assumes that the following key values are entered in the order:

追加されるキーの順序: 〔80、45、32、23、67、95、21、1、10、55、
71、46、47、17、3、60、85、5、50、35〕 この時の、レコード追加時の移動レコード数を
第9図に示す。第9図から明らかなように、フア
イルへの登録レコード数が少ない、すなわち、ロ
ード比率が低いうちは、殆んどレコードの移動な
くレコードを新たに追加できる。ロード比率が高
くなると場合によつては、移動レコード数の数が
大きくなることが有るため、ロード比率をある程
度のところに抑えて使用すると効率がよいことが
分かる。また、レコードの検索は、2分検索法に
近い方法で行え、効率よく、求めるレコードの探
索を行うことができる。レコードの削除について
は、削除対象レコードを探索した後、探索された
レコードのレコード番号に対応したレコード空実
管理フラグをオフ状態(“0”)とするだけでよ
い。
Order of keys added: [80, 45, 32, 23, 67, 95, 21, 1, 10, 55,
71, 46, 47, 17, 3, 60, 85, 5, 50, 35] Figure 9 shows the number of records moved at the time of record addition. As is clear from FIG. 9, as long as the number of records registered in the file is small, that is, the load ratio is low, new records can be added with almost no movement of records. As the load ratio increases, the number of records to be moved may increase in some cases, so it can be seen that it is more efficient to use the system while keeping the load ratio to a certain level. Furthermore, records can be searched using a method similar to the binary search method, and the desired record can be searched for efficiently. To delete a record, after searching for a record to be deleted, it is only necessary to turn off ("0") the record empty/actual management flag corresponding to the record number of the searched record.

<配分規則の具体例> 第2の実施例として、配分規則を次のように定
める場合を考える。
<Specific Example of Allocation Rule> As a second example, consider a case where the allocation rule is defined as follows.

MP←R(WRNX、RNX): MP←WRNX+WRN/2 IP←R′(BP、AP): IP←〔Key−Key(BP)/Key(AP)−Key(BP)(AP−
BP)〕+ BP SP←R″(BP、AP): SP←〔Key−Key(BP)/Key(AP)−Key(BP)・(AP
−BP)〕+ BP 但し、 Key:追加又は探索しようとするキーの値 Key(AP):APが示すレコードのキーの値 Key(BP):BPが示すレコードのキーの値 つまり、レコードの追加時におけるレコード追
加位置および、レコード探索時における探索開始
位置は、空き領域または探索範囲領域内の両端の
レコードのキーの値と、追加又は探索しようとす
るレコードのキーの値との比率で領域が分割され
るようなレコード格納位置を選ぶ。但し、フアイ
ルの両端は、キーのとりうる値の最小及び最大値
を予め与えておくものとし、本例では、キーの値
の範囲は1〜100とし、最小値を0、最大値101と
する。第10図は、以上の条件にて、実施例の
場合と同じ順序で同じキー列を追加していつた場
合のフアイル内レコードの並びの状態の変化を表
わした図であり、第11図は、その時の移動レコ
ード数との対応を示した図である。この図からも
分かるように、本例のようなキーの特性分布をも
つレコードでは具体例の配分規則とすることに
より、追加時のオーバーヘツド(レコードの移
動)は更に削減され、また、レコードの探索にお
いても、ほとんど1〜2回のキーの照合回数で、
求めるレコードを探索できる。但し、これは、具
体例の配分規則の法が常に秀れた特性を持つて
いる、ということではなく、本例のようなキーの
分散の特性の場合には具体例の方がよい、とい
うことだけにすぎない。すなわち、本発明によれ
ば、レコード追加時のオーバーヘツド(レコード
の移動)の量は、ロード比率と相関があり、ロー
ド比率がある限界値を超えると急激に増加する
(第12図a)。そして、この相関曲線は、フアイ
ルへ格納するレコードのキーの特性により配分規
則を適当に選ぶことにより、ロード比率の限界値
を引き上げること(第12図b)も、また、全体
の平均のオーバーヘツドを小さくすること(第1
2図c)も可能である。
MP←R(WRNX, RNX): MP←WRNX+WRN/2 IP←R′(BP, AP): IP←[Key−Key(BP)/Key(AP)−Key(BP)(AP−)
BP)〕+BP SP←R″(BP, AP): SP←[Key−Key(BP)/Key(AP)−Key(BP)・(AP
−BP)] + BP However, Key: Value of the key to be added or searched Key (AP): Value of the key of the record indicated by AP Key (BP): Value of the key of the record indicated by BP In other words, adding a record The record addition position at the time and the search start position at the time of record search are determined by the ratio of the key value of the records at both ends in the free area or search range area and the key value of the record to be added or searched. Select a record storage location that will be split. However, at both ends of the file, the minimum and maximum values that the key can take shall be given in advance. In this example, the key value range is 1 to 100, with the minimum value being 0 and the maximum value being 101. . FIG. 10 is a diagram showing changes in the arrangement of records in a file when the same key strings are added in the same order as in the example under the above conditions, and FIG. It is a diagram showing the correspondence with the number of movement records at that time. As can be seen from this figure, by using the specific example distribution rule for records with key characteristic distributions like this one, the overhead (record movement) at the time of addition can be further reduced. Even in searches, the number of key verifications is mostly 1 or 2 times,
You can search for the records you want. However, this does not mean that the distribution rule of the concrete example always has superior properties, but rather that the concrete example is better in the case of key distribution characteristics as in this example. It's just a thing. That is, according to the present invention, the amount of overhead (record movement) when adding a record is correlated with the load ratio, and increases rapidly when the load ratio exceeds a certain limit value (FIG. 12a). This correlation curve shows that by appropriately selecting the distribution rule according to the characteristics of the keys of the records stored in the file, the limit value of the load ratio can be raised (Figure 12b), and the overall average overhead can be increased. (first
Figure 2c) is also possible.

なお、第1図の構成図において、索引付きデー
タ入出力装置19を、処理要求9を発行する処理
装置(プロセツサ)とは独立に動作可能なプロセ
ツサとした場合には、レコードの登録処理要求の
あつたレコードデータを一旦、レコード記憶バツ
フアメモリに保持し、要求元に対しては処理完了
信号10を返し、しかる後、レコード追加登録に
伴うフアイル内レコード移動処理を実施するよう
にすることにより、処理要求に対する応答性を高
めることが可能である。これは、特に分散処理形
態で、フアイル処理を専門に行うフアイル・プロ
セツサや、データベース操作を集中的に実行する
データベースマシンといつた、専用プロセツサ構
成において特に有効である。
In the configuration diagram of FIG. 1, if the indexed data input/output device 19 is a processor that can operate independently of the processing device (processor) that issues the processing request 9, the record registration processing request Processing is performed by temporarily retaining the record data in the record storage buffer memory, returning a processing completion signal 10 to the request source, and then performing record movement processing within the file in conjunction with additional record registration. It is possible to improve responsiveness to requests. This is particularly useful in dedicated processor configurations, such as file processors that specialize in file processing and database machines that perform intensive database operations, especially in distributed processing formats.

本発明の実施例によると、 (1) 索引データ(キー)による、レコードの追加
(登録)、参照、削除、更新を高速に行える。ま
た、ロード比率を抑えることにより、レコード
の追加時にも安定した高レスポンス性能を保証
することができる。
According to the embodiments of the present invention, (1) Records can be added (registered), referenced, deleted, and updated at high speed using index data (key). Furthermore, by suppressing the load ratio, stable and high response performance can be guaranteed even when adding records.

(2) 索引データ(キー)の値の順番に(ソーテイ
ングされた形で)レコードを高速に読み出すこ
とができる。特に、ソーテイングする必要がな
いというだけでなく、フアイル内に物理的に連
続した領域にレコードがキー順に並んでいるの
で、例えば、レコード格納メモリが、磁気デイ
スクのような補助記憶装置の場合にも高速に連
続して読み出すことが可能である。
(2) Records can be read out at high speed in the order of index data (key) values (sorted). In particular, not only is there no need for sorting, but records are arranged in key order in physically contiguous areas within the file, so even if the record storage memory is an auxiliary storage device such as a magnetic disk, It is possible to read data continuously at high speed.

(3) 従来のキー順フアイルの構成法、例えばB木
探索法のような場合と違い、キー順フアイルの
構成要素として、他のデータの所在アドレスを
記憶するような“ポインター”を持たないた
め、フアイルの構造として破壊されにくく、ま
た、破壊されたとしても、局所的なデータ欠損
のレベルにとどまり、フアイル全体のダウンに
至る危険性は極めて少ない。
(3) Unlike conventional key-ordered file construction methods, such as the B-tree search method, this key-ordered file does not have a "pointer" that stores the location address of other data as a constituent element. The structure of the file is difficult to destroy, and even if it is destroyed, it will only result in local data loss, and the risk of the entire file going down is extremely low.

〔発明の効果〕〔Effect of the invention〕

本発明によるとフアイルへの入力あるいは出力
を高速におこなうことができる。
According to the present invention, input to or output from a file can be performed at high speed.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は索引付データの出入力装置の概要を示
すブロツク図を、第2図、第3図は本発明の基本
的なデータ構成とその説明図を、第4図A,B、
第5図はレコードの追加、検索の説明図を、第6
図、第7図は処理ステツプの機能説明図を、第8
図はレコード内のレコードの並びの状態変化図
を、第9図はレコード追加時の移動レコード数、
第10図、第11図は第8図、第9図に対応して
いて配分規則を変えた場合を、第12図はロード
比率と追加時のオーバヘツドの関係を示す。 1……レコード格納メモリ、2……レコード空
実管理ビツトマツプ・メモリ、3……フアイルデ
イレクトリ、4……制御装置、5……処理要求モ
ード・レジスタ、6……キー情報記憶バツフア・
メモリ、7……レコード記憶バツフア・メモリ、
8……フアイル個有情報、9……処理要求信号
(モード)、10……処理完了信号、11……キー
情報、12……レコード・データ、13……ビツ
トマツプ・アドレス、14……レコード空実情
報、15……レコード・アドレス、16……キー
情報、17……レコード・データ、18……フア
イル、19……索引付きデータ入出力装置。
FIG. 1 is a block diagram showing an overview of the input/output device for indexed data, FIGS. 2 and 3 show the basic data structure of the present invention and its explanatory diagram, and FIGS. 4A, B,
Figure 5 is an explanatory diagram of adding and searching records, and Figure 6 is an illustration of adding and searching records.
7 and 7 are functional explanatory diagrams of the processing steps, and FIG.
The figure shows the state change diagram of the arrangement of records within a record, and Fig. 9 shows the number of records moved when adding a record.
FIGS. 10 and 11 correspond to FIGS. 8 and 9 and show the case where the distribution rules are changed, and FIG. 12 shows the relationship between the load ratio and the overhead at the time of addition. 1...Record storage memory, 2...Record empty/actual management bit map memory, 3...File directory, 4...Control device, 5...Processing request mode register, 6...Key information storage buffer.
Memory, 7...Record storage buffer memory,
8... File specific information, 9... Processing request signal (mode), 10... Processing completion signal, 11... Key information, 12... Record data, 13... Bitmap address, 14... Record empty Actual information, 15...Record address, 16...Key information, 17...Record data, 18...File, 19...Data input/output device with index.

Claims (1)

【特許請求の範囲】 1 記憶装置へのデータの入力を管理する方法に
おいて連続する記憶領域上に記録可能な記憶領域
単位を複数ケース有し、該記憶単位ごとに記録が
保持されているか否かを識別管理し、該記録が記
憶領域上において空実状態が平均的に散在するよ
うにし、かつ、記録の並びが記録を識別し、かつ
あらかじめ定められた評価により順序付けされた
索引情報であるキー情報の値の順序となるように
各記録を入力配置し格納することを特徴とするデ
ータの入力管理方法。 2 前記特許請求の範囲第1項に記載のデータの
入力管理方法において、該記憶領域上へ新たな記
録を追加登録するとき、新たな記録のキー情報の
値と、既に登録されている記録のキー情報の値と
を比較し、その値の順序関係より、新たな記録を
登録すべき空きの記憶領域の範囲を求め、該求め
られた空きの記憶領域の範囲内に記録入力するこ
とを特徴とするデータの入力管理方法。 3 前記特許請求の範囲第2項記載において、該
新たな記録を登録すべき記憶領域に空きがない場
合には、記憶領域上の別の空き領域へ既に登録さ
れている記録群を、そのキー情報の値の順序が変
わらないように順次移動させ、新たな記録を登録
すべき空きの記憶領域を作成し、該新たな記憶領
域内へ、記憶領域の空実状態が均一的に散在する
状態となるように新たな記録を追加すべき記憶単
位を決定し、当該記憶単位へ新たな記録を登録す
ることを特徴とするデータの入力管理方法。 4 前記特許請求の範囲第1項記載において、新
たな記録を追加する場合にキー情報の値の順序関
係を保持し、新たな記録を登録すべき空きの記憶
領域の範囲の直前及び直後に既に登録されている
記録のキー情報の値と新たな記録のキー情報の値
との関係により、空き領域をある定められた配分
規則で分割する様に新たな記録を登録すべき記憶
単位を決定することを特徴とするデータの入力管
理方法。 5 特許請求の範囲第1〜4項に記載のデータの
入力管理方法において、該記憶単位毎の1ビツト
のフラグ情報を、記憶領域中の記憶単位の並びに
対応した並び順で保持するビツトマツプに記憶
し、記憶単位に記録が登録されているか否かを該
ビツトマツプ記憶のフラグの状態(オン/オフ)
によつて管理し、記録の登録時にはビツトマツプ
記憶の該当するフラグをオンし、記録の削除時に
は該当するフラグをオフし、空き又は実の記憶単
位の検索時には、ビツトマツプ記憶上のフラグを
走査することにより、空き記憶領域或いは、実の
記憶領域を求めることを特徴とするデータの入力
管理方法。 6 特許請求の範囲第1項に記載において、新た
な登録要求のあつた記録を一旦格納し保持する記
録緩衝領域に登録することを特徴とするデータの
入力管理方法。
[Claims] 1. In a method for managing data input to a storage device, there are multiple storage area units that can be recorded on a continuous storage area, and whether or not records are maintained for each storage unit. A key that identifies and manages the records so that empty states are evenly scattered in the storage area, and the arrangement of the records is index information that identifies the records and is ordered by a predetermined evaluation. A data input management method characterized by inputting and arranging and storing each record in the order of information values. 2. In the data input management method set forth in claim 1, when a new record is additionally registered on the storage area, the value of the key information of the new record and the value of the already registered record are It is characterized by comparing the value of the key information, determining the range of free storage area in which a new record should be registered based on the order relationship of the values, and inputting the record within the range of the determined free storage area. How to manage data input. 3. As stated in claim 2, if there is no free space in the storage area in which the new record should be registered, the record group that has already been registered in another free area on the storage area is transferred to its key. A state in which a free storage area is created in which a new record is to be registered by sequentially moving the information values so that the order does not change, and empty and real storage areas are uniformly scattered within the new storage area. A data input management method characterized by determining a storage unit to which a new record should be added so that the new record is added, and registering the new record in the storage unit. 4. In claim 1, when adding a new record, the order relationship of the values of the key information is maintained, and the range of free storage area in which the new record is to be registered is maintained, and Based on the relationship between the value of the key information of the registered record and the value of the key information of the new record, the storage unit in which the new record should be registered is determined so that the free space is divided according to a certain distribution rule. A data input management method characterized by: 5. In the data input management method according to claims 1 to 4, 1-bit flag information for each storage unit is stored in a bit map that holds the flag information in an order corresponding to the arrangement of the storage units in the storage area. Then, check the flag status (on/off) of the bitmap memory to determine whether a record is registered in the memory unit.
When registering a record, turn on the corresponding flag in the bit map memory, turn off the corresponding flag when deleting a record, and scan the flag on the bit map memory when searching for a free or real memory unit. A data input management method characterized by determining a free storage area or an actual storage area. 6. A data input management method as set forth in claim 1, characterized in that a record for which a new registration request is made is registered in a record buffer area that temporarily stores and holds the record.
JP60000843A 1985-01-09 1985-01-09 Data input control method Granted JPS61160133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60000843A JPS61160133A (en) 1985-01-09 1985-01-09 Data input control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60000843A JPS61160133A (en) 1985-01-09 1985-01-09 Data input control method

Publications (2)

Publication Number Publication Date
JPS61160133A JPS61160133A (en) 1986-07-19
JPH0449132B2 true JPH0449132B2 (en) 1992-08-10

Family

ID=11484903

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60000843A Granted JPS61160133A (en) 1985-01-09 1985-01-09 Data input control method

Country Status (1)

Country Link
JP (1) JPS61160133A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63158641A (en) * 1986-12-23 1988-07-01 Nec Corp Idle file control system
JPH01120647A (en) * 1987-11-04 1989-05-12 Nec Corp File managing system
JPH0495366U (en) * 1991-01-16 1992-08-18

Also Published As

Publication number Publication date
JPS61160133A (en) 1986-07-19

Similar Documents

Publication Publication Date Title
Litwin Linear Hashing: a new tool for file and table addressing.
US5813000A (en) B tree structure and method
US4611272A (en) Key-accessed file organization
KR100886189B1 (en) Database
US6954759B2 (en) Data processing method using record division storing scheme and apparatus therefor
US7418544B2 (en) Method and system for log structured relational database objects
US11580162B2 (en) Key value append
CN110119425A (en) Solid state drive, distributed data-storage system and the method using key assignments storage
US6584555B2 (en) Information storage and retrieval system
US6745198B1 (en) Parallel spatial join index
CN114116612B (en) Access method for index archive file based on B+ tree
KR101806394B1 (en) A data processing method having a structure of the cache index specified to the transaction in a mobile environment dbms
US20200019539A1 (en) Efficient and light-weight indexing for massive blob/objects
JP6006740B2 (en) Index management device
JPH0449132B2 (en)
JPS59220853A (en) Disc cache system
CN118312515B (en) Collaborative invalid key value pair confirmation method and garbage collection method applied to WiscKey
JPH0198020A (en) Index management system
JP2871755B2 (en) Split control method in dynamic hash
JPS62287350A (en) Index integrally updating system
JP2679761B2 (en) Data management system
JP2540821B2 (en) Database search system
CN105446899B (en) The method of internal storage data quick and durableization based on storage level memory
JP2643850B2 (en) File processing device
JP3087701B2 (en) Exclusive control unit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees