JPH04344567A - Information deletion and registration system - Google Patents

Information deletion and registration system

Info

Publication number
JPH04344567A
JPH04344567A JP3116234A JP11623491A JPH04344567A JP H04344567 A JPH04344567 A JP H04344567A JP 3116234 A JP3116234 A JP 3116234A JP 11623491 A JP11623491 A JP 11623491A JP H04344567 A JPH04344567 A JP H04344567A
Authority
JP
Japan
Prior art keywords
data
data management
hash
key name
information
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.)
Pending
Application number
JP3116234A
Other languages
Japanese (ja)
Inventor
Akihiro Saito
斉藤 晃宏
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.)
Toshiba TEC Corp
Original Assignee
Tokyo Electric Co 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 Tokyo Electric Co Ltd filed Critical Tokyo Electric Co Ltd
Priority to JP3116234A priority Critical patent/JPH04344567A/en
Publication of JPH04344567A publication Critical patent/JPH04344567A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To shorten processing time for deleting or registering data, to improve the processing efficiency, and to simplify configuration. CONSTITUTION:A storage device 11 is provided with a plurality of data management tables consisting of a plurality of data management elements and a plurality of data management headers, and also is provided with a registration information area 151 for storing data that indicates whether data management elements are registered or unregistered, a key name length area 152 for storing key name length, a key section 153 for storing key name and a data section 154 for storing data. Each data management element of each data management table is formed in a continuous storage area. Further, a hashed value from a hash function section 19 retrieves a relevant entry from a hash table 17, specifies a relevant data management table in the storage device, and retrieves data management elements.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、ハッシュテーブルを使
用してデータの削除、登録を行う情報削除登録方式に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information deletion and registration method for deleting and registering data using a hash table.

【0002】0002

【従来の技術】データを削除したり登録する場合にはデ
ータ検索が必要となるが、データ検索には文字列等通常
キー名と呼ばれる情報を使用し、このキー名と一致する
キー名を検索してデータの検索を行うものがある。この
場合、データを単純にテーブル上に連続的に並べて格納
しておき、データ検索時にはテーブル上のデータを順次
キー名の一致を見て検索したのでは検索に膨大な時間が
かかるという問題がある。
[Prior Art] When deleting or registering data, a data search is required, and the data search uses information such as a character string, usually called a key name, and searches for a key name that matches this key name. There are some that search for data. In this case, there is a problem in that if the data is simply stored consecutively in a table and the data in the table is searched sequentially by matching key names, the search will take a huge amount of time. .

【0003】そこで従来データの検索を迅速に行う方式
としてハッシュ方式が知られている。この方式は検索情
報(キー名)からハッシュ関数を使用してハッシュ値を
求め、そのハッシュ値によって一意に定まる記憶領域に
該当するデータを格納するようになっている。またハッ
シュ方式では異なるキー名、例えば「swallow 
」と「lion」のハッシュ値が等しくなる、いわゆる
ハッシュ値の衝突が発生することがある。
[0003] Conventionally, a hash method is known as a method for quickly searching data. This method uses a hash function to obtain a hash value from search information (key name), and stores the corresponding data in a storage area uniquely determined by the hash value. Also, in the hashing method, different key names, such as "swallow"
" and "lion" may have the same hash value, a so-called hash value collision.

【0004】このようなことからハッシュ値から直接決
定する記憶アドレスを先頭のデータ又はデータのポイン
タへのアドレスとして同一のハッシュ値に属する他のデ
ータを先頭のデータ又は先頭のポインタから順次データ
又はポインタの連鎖を作って格納する方式が採用されて
いる。同一ハッシュ値に属するデータ群から目的のデー
タを検索するには、そのデータ又はポインタ中にある検
索情報(キ−)とデータ群の検索情報との照合を行い一
致をはかっている。
For this reason, the storage address directly determined from the hash value is used as the address to the first data or data pointer, and other data belonging to the same hash value is sequentially determined from the first data or pointer to the data or pointer. A method is adopted in which a chain of data is created and stored. To search for target data from a data group belonging to the same hash value, the search information (key) in the data or pointer is compared with the search information for the data group to ensure a match.

【0005】すなわち従来は図5に示すように、記憶装
置1に同一ハッシュ値のデータd1,d2 ,d3 と
データd4 ,d5 をそれぞれ連鎖させて格納してい
る。各データd1 〜d5 はキー部1a、データ部1
b、ポインタ部1cからなり、ポインタ部1cには連鎖
する次のデータのアドレスが保持され、連鎖する次のデ
ータが無い場合には最終データを示す、例えば「0」が
書込まれるようになっている。
That is, conventionally, as shown in FIG. 5, data d1, d2, d3 and data d4, d5 having the same hash value are stored in a chain in the storage device 1, respectively. Each data d1 to d5 is the key part 1a and the data part 1
b. It consists of a pointer part 1c. The address of the next data to be chained is held in the pointer part 1c, and when there is no next data to be chained, for example, "0" indicating the final data is written. ing.

【0006】そして検索情報レジスタ2に格納されてい
るキー名をハッシュ関数部3に入力してハッシュ値を求
め、そのハッシュ値によりハッシュテーブル4から1つ
のエントリーを得る。ハッシュテーブル4の各エントリ
ーには該当するハッシュ値に属する連鎖データにおける
先頭データのアドレスが書込まれている。
Then, the key name stored in the search information register 2 is input to the hash function section 3 to obtain a hash value, and one entry is obtained from the hash table 4 based on the hash value. In each entry of the hash table 4, the address of the first data in the chain data belonging to the corresponding hash value is written.

【0007】今、ハッシュテーブル4によりデータd1
 のアドレスが指定されたとすると、データd1 のキ
ー部1aを読出して検索情報レジスタ2のキーと比較す
る。 そしてもし一致していればそのデータd1 が目的のデ
ータとなる。また一致していなければデータd1 のポ
インタ部1cを読出し、それをアドレスとして次に連鎖
しているデータd2 のキー部1aを読出して検索情報
レジスタ2のキー名と比較する。そしてもし一致してい
ればそのデータd2 が目的のデータとなる。また一致
していなければデータd2のポインタ部1cを読出し、
それをアドレスとして次に連鎖しているデータd3 の
キー部1aを読出して検索情報レジスタ2のキー名と比
較する。以上のようにして記憶装置1から目的のデータ
を検索するようになっている。
[0007] Now, data d1 is stored in hash table 4.
If the address is specified, the key part 1a of the data d1 is read out and compared with the key of the search information register 2. If they match, the data d1 becomes the target data. If they do not match, the pointer section 1c of the data d1 is read out, and using this as an address, the key section 1a of the next chained data d2 is read out and compared with the key name of the search information register 2. If they match, the data d2 becomes the target data. If they do not match, read the pointer part 1c of the data d2,
Using this as an address, the key part 1a of the next chained data d3 is read out and compared with the key name in the search information register 2. In the manner described above, target data is retrieved from the storage device 1.

【0008】また例えば特開昭60−254254号公
報に見られるように、それぞれ異なるハッシュ関数を有
する複数個のハッシュテーブルを設け、1つのキー名に
該当する内容に対応した情報を各ハッシュテーブルに格
納するとともにその内容をメモリに格納し、各ハッシュ
テーブルの参照時においてその情報が比較され、共通す
る情報がすべてハッシュテーブルに存在すればその情報
に対応する内容がメモリから読み出され、また共通する
情報がすべてハッシュテーブルに存在しなければ内容が
未登録であると判定されるようになっている。
Furthermore, as seen in Japanese Patent Laid-Open No. 60-254254, for example, a plurality of hash tables each having a different hash function are provided, and information corresponding to the content corresponding to one key name is stored in each hash table. When each hash table is referenced, the information is compared, and if all common information exists in the hash table, the content corresponding to that information is read out from memory. If all the information to be registered does not exist in the hash table, the content is determined to be unregistered.

【0009】[0009]

【発明が解決しようとする課題】しかしながら図5に示
すものでは、同一ハッシュ値に属するデータ群から目的
のデータを検索する場合に、各データ毎にデータ中にあ
るポインタを読出して次のデータのアドレスを決定する
処理を必要とするため検索に時間がかかり、このため記
憶装置1のデータを削除したり、登録したりする場合の
処理効率が悪い問題があった。
[Problems to be Solved by the Invention] However, in the system shown in FIG. 5, when searching for target data from a group of data belonging to the same hash value, the pointer in the data is read for each data and the pointer in the data is searched for the next data. Since the process of determining the address is required, the search takes time, and therefore there is a problem that the processing efficiency is low when deleting or registering data in the storage device 1.

【0010】また特開昭60−254254号公報のも
のは、構成が複雑化するとともに多くの記憶領域を必要
とし、またデータを削除する場合には処理に時間がかか
るという問題があった。
Furthermore, the method disclosed in Japanese Patent Application Laid-Open No. 60-254254 has the problem that it has a complicated structure, requires a large storage area, and takes a long time to process when deleting data.

【0011】そこで本発明は、データを削除したり登録
するのに要する時間の短縮を図ることができて処理効率
を向上でき、しかも構成が簡単となる情報削除登録方式
を提供しようとするものである。
[0011] Therefore, the present invention aims to provide an information deletion/registration method that can shorten the time required to delete or register data, improve processing efficiency, and have a simple configuration. be.

【0012】0012

【課題を解決するための手段と作用】本発明は、検索情
報からハッシュ関数によりハッシュ値を求め、そのハッ
シュ値によりハッシュテーブルを参照して記憶装置のデ
ータ削除やデータ登録を行う場合に、記憶装置に、デー
タが登録されているか否かを示す情報が格納される登録
情報領域、キー名の長さ情報が格納される領域、キー名
、データ名を管理する情報が格納される領域からなるデ
ータ管理エレメントを記憶領域に対して複数連続して格
納してグループを形成するとともにそのグループの各デ
ータ管理エレメントを管理するデータ管理ヘッダからな
るデータ管理テーブルを複数設け、データ削除時には削
除対象となるデータのハッシュ値からハッシュテーブル
を参照して対応するデータ管理テーブルを検索し、さら
にそのデータ管理テーブルから対応するデータ管理エレ
メントを検索してそのデータ管理エレメントの登録情報
領域に未登録を示すデータを書込み、データ登録時には
そのデータのハッシュ値からハッシュテーブルを参照し
て対応するデータ管理テーブルを検索するとともにその
データ管理テーブルの各データ管理エレメントの中で登
録情報領域に未登録を示すデータが書込まれているデー
タ管理エレメントを検索し、その検索されたデータ管理
エレメントの登録情報領域、キー名の長さ情報が格納さ
れる領域、キー名、データ名を管理する情報が格納され
る領域にそれぞれ対応するデータを書込むことにある。
[Means and effects for solving the problem] The present invention calculates a hash value from search information using a hash function, and uses the hash value to refer to a hash table when data is deleted or registered in a storage device. Consists of a registration information area where information indicating whether data is registered in the device is stored, an area where key name length information is stored, and an area where information for managing key names and data names is stored. Multiple data management elements are stored consecutively in the storage area to form a group, and multiple data management tables are provided that are made up of data management headers that manage each data management element in the group, and are subject to deletion when data is deleted. The hash table is referenced from the hash value of the data, the corresponding data management table is searched, the corresponding data management element is searched from the data management table, and the data indicating unregistered is entered in the registration information area of the data management element. When writing or registering data, the hash table is referenced from the hash value of the data to search for the corresponding data management table, and data indicating unregistered is written to the registration information area in each data management element of the data management table. Search for the data management element that is searched, and write information in the registration information area of the searched data management element, the area where key name length information is stored, and the area where information for managing key names and data names is stored. The purpose is to write the corresponding data.

【0013】[0013]

【実施例】以下、本発明の実施例を図面を参照して説明
する。
Embodiments Hereinafter, embodiments of the present invention will be described with reference to the drawings.

【0014】図1において11は記憶装置で、この記憶
装置11には複数のデータ管理テーブル12,13,1
4,…が設けられている。この各データ管理テーブル1
2,13,14,…は複数のデータ管理エレメント12
a,12b,12c、13a,13b,13c、14a
,14b,14cとデータ管理ヘッダ12d,13d,
14dによって構成されている。前記各データ管理エレ
メント12a,12b,12c、13a,13b,13
c及び14a,14b,14cはそれぞれ連続した記憶
領域に形成されてグループを形成している。
In FIG. 1, 11 is a storage device, and this storage device 11 stores a plurality of data management tables 12, 13, 1.
4,... are provided. Each data management table 1
2, 13, 14, ... are a plurality of data management elements 12
a, 12b, 12c, 13a, 13b, 13c, 14a
, 14b, 14c and data management headers 12d, 13d,
14d. Each of the data management elements 12a, 12b, 12c, 13a, 13b, 13
c, 14a, 14b, and 14c are each formed in a continuous storage area to form a group.

【0015】前記各データ管理エレメント12a,12
b,12c、13a,13b,13c及び14a,14
b,14cはそれぞれデータが登録されているか否かを
示すデータ、例えば未登録時にはオール「1」、登録時
には「0」を格納する登録情報領域151 、キー名の
長さ(例えばキ−名が「milk」であれば4)を格納
するキー名長さ領域152 、キー名を格納するキー部
153 及びデータを格納するデータ部154 で構成
されている。 前記各データ管理ヘッダ12d,13d,14dは各デ
ータ管理エレメント12a,12b,12c、13a,
13b,13c及び14a,14b,14cを管理する
もので、それぞれ何個のデータ管理エレメントが登録さ
れているかを示すデータ管理エレメントカウンタ161
 及び次テーブルポインタ部162で構成されている。
[0015] Each of the data management elements 12a, 12
b, 12c, 13a, 13b, 13c and 14a, 14
b and 14c are data indicating whether the data is registered or not, for example, a registration information area 151 that stores all "1"s when unregistered and "0" when registered, and the length of the key name (for example, if the key name is If it is "milk", it is composed of a key name length area 152 for storing 4), a key part 153 for storing the key name, and a data part 154 for storing data. Each of the data management headers 12d, 13d, 14d corresponds to each data management element 12a, 12b, 12c, 13a,
13b, 13c and 14a, 14b, 14c, and a data management element counter 161 that indicates how many data management elements are registered in each.
and a next table pointer section 162.

【0016】また17はハッシュテーブルで、このハッ
シュテーブル17の各エントリー17a,…には例えば
データ管理テーブル12,14等の先頭アドレスが格納
されている。データ管理テーブル12の次テーブルポイ
ンタ部162 にはリンクするデータ管理テーブル13
の先頭アドレスが格納されている。データ管理テーブル
13,14の次テーブルポインタ部162 にはリンク
するデータ管理テーブルが無いためオール「1」が格納
されている。
Reference numeral 17 denotes a hash table, and each entry 17a, . . . of this hash table 17 stores, for example, the start address of the data management tables 12, 14, etc. The next table pointer section 162 of the data management table 12 is linked to the data management table 13.
The start address of is stored. Since there is no linked data management table in the next table pointer section 162 of the data management tables 13 and 14, all "1"s are stored.

【0017】18は検索すべきデータのキーが格納され
る検索情報レジスタ、19はこの検索情報レジスタ18
のキー名からハッシュ関数を使用してハッシュ値を求め
るハッシュ関数部である。そして前記ハッシュ関数部1
9からのハッシュ値によって前記ハッシュテーブル17
から該当するエントリーを検索するようになっている。
18 is a search information register in which the key of data to be searched is stored; 19 is this search information register 18;
This is a hash function part that calculates a hash value from the key name using a hash function. and the hash function section 1
9 by the hash value from hash table 17
The corresponding entry will be searched from.

【0018】なお、データ管理テーブルを新規に作成す
る場合は、データ管理ヘッダのデータ管理エレメントカ
ウンタ161 は「0」となり、次テーブルポインタ部
162はリンクするデータ管理テーブルが無いのでオー
ル「1」となり、かつ各データ管理エレメントの登録情
報領域151 はオール「1」となる。
When creating a new data management table, the data management element counter 161 of the data management header becomes "0", and the next table pointer section 162 becomes all "1" since there is no linked data management table. , and the registration information area 151 of each data management element is all "1".

【0019】図2は情報削除処理を示す流れ図で、例え
ば図3の(a) に示すようにデータ管理テーブル12
のデータ管理エレメント12bのキー名「UNIX」に
対応したデータ「OS」を削除する場合について述べる
と、前記検索情報レジスタ18にはキー名「UNIX」
が格納される。
FIG. 2 is a flowchart showing the information deletion process. For example, as shown in FIG. 3(a), the data management table 12
Describing the case of deleting the data "OS" corresponding to the key name "UNIX" in the data management element 12b, the search information register 18 contains the key name "UNIX".
is stored.

【0020】そしてハッシュ関数部19、ハッシュテー
ブル17を使用して削除位置決定処理を行う。すなわち
キー名「UNIX」をハッシュ関数部19に入力してハ
ッシュ値を求め、そのハッシュ値からハッシュテーブル
17の1つのエントリー171 を検索する。そしてそ
の検索したエントリー171 にはデータ管理テーブル
12の先頭アドレスが格納されている。
Then, the hash function unit 19 and the hash table 17 are used to determine the deletion position. That is, the key name "UNIX" is input to the hash function section 19 to obtain a hash value, and one entry 171 of the hash table 17 is searched from the hash value. The searched entry 171 stores the start address of the data management table 12.

【0021】続いてデータ管理テーブル12の各データ
管理エレメント12a,12b,12cのキー部153
 のキー名と検索情報レジスタ18のキー名「UNIX
」とを照合して該当するデータ管理エレメント12bの
位置を見つける。続いて未登録情報書込み処理を行う。 この処理はデータ管理エレメント12bの登録情報領域
151 に未登録を示すオール「1」を書き込む。そし
て最後にカウンタデクリメント処理を行う。この処理は
データ管理エレメントカウンタ161 の内容を−1す
る。こうしてデータ「OS」が削除された後のデータ管
理テーブル12は図3の(b)に示すようになる。
Next, the key part 153 of each data management element 12a, 12b, 12c of the data management table 12
key name and search information register 18 key name “UNIX
” to find the position of the corresponding data management element 12b. Next, unregistered information writing processing is performed. This process writes all "1"s indicating non-registration into the registration information area 151 of the data management element 12b. Finally, counter decrement processing is performed. This process increments the contents of the data management element counter 161 by 1. The data management table 12 after the data "OS" is thus deleted looks like the one shown in FIG. 3(b).

【0022】図4は情報登録処理を示す流れ図で、これ
は先ずデータ管理テーブル有無判定処理を行う。この処
理では前記検索情報レジスタ18に格納されているキー
名から前記ハッシュ関数部19によってハッシュ値を求
める。そしてこのハッシュ値によりハッシュテーブル1
7の1エントリーを検索し、このエントリーにデータ管
理テーブルへのポインタがセットされているか否かをチ
ェックする。もしエントリーがオール「1」であればポ
インタがセットされていない、すなわち該当するデータ
管理テーブルが無いと判断し、続いてデータ管理テーブ
ル作成処理を行う。
FIG. 4 is a flowchart showing information registration processing, which first performs data management table presence/absence determination processing. In this process, a hash value is determined by the hash function section 19 from the key name stored in the search information register 18. And based on this hash value, hash table 1
7, and check whether a pointer to the data management table is set in this entry. If the entries are all "1", it is determined that the pointer is not set, that is, there is no corresponding data management table, and then data management table creation processing is performed.

【0023】このデータ管理テーブル作成処理ではデー
タ管理テーブルを作成するが、このときデータ管理ヘッ
ダのデータ管理エレメントカウンタ161 を「0」に
し、次テーブルポインタ部162 にはオール「1」を
格納する。また各管理エレメントの登録情報領域151
 にもオール「1」を書込む。
In this data management table creation process, a data management table is created. At this time, the data management element counter 161 of the data management header is set to "0", and all "1"s are stored in the next table pointer section 162. In addition, the registration information area 151 of each management element
All "1"s are written in the fields.

【0024】続いてハッシュテーブルのエントリー設定
処理を行う。この処理では先に求めたハッシュ値から得
られるハッシュテーブル17の1エントリーに今回作成
したデータ管理テーブルの先頭アドレスを格納する。
Subsequently, hash table entry setting processing is performed. In this process, the head address of the data management table created this time is stored in one entry of the hash table 17 obtained from the previously determined hash value.

【0025】続いて登録処理を行う。この処理ではデー
タ管理エレメントカウンタ161 を+1し、1つのデ
ータ管理エレメントの各領域151 〜154 にそれ
ぞれ情報を格納する。すなわち登録情報領域151 に
「0」を格納し、キー名長さ領域152 にキー名の長
さを格納し、キー部153 にキー名を格納し、データ
部154 にデータを格納する。こうして登録処理を終
了する。
[0025] Next, registration processing is performed. In this process, the data management element counter 161 is incremented by 1, and information is stored in each of the areas 151 to 154 of one data management element. That is, "0" is stored in the registration information area 151, the length of the key name is stored in the key name length area 152, the key name is stored in the key section 153, and data is stored in the data section 154. In this way, the registration process ends.

【0026】またハッシュテーブル17の検索された1
エントリーにデータ管理テーブルへのポインタ(先頭ア
ドレス)がセットされていると、このときは該当するデ
ータ管理テーブルが存在することになり、データ登録位
置決定処理を行う。
[0026] Also, the searched 1 of the hash table 17
If a pointer (starting address) to the data management table is set in the entry, it means that the corresponding data management table exists, and data registration position determination processing is performed.

【0027】このデータ登録位置決定処理ではエントリ
ーの先頭アドレスによって該当するデータ管理テーブル
を検索し、そのデータ管理テーブルのデータ管理エレメ
ントカウンタ161 をチェックする。そしてそのカウ
ンタ161のカウント値がmよりも小さいか否かをチェ
ックする。なお、このときのmはデータ管理テーブルの
総データ管理エレメント数となっている。
In this data registration position determination process, a corresponding data management table is searched based on the starting address of the entry, and the data management element counter 161 of the data management table is checked. Then, it is checked whether the count value of the counter 161 is smaller than m. Note that m at this time is the total number of data management elements in the data management table.

【0028】そしてカウンタ161 のカウント値がm
よりも小さい場合はそのデータ管理テーブルに未登録の
データ管理エレメントがあると判断して登録処理を行う
。 この登録処理は登録情報領域151 がオール「1」と
なっているデータ管理エレメントを検索し、前記同様に
データ管理エレメントカウンタ161 を+1し、未登
録のデータ管理エレメントの各領域151 〜154 
にそれぞれ「0」、キー名の長さ、キー名、データを格
納する。 こうして登録処理を終了する。
Then, the count value of the counter 161 is m
If it is smaller than , it is determined that there is an unregistered data management element in the data management table, and registration processing is performed. This registration process searches for data management elements whose registration information area 151 is all "1", increments the data management element counter 161 by 1 in the same way as above, and registers each area 151 to 154 of the unregistered data management element.
"0", the length of the key name, the key name, and the data are stored in each of the fields. In this way, the registration process ends.

【0029】またカウンタ161 のカウント値がmと
等しい場合はそのデータ管理テーブルに未登録のデータ
管理エレメントが無いと判断し、次テーブルポインタ1
62 のポインタで指定されるデータ管理テーブルに対
して同様の処理を行う。そしてもしそのデータ管理テー
ブルに未登録のデータ管理エレメントがあれば前記同様
の登録処理を行う。
If the count value of the counter 161 is equal to m, it is determined that there is no unregistered data management element in the data management table, and the next table pointer 1 is
Similar processing is performed on the data management table specified by the pointer 62. If there is an unregistered data management element in the data management table, the same registration process as described above is performed.

【0030】しかし次テーブルポインタ162 がオ−
ル「1」となっているデータ管理テーブルまで検索して
も未登録のデータ管理エレメントが無い場合にはデータ
管理テーブル作成処理を行う。
However, the next table pointer 162 is
If there are no unregistered data management elements even if the data management table is searched up to the data management table with the number "1", data management table creation processing is performed.

【0031】このデータ管理テーブル作成処理は前記同
様データ管理テーブルを作成し、そのときデータ管理ヘ
ッダのデータ管理エレメントカウンタ161 を「0」
にし、次テーブルポインタ部162 にはオール「1」
を格納する。また各管理エレメントの登録情報領域15
1 にもオール「1」を書込む。
In this data management table creation process, a data management table is created in the same manner as described above, and at this time, the data management element counter 161 of the data management header is set to "0".
and the next table pointer section 162 is all "1".
Store. In addition, the registration information area 15 of each management element
Write all “1” to 1 as well.

【0032】続いて次テーブルポインタ部の作成処理を
行う。この処理では新規データ管理テーブル作成前の最
終データ管理テーブルの次テーブルポインタ部に新規に
作成されたデータ管理テーブルの先頭アドレスを格納し
てリンクをとる。
Next, the next table pointer section is created. In this process, the start address of the newly created data management table is stored in the next table pointer section of the final data management table before creation of the new data management table, and a link is created.

【0033】続いて登録処理を行う。この登録処理はデ
ータ管理エレメントカウンタ161を+1し、1つのデ
ータ管理エレメントの各領域151 〜154 にそれ
ぞれ「0」、キー名の長さ、キー名、データを格納する
。こうして登録処理を終了する。
[0033] Next, registration processing is performed. This registration process increments the data management element counter 161 by 1, and stores "0", the length of the key name, the key name, and the data in each of the areas 151 to 154 of one data management element. In this way, the registration process ends.

【0034】さらにデータの検索処理は、検索情報レジ
スタ18のキー名をハッシュ関数部19に入力してハッ
シュ値を求め、このハッシュ値からハッシュテーブル1
7のエントリーを検索する。そしてその検索したエント
リー171 の先頭アドレスからデータ管理テーブルを
検索し、さらにそのデータ管理テーブルの各データ管理
エレメントのキー部153 に格納されているキー名と
検索情報レジスタ18のキー名を照合して該当するデー
タ管理エレメントを検索する。このとき登録情報領域が
オール「1」となっている未登録のデータ管理エレメン
トについてはキー名照合の対象外となる。
Furthermore, the data search process is performed by inputting the key name of the search information register 18 into the hash function section 19 to obtain a hash value, and from this hash value, the hash table 1 is
Search for 7 entries. Then, the data management table is searched from the start address of the searched entry 171, and the key name stored in the key section 153 of each data management element of the data management table is compared with the key name of the search information register 18. Search for the appropriate data management element. At this time, unregistered data management elements whose registered information areas are all "1" are not subject to key name verification.

【0035】照合は先ずキー名の長さについて行い、キ
ー名の長さが一致していれば続いてキー名自体を照合し
、キー名も一致していれば検索を終了し、目的のデータ
をデータ部154 から読み出す。
[0035] First, the length of the key name is compared, and if the lengths of the key names match, then the key name itself is compared, and if the key names also match, the search is completed and the target data is searched. is read from the data section 154.

【0036】このような構成の実施例においては、デー
タを削除するときには検索情報レジスタ18に格納され
ているキー名からハッシュ関数部19によりハッシュ値
を求め、そのハッシュ値によりハッシュテーブル17の
エントリーを検索する。そして検索したエントリーの先
頭アドレスにより該当するデータ管理テーブルを検索す
る。
In the embodiment with such a configuration, when deleting data, the hash function section 19 calculates a hash value from the key name stored in the search information register 18, and the entry in the hash table 17 is determined based on the hash value. search for. Then, the corresponding data management table is searched based on the start address of the searched entry.

【0037】そして該当するデータ管理テーブルのデー
タ管理エレメントのうちデータが登録されているデータ
管理エレメントのキー名部153 からキー名を読出し
て検索情報レジスタ18のキー名と長さ及びキー名を照
合する。
Then, the key name is read from the key name section 153 of the data management element in which data is registered among the data management elements of the corresponding data management table, and the length and key name are compared with the key name in the search information register 18. do.

【0038】そしてキー名の長さ及びキー名の両方とも
一致しているデータ管理エレメントが見つかればそのデ
ータ管理エレメントの登録情報領域をオール「1」にし
てデータ削除を行う。このようにデータ管理エレメント
の登録情報領域に単にオール「1」を書込むのみの簡単
な処理でデータの削除ができる。
If a data management element whose key name length and key name both match is found, the registration information area of that data management element is set to all "1" and the data is deleted. In this way, data can be deleted by a simple process of simply writing all "1"s into the registration information area of the data management element.

【0039】また該当するデータ管理エレメントの検索
において、登録情報領域がオール「1」となっているデ
ータ管理エレメントについては照合を行わずに飛ばすこ
とができる。
[0039] Furthermore, in searching for a corresponding data management element, data management elements whose registration information area is all "1" can be skipped without being compared.

【0040】またデータ管理テーブルの各データ管理エ
レメントは記憶領域に連続して形成されているので、あ
るデータ管理エレメントの照合が終了して次のデータ管
理エレメントの照合を行うときには、データ管理エレメ
ントの大きさをtとするとあるデータ管理エレメントの
先頭アドレスに単にtを加算すればよく、また間に未登
録のデータ管理エレメントがあってもその分tを加算す
ればよい。
Furthermore, since each data management element of the data management table is formed consecutively in the storage area, when the verification of one data management element is completed and the next data management element is verified, the data management element is If the size is t, it is sufficient to simply add t to the start address of a certain data management element, and even if there is an unregistered data management element in between, t may be added accordingly.

【0041】このようにデータ削除時において次のデー
タ管理エレメントを検索するためのアドレス指定が簡単
にできるので、データ削除処理の時間短縮を図ることが
でき、データ管理エレメントの検索処理を効率よくでき
る。
[0041] In this way, when deleting data, the address for searching for the next data management element can be easily specified, so the time for data deletion processing can be shortened, and the search processing for data management elements can be made more efficient. .

【0042】これはデータを読み出すときの検索処理や
データ登録時において登録情報領域がオール「1」とな
っているデータ管理エレメントを検索する場合も同様に
処理時間の短縮を図ることができる。しかも使用するハ
ッシュ関数部及びハッシュテーブルは1つでよく構成が
簡単である。
This can similarly reduce the processing time when searching for a data management element whose registration information area is all "1" during the search process when reading data or when registering data. Moreover, only one hash function section and one hash table are used, and the configuration is simple.

【0043】なお、前記実施例ではデータ管理エレメン
トにキー名部及びデータ部を設けてキー名及びデータを
それぞれ格納するようにしたが必ずしもこれに限定され
るものではなく、データ管理エレメントにはキー名への
ポインタ部及びデータへのポインタ部を設け、実際のキ
ー名やデータはポインタ部のポインタで指示される別の
記憶領域に格納するようにしてもよい。
[0043] In the above embodiment, the data management element is provided with a key name section and a data section to store the key name and data respectively, but the invention is not necessarily limited to this. A pointer section to the name and a pointer section to the data may be provided, and the actual key name and data may be stored in a separate storage area indicated by the pointer in the pointer section.

【0044】[0044]

【発明の効果】以上詳述したように本発明によれば、デ
ータを削除したり登録するのに要する時間の短縮を図る
ことができて処理効率を向上でき、しかも構成が簡単な
情報削除登録方式を提供できるものである。
Effects of the Invention As detailed above, according to the present invention, it is possible to shorten the time required to delete or register data, improve processing efficiency, and provide information deletion registration with a simple configuration. It is possible to provide a method.

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

【図1】本発明の実施例を示すブロック図。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】同実施例の情報削除処理を示す流れ図。FIG. 2 is a flowchart showing information deletion processing in the same embodiment.

【図3】同実施例における情報削除の一例を示す図。FIG. 3 is a diagram showing an example of information deletion in the embodiment.

【図4】同実施例の情報登録処理を示す流れ図。FIG. 4 is a flowchart showing information registration processing in the same embodiment.

【図5】従来例を示すブロック図。FIG. 5 is a block diagram showing a conventional example.

【符号の説明】[Explanation of symbols]

11…記憶装置、12,13,14…データ管理テーブ
ル、12a〜12c,13a〜13c,14a〜14c
…データ管理エレメント、12d,13d,14d…デ
ータ管理ヘッダ、17…ハッシュテーブル、19…ハッ
シュ関数部。
11... Storage device, 12, 13, 14... Data management table, 12a-12c, 13a-13c, 14a-14c
...Data management element, 12d, 13d, 14d...Data management header, 17...Hash table, 19...Hash function section.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  検索情報からハッシュ関数によりハッ
シュ値を求め、そのハッシュ値によりハッシュテーブル
を参照して記憶装置のデータ削除やデータ登録を行う場
合に、前記記憶装置に、データが登録されているか否か
を示す情報が格納される登録情報領域、キー名の長さ情
報が格納される領域、キー名、データ名を管理する情報
が格納される領域からなるデータ管理エレメントを記憶
領域に対して複数連続して格納してグループを形成する
とともにそのグループの各データ管理エレメントを管理
するデータ管理ヘッダからなるデータ管理テーブルを複
数設け、データ削除時には削除対象となるデータのハッ
シュ値からハッシュテーブルを参照して対応するデータ
管理テーブルを検索し、さらにそのデータ管理テーブル
から対応するデータ管理エレメントを検索してそのデー
タ管理エレメントの登録情報領域に未登録を示すデータ
を書込み、データ登録時にはそのデータのハッシュ値か
らハッシュテーブルを参照して対応するデータ管理テー
ブルを検索するとともにそのデータ管理テーブルの各デ
ータ管理エレメントの中で登録情報領域に未登録を示す
データが書込まれているデータ管理エレメントを検索し
、その検索されたデータ管理エレメントの登録情報領域
、キー名の長さ情報が格納される領域、キー名、データ
名を管理する情報が格納される領域にそれぞれ対応する
データを書込むことを特徴とする情報削除登録方式。
Claim 1: When a hash value is obtained from search information using a hash function and data is deleted or registered in a storage device by referring to a hash table using the hash value, whether data is registered in the storage device or not. A data management element consisting of a registration information area where information indicating whether or not the key name is stored, an area where key name length information is stored, and an area where information that manages the key name and data name is stored for the storage area. Multiple data management tables are provided that consist of data management headers that store multiple data in series to form groups and manage each data management element in the group, and when deleting data, the hash table is referenced from the hash value of the data to be deleted. Search the corresponding data management table, search the corresponding data management element from the data management table, write data indicating unregistered to the registration information area of the data management element, and when registering the data, hash the data. The hash table is referenced from the value to search for the corresponding data management table, and among the data management elements in the data management table, the data management element in which data indicating unregistered is written in the registration information area is searched. , the corresponding data is written in the registration information area of the searched data management element, the area where the length information of the key name is stored, and the area where the information for managing the key name and data name is stored, respectively. Information deletion registration method.
JP3116234A 1991-05-21 1991-05-21 Information deletion and registration system Pending JPH04344567A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3116234A JPH04344567A (en) 1991-05-21 1991-05-21 Information deletion and registration system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3116234A JPH04344567A (en) 1991-05-21 1991-05-21 Information deletion and registration system

Publications (1)

Publication Number Publication Date
JPH04344567A true JPH04344567A (en) 1992-12-01

Family

ID=14682141

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3116234A Pending JPH04344567A (en) 1991-05-21 1991-05-21 Information deletion and registration system

Country Status (1)

Country Link
JP (1) JPH04344567A (en)

Similar Documents

Publication Publication Date Title
US8335889B2 (en) Content addressable storage systems and methods employing searchable blocks
US20230267153A1 (en) Integrated index blocks and searching in blockchain systems
US6484181B2 (en) Method and system for handling foreign key update in an object-oriented database environment
CN109446362B (en) Graph database structure based on external memory, graph data storage method and device
WO2018064962A1 (en) Data storage method, electronic device and computer non-volatile storage medium
JP3318834B2 (en) Data file system and data retrieval method
JPH10320423A (en) Method and device for executing connection question in data base system
JPH09506195A (en) Extended attribute file system
CN114020790A (en) Data query method and device
JPH02231675A (en) Information retrieving apparatus and method
US20170277687A1 (en) System and methods for searching documents in a relational database using a tree structure stored in a tabular format
JP3056704B2 (en) Data management device
JPH04344567A (en) Information deletion and registration system
JPH07234879A (en) Information processor and data base retrieving method
EP2164005B1 (en) Content addressable storage systems and methods employing searchable blocks
JP3649472B2 (en) Information retrieval device
JPH096653A (en) Data base checking information processor
JP2003030040A (en) Hush indexes of object database system and non-unique index management system
JP2002041567A (en) Database managing method, device for executing the same, and recording medium on which processing program therefor is recorded
JPH06103134A (en) Constructing method for index
JPH05143648A (en) Information register and retrieval device
JPH0546666A (en) Information retrieving device
JP2000066933A (en) Time series data management system
JPH05120340A (en) Routing address managing method
JP2747009B2 (en) Record addition method for indexed sequential files