JP2003030040A - Hush indexes of object database system and non-unique index management system - Google Patents

Hush indexes of object database system and non-unique index management system

Info

Publication number
JP2003030040A
JP2003030040A JP2001211499A JP2001211499A JP2003030040A JP 2003030040 A JP2003030040 A JP 2003030040A JP 2001211499 A JP2001211499 A JP 2001211499A JP 2001211499 A JP2001211499 A JP 2001211499A JP 2003030040 A JP2003030040 A JP 2003030040A
Authority
JP
Japan
Prior art keywords
index
hash
record
hash bucket
database
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
JP2001211499A
Other languages
Japanese (ja)
Inventor
Yasushi Kotake
靖司 古武
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.)
NEC Communication Systems Ltd
Original Assignee
NEC Communication Systems 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 NEC Communication Systems Ltd filed Critical NEC Communication Systems Ltd
Priority to JP2001211499A priority Critical patent/JP2003030040A/en
Publication of JP2003030040A publication Critical patent/JP2003030040A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To realize high speed retrieval by enabling various kinds of index retrieval to perform to one table. SOLUTION: This object database system is provided with a storage device 100 in which a database is constructed, a storage device 101 to store hush pointers, a storage device 102 to store a group of hush buckets, an index ID generator 200 to generate index IDs, a retrieving device 201 to perform record retrieval in the database by using the hush pointers and the group of hush buckets and a storage operating device 202 to read/write the record to the database and to generate the hush buckets and to store them in the storage device 102 in the case of inserting the record into the database.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、オブジェクトデー
タベースにおいて、1つのテーブルに対して複数のイン
デックスをつけることにより多様なインデックス検索を
高速化できるオブジェクトデータベースシステムの複数
ハッシュインデックスおよび非ユニークインデックス管
理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multi-hash index and non-unique index management system for an object database system that can speed up various index searches by adding a plurality of indexes to one table in an object database. .

【0002】[0002]

【従来の技術】さまざまなオペレーティングシステム上
でさまざまなデータベースが存在し、それぞれのデータ
ベースはそのデータベースに挿入されているレコードを
検索して取り出す際により高速に検索できる方式を必要
としている。既存のデータベースを見ると、インデック
ス検索により高速検索が可能なデータベースがほとんど
である。
2. Description of the Related Art There are various databases on various operating systems, and each database needs a method that enables faster retrieval when retrieving and retrieving records inserted in the database. Looking at existing databases, most of the databases can be searched at high speed by index search.

【0003】[0003]

【発明が解決しようとする課題】従来では、1つのテー
ブルに対して複数または1つのインデックスを付けるこ
とが可能であるが、ハッシ検索による非ユニークインデ
ックスをサポートしていないため、さまざまな検索キー
を利用した検索を行うときには、順次検索を行わなけれ
ばならない場合が存在するという課題があった。
Conventionally, it is possible to add a plurality of or one index to one table, but since a non-unique index by hash search is not supported, various search keys can be used. There is a problem in that there are cases where it is necessary to perform a sequential search when performing a search that is used.

【0004】本発明はこのような課題を解決するために
なされたものであり、1つのテーブルに対していろいろ
なインデックス検索が可能な高速検索を実現できるオブ
ジェクトデータベースシステムの複数ハッシュインデッ
クスおよび非ユニークインデックス管理方式を提供する
ことを目的とする。
The present invention has been made to solve the above problems, and has a plurality of hash indexes and a non-unique index of an object database system capable of realizing high-speed search capable of performing various index searches on one table. The purpose is to provide a management method.

【0005】また、複数のレコードを検索する際に順次
検索以上に高速な検索が可能であるオブジェクトデータ
ベースシステムの複数ハッシュインデックスおよび非ユ
ニークインデックス管理方式を提供することを目的とす
る。
Another object of the present invention is to provide a multi-hash index and non-unique index management system for an object database system, which enables faster retrieval than sequential retrieval when retrieving a plurality of records.

【0006】[0006]

【課題を解決するための手段】本発明に係るオブジェク
トデータベースシステムの複数ハッシュインデックスお
よび非ユニークインデックス管理方式は、データベース
に登録されているテーブルの属性と、そのテーブルの属
性に属する各レコードのインデックスフィールドをもと
に、前記各レコードのユニークインデックスまたは非ユ
ニークインデックスに関するインデックスIDを作成す
るインデックスID生成手段と、前記データベース上の
レコードを指すアドレスを持ち、同一のインデックスI
Dを持つハッシュバケットとチェーン構造によって繋が
っているハッシュバケット群を記憶するハッシュバケッ
ト記憶手段と、前記インデックスIDとそれに対応する
ハッシュバケットの対応関係を規定するハッシュポイン
タを記憶するハッシュポインタ記憶手段と、データベー
スに蓄積されているレコードの検索を前記ハッシュポイ
ンタ記憶手段が記憶したハッシュポインタと前記ハッシ
ュバケット記憶手段が記憶したハッシュバケットを利用
して高速検索する検索手段と、前記データベース内にレ
コードを挿入する際に前記ハッシュバケットを生成し前
記ハッシュバケット記憶手段に記憶させる記憶操作手段
とを備えたことを特徴とする。
SUMMARY OF THE INVENTION A multiple hash index and non-unique index management system for an object database system according to the present invention is provided with an attribute of a table registered in the database and an index field of each record belonging to the attribute of the table. An index ID generating means for creating an index ID relating to a unique index or a non-unique index of each record based on the above, and the same index I having an address pointing to the record on the database.
A hash bucket storage unit that stores a hash bucket group connected to a hash bucket having D by a chain structure; a hash pointer storage unit that stores a hash pointer that defines a correspondence relationship between the index ID and the corresponding hash bucket; Retrieval means for high-speed retrieval using a hash pointer stored in the hash pointer storage means and a hash bucket stored in the hash bucket storage means for retrieval of records accumulated in the database, and inserting a record in the database At this time, storage operation means for generating the hash bucket and storing it in the hash bucket storage means is provided.

【0007】本発明のオブジェクトデータベースシステ
ムの複数ハッシュインデックスおよび非ユニークインデ
ックス管理方式は、データベースに登録されているテー
ブルの属性と、そのテーブルの属性に属する各レコード
のインデックスフィールドをもとに、前記各レコードの
ユニークインデックスまたは非ユニークインデックスに
関するインデックスIDを作成し、前記データベース上
のレコードを指すアドレスを持ち、同一のインデックス
IDを持ちチェーン構造によって繋がっているハッシュ
バケット群、および、前記インデックスIDとそれに対
応するハッシュバケットの対応関係を規定するハッシュ
ポインタを利用し、前記データベースに蓄積されている
レコードを検索できるようにすることで、1つのテーブ
ルに対してユニークまたは非ユニークなインデックス検
索と高速検索を実現する。
The multiple hash index and non-unique index management method of the object database system of the present invention is based on the attributes of the table registered in the database and the index field of each record belonging to the attribute of the table. A hash bucket group that creates an index ID related to a unique index or a non-unique index of a record, has an address that points to a record on the database, has the same index ID, and is connected by a chain structure, and the index ID and the corresponding By using the hash pointer that defines the correspondence relationship of the hash buckets, the records accumulated in the database can be searched, so that a unique table can be obtained. Or to achieve a non-unique index search and fast retrieval.

【0008】[0008]

【発明の実施の形態】以下、本発明の実施の一形態につ
いて説明する。このオブジェクトデータベースシステム
の複数ハッシュインデックスおよび非ユニークインデッ
クス管理方式は、図1に示すようにハッシュポインタと
ハッシュバケット群から構成される。ハッシュポインタ
はインデックスIDとそれに対応するハッシュバケット
の対応表である。インデックスIDとは、テーブル名お
よびレコードのインデックス指定されている変数から一
意に決まる正数値であり、各レコードに対してインデッ
クスの数だけ存在する。ハッシュバケット群は複数のハ
ッシュバケットの集合であり、ハッシュバケットは、デ
ータベース上のレコードを指すアドレスを持ち、同一の
インデックスIDを持つハッシュバケットとチェーン構
造によって繋がっている。
BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of the present invention will be described below. The multiple hash index and non-unique index management system of this object database system is composed of a hash pointer and a hash bucket group as shown in FIG. The hash pointer is a correspondence table of index IDs and the corresponding hash buckets. The index ID is a positive value uniquely determined from the table name and the variable in which the index of the record is designated, and exists for each record by the number of indexes. The hash bucket group is a set of a plurality of hash buckets. The hash bucket has an address that points to a record on the database and is connected to a hash bucket having the same index ID by a chain structure.

【0009】また、図2に示すように、レコードがデー
タベースに挿入される場合は、そのレコードが属するテ
ーブルのインデックスとそのテーブル名からインデック
スIDを生成する。複数のインデックスがそのテーブル
に対して付加されている場合にはインデックス数だけイ
ンデックスIDが生成される。次にインデックスIDに
対応するハッシュバケットを生成し、ハッシュポインタ
の該当インデックスIDに対応するアドレスを参照して
アドレス値にナル(NULL)が設定されている場合に
は、そのアドレスに生成したハッシュバケットのアドレ
スを格納し、既に他のハッシュバケットのアドレスが設
定されている場合には、ハッシュバケットのチェーンの
最後に生成したハッシュバケットを繋げる。
Further, as shown in FIG. 2, when a record is inserted in the database, an index ID is generated from the index of the table to which the record belongs and the table name. When a plurality of indexes are added to the table, index IDs are generated by the number of indexes. Next, a hash bucket corresponding to the index ID is generated, and if the address value is set to NULL by referring to the address corresponding to the index ID of the hash pointer, the hash bucket generated at that address Is stored, and if the addresses of other hash buckets are already set, the hash buckets generated at the end of the chain of hash buckets are connected.

【0010】インデックス付きのレコードを検索する場
合は、インデックスIDを生成し、ハッシュポインタか
らハッシュバケットのアドレスを取得し、ハッシュバケ
ットのチェーンを順次検索することで該当レコードを検
索することが出来る。このようにして、1つのテーブル
に対して複数のインデックスをつけることによるインデ
ックス検索および非ユニークインデックスを許容するデ
ータベース構成を可能とする。
When searching for a record with an index, the index ID is generated, the address of the hash bucket is obtained from the hash pointer, and the chain of hash buckets is searched sequentially to find the corresponding record. In this way, a database configuration that allows index retrieval and non-unique index by attaching a plurality of indexes to one table becomes possible.

【0011】図3は、この実施の形態のオブジェクトデ
ータベースシステムの複数ハッシュインデックスおよび
非ユニークインデックス管理方式を実現するための各要
素とその構造を示すブロック図であり、データベースと
なる記憶装置100と、ハッシュポインタとなる記憶装
置(ハッシュポインタ記憶手段)101、ハッシュバケ
ット群を記憶する記憶装置(ハッシュバケット記憶手
段)102の3つの記憶装置と、インデックス IDの
生成を行うインデックスID生成装置(インデックスI
D生成手段)200、記憶装置100内のレコード検索
を行う検索装置(検索手段)201、記憶装置100へ
のレコードの読み出し/書き込みを行うことができる記
憶操作装置(記憶操作手段)202から構成されてい
る。
FIG. 3 is a block diagram showing each element and its structure for realizing the multiple hash index and non-unique index management system of the object database system of this embodiment, and a storage device 100 which is a database, Three storage devices, a storage device (hash pointer storage means) 101 that serves as a hash pointer and a storage device (hash bucket storage means) 102 that stores a hash bucket group, and an index ID generation device (index I) that generates an index ID.
D generation means) 200, a search device (search means) 201 for searching records in the storage device 100, and a storage operation device (storage operation means) 202 capable of reading / writing records in the storage device 100. ing.

【0012】記憶装置100はオブジェクトデータベー
スであり、その中には「加入者」という属性のテーブル
が存在し、この「加入者」というテーブルは「電話番
号」、「姓」、「名」「住所」、「年齢」の5つのフィ
ールドから構成される。そしてこの属性に属するレコー
ドが3つ(Record1,Record2,Reco
rd3)が存在する。「加入者」テーブルには検索のた
めのインデックスが2つ付けられており、インデックス
Aは加入者番号で検索できるユニークインデックス、イ
ンデックスBは年齢で検索できる非ユニークインデック
スとなっている。
The storage device 100 is an object database, in which a table having an attribute of "subscriber" exists, and the table of "subscriber" includes "telephone number", "surname", "first name" and "address". , And “age”. And there are three records that belong to this attribute (Record1, Record2, Record
rd3) is present. Two indexes for searching are attached to the "subscriber" table. Index A is a unique index that can be searched by subscriber number, and index B is a non-unique index that can be searched by age.

【0013】インデックスID生成装置200は、テー
ブル名と各レコードのインデックスフィールドから、あ
る一定のルールに従ってインデックスIDを作成するこ
とができる装置であり、図3の例の場合、例えば「加入
者」テーブルのRecord1のインデックスAに関す
るインデックスIDを作成する場合、テーブル名「加入
者」とRecord1の電話番号フィールドの「047
1−85−○××○」を利用してインデックスIDが作
成される。検索装置201は、記憶装置100内に蓄積
されているRecordの検索を記憶装置101のハッ
シュポインタと記憶装置102のハッシュバケット群を
利用して高速検索することが出来る装置である。
The index ID generation device 200 is a device that can generate an index ID from a table name and an index field of each record according to a certain rule. In the case of the example of FIG. 3, for example, a "subscriber" table is used. When creating an index ID related to the index A of Record 1 of the table 1, the table name “subscriber” and the telephone number field of Record 1 “047”
The index ID is created using "1-85-XXXXX". The search device 201 is a device that can perform a high-speed search for a record stored in the storage device 100 by using a hash pointer of the storage device 101 and a hash bucket group of the storage device 102.

【0014】記憶操作装置202は、記憶装置100の
データベース内へのレコードの挿入、前記データベース
内のレコードの更新、レコードの削除を可能とする装置
であり、前記データベース内にレコードを挿入する際に
はハッシュバケットを生成し、記憶装置102内に記憶
させる。
The storage operation device 202 is a device that enables the insertion of records into the database of the storage device 100, the updating of records within the database, and the deletion of records. When inserting records into the database, Generates a hash bucket and stores it in the storage device 102.

【0015】記憶装置101内の“X”はインデックス
BのためにRecord1およびレコード2の年齢フィ
ールドの“31”という値からインデックス生成装置2
00によって作られるインデックスIDであり、“Y”
はインデックスBのためにRecord3の年齢フィー
ルドの“28”からインデックスID生成装置200に
よって作られるインデックスID、“A”はインデック
スAのためにRecord1の電話番号フィールド“0
471−85−○××○”からインデックスID生成装
置200によって作られるインデックスID、同様に
“B”はインデックスAのためのレコード2の電話番号
フィールド“0471−85−××○○”から作られる
インデックスID、“C”はインデックスAのためのレ
コード3の電話番号フィールド“0471−85−○○
○×”から作られるインデックスIDである。
Since the "X" in the storage device 101 is the index B, the index generation device 2 uses the value "31" of the age field of Record1 and record 2.
It is an index ID created by 00 and is "Y"
Is an index ID generated by the index ID generation device 200 from the age field “28” of Record 3 for index B, and “A” is the telephone number field “0” of Record 1 for index A.
471-85-XXXXX, the index ID created by the index ID generating apparatus 200, similarly "B" is created from the telephone number field "0471-85-XXXX" of record 2 for index A. The index ID, "C," is the telephone number field "0471-85- ○○ of record 3 for index A."
It is an index ID created from "O".

【0016】次に、動作について説明する。先ず、記憶
装置100へのレコードの挿入について説明する。図4
は、この記憶装置100へのレコード挿入時の処理手順
を示すシーケンス図であり、記憶装置100の加入者テ
ーブルへのRecord1の挿入は、以下のような手順
で行われる。すなわち、記憶操作装置202は記憶装置
100から加入者テーブルに関する情報を取得する(ス
テップS1)。この結果、記憶装置100から加入者テ
ーブルに関する情報が取得される。この情報には加入者
テーブルにインデックスAとインデックスBが付加され
ているという情報を含んでいる(ステップS2)。記憶
操作装置202は、挿入するレコード(Record)
に対してインデックスAのためのインデックスを作成す
るために、レコードの電話番号フィールドの”0471
−85−○××○”とテーブル名”加入者”をインデッ
クスID生成装置200に対して送出し、インデックス
IDを取得する(ステップS3)。インデックスID生
成装置200は、記憶操作装置202から受け取った
“0471−85−○××○”と“加入者”からインデ
ックスIDを計算し、その結果“A”を記憶操作装置2
02に対して送出する(ステップS4)。
Next, the operation will be described. First, the insertion of a record into the storage device 100 will be described. Figure 4
FIG. 4 is a sequence diagram showing a processing procedure at the time of inserting a record into the storage device 100. Insertion of Record1 into the subscriber table of the storage device 100 is performed by the following procedure. That is, the storage operation device 202 acquires information about the subscriber table from the storage device 100 (step S1). As a result, the information about the subscriber table is acquired from the storage device 100. This information includes information that the index A and the index B are added to the subscriber table (step S2). The storage operation device 202 inserts a record (Record)
To create an index for index A against "0471 in the phone number field of the record.
"-85-XXXXX" and the table name "subscriber" are sent to the index ID generation apparatus 200 to acquire the index ID (step S3), which is received from the storage operation apparatus 202. The index ID is calculated from "0471-85-XXXXX" and "subscriber", and the result "A" is stored in the storage operation device 2
The data is sent to No. 02 (step S4).

【0017】記憶装置101のハッシュポインタからイ
ンデックスID=“A”が指すハッシュバケットのアド
レスを参照し(ステップS5)、ナルが設定されていれ
ばハッシュポインタのインデックスID=“A”が指す
ハッシュバケットのアドレスを設定し、ナルでなければ
ハッシュバケットのチェーンの最後に作成したハッシュ
バケットを付ける。ハッシュバケットのアドレスの設定
後、記憶装置102に作成したハッシュバケットを挿入
する(ステップS6)。前記ステップS3と同様に、記
憶操作装置202は挿入するレコードに対してインデッ
クスBのためのインデックスを作成するために、レコー
ドの年齢フィールドの“31”とテーブル名“加入者”
をインデックスID生成装置200に対して送出しイン
デックスIDを取得する(ステップS7)。前記ステッ
プS4と同様、インデックスID生成装置200は記憶
操作装置202から受け取った“31”と“加入者”か
らインデックスIDを計算し、その結果“X”を記憶操
作装置202に対して送出する(ステップS8)。記憶
装置101のハッシュポインタからインデックスID=
“X”が指すハッシュバケットのアドレスを参照し(ス
テップS9)、ナルが設定されていればハッシュポイン
タのインデックスID=“X”が指すハッシュバケット
のアドレスを設定し、ナルでなければハッシュバケット
のチェーンの最後に作成したハッシュバケットをつけ
る。ハッシュバケットのアドレスの設定後、記憶装置1
02に作成したハッシュバケットを挿入する(ステップ
S10)。インデックス作成処理終了後、記憶操作装置
202は記憶装置100に対してレコードの挿入を行う
(ステップS11)。
The address of the hash bucket pointed to by the index ID = "A" is referenced from the hash pointer of the storage device 101 (step S5). If null is set, the hash bucket index ID = "A" points to the hash bucket. Set the address of, and if it is not null, attach the created hash bucket at the end of the chain of hash buckets. After setting the address of the hash bucket, the created hash bucket is inserted into the storage device 102 (step S6). Similar to step S3, the storage controller 202 creates an index for the index B for the record to be inserted, so that the age field of the record is "31" and the table name is "subscriber".
Is sent to the index ID generation device 200 to acquire the index ID (step S7). Similar to step S4, the index ID generation device 200 calculates an index ID from "31" and "subscriber" received from the storage operation device 202, and as a result sends "X" to the storage operation device 202 ( Step S8). From the hash pointer of the storage device 101, the index ID =
The address of the hash bucket pointed to by "X" is referred to (step S9), and if the null is set, the address of the hash bucket pointed to by the hash pointer index ID = "X" is set. Attach the hash bucket created at the end of the chain. After setting the address of the hash bucket, the storage device 1
The created hash bucket is inserted into 02 (step S10). After the index creation processing is completed, the storage operation device 202 inserts a record into the storage device 100 (step S11).

【0018】次に、記憶装置100のレコードの検索に
ついて説明する。先ずインデックスAを利用したレコー
ドの検索(ユニークインデックスの場合)について説明
すると、図3において、検索装置201が記憶装置10
0に挿入されている加入者テーブルの電話番号「047
1−85−××○○」を検索する場合、インデックスA
のキーが加入者テーブルの電話番号となっているため、
インデックスAを利用してレコードの検索が行われる。
検索装置201はインデックスID生成装置200を利
用して、テーブル名「加入者」と電話番号「0471−
85−××○○」からインデックスID=“B”を取得
する。検索装置201はインデックスID取得後、ハッ
シュポインタである記憶装置101のインデックスID
=“B”を参照して、ハッシュバケットのアドレスを取
得する。続いて検索装置201は該当インデックスID
のハッシュバケット内のレコードへのアドレスを取得す
る。このアドレスは記憶装置100内のレコードのアド
レスを示す情報であり、記憶装置100内のレコードを
参照して、電話番号フィールドの値が「0471−85
−××○○」であれば、該当レコードと判断されて検索
を終了し、電話番号フィールドの値が違う場合にはハッ
シュバケット内のnext(連なるハッシュバケットの
チェーンの次のハッシュバケットを示すアドレス)を取
得して、そのハッシュバケット内のレコードへのアドレ
スを取得し、電話番号フィールドが「0471−85−
××○○」に一致しているかどうかを確認する。これを
繰り返すことによりレコードの検索は終了する。
Next, a search for a record in the storage device 100 will be described. First, a description will be given of a record search using the index A (in the case of a unique index). In FIG.
The telephone number "047" of the subscriber table inserted in 0
1-85- ×× ○○ ”
Since the key of is the telephone number of the subscriber table,
A record is searched using the index A.
The search device 201 uses the index ID generation device 200 to create a table name “subscriber” and a telephone number “0471-”.
The index ID = “B” is acquired from “85-XXXXX”. After the search device 201 acquires the index ID, the index ID of the storage device 101 that is a hash pointer
= “B” is referred to obtain the address of the hash bucket. Then, the search device 201 displays the corresponding index ID.
Get the address to a record in the hash bucket of. This address is information indicating the address of the record in the storage device 100, and the record in the storage device 100 is referred to so that the value of the telephone number field is "0471-85.
-×× ○○ ”, it is determined that the record is a relevant record, the search is terminated, and when the value of the telephone number field is different, next in the hash bucket (the address indicating the next hash bucket in the chain of consecutive hash buckets ) Is obtained, the address to the record in the hash bucket is obtained, and the telephone number field is “0471-85-
XX ○○ ”is checked. By repeating this, the record search is completed.

【0019】次に、インデックスBを利用したレコード
の検索(非ユニークインデックスの場合)について説明
する。図3において、検索装置である検索装置201が
記憶装置100に挿入されている加入者テーブルの年齢
「31」を検索する場合、インデックスBのキーが加入
者テーブルの年齢となっているため、インデックスBを
利用してレコードの検索が行われる。検索装置201は
インデックスID生成装置200を利用して、テーブル
名「加入者」と年齢「31」からインデックスID=
“X”を取得する。検索装置201はインデックスID
取得後、ハッシュポインタである記憶装置101のイン
デックスID=“X”を参照してハッシュバケットのア
ドレスを取得する。続いて検索装置201は該当インデ
ックスIDのハッシュバケット内のレコードへのアドレ
スを取得する。このアドレスは記憶装置100内のレコ
ードのアドレスを示す情報であり、記憶装置100内の
レコードを参照して、年齢フィールドの値が「31」で
あれば、該当レコードと判断される。年齢フィールドの
値が異なる場合、ハッシュバケット内のnextを取得
して順次レコードの検索を行う。この連なったハッシュ
バケットのチェーンを検索することにより、加入者テー
ブルの年齢フィールドの値が「31」のレコード(図3
におけるRecord1およびRecord2)をすべ
て検索することが出来る。
Next, a search for a record using the index B (in the case of a non-unique index) will be described. In FIG. 3, when the search device 201, which is a search device, searches for the age “31” in the subscriber table inserted in the storage device 100, the index B key is the age of the subscriber table. A record is searched using B. The search device 201 uses the index ID generation device 200 to calculate the index ID = from the table name “subscriber” and age “31”.
Get "X". Search device 201 is the index ID
After the acquisition, the address of the hash bucket is acquired by referring to the index ID = “X” of the storage device 101, which is the hash pointer. Then, the search device 201 acquires the address to the record in the hash bucket of the corresponding index ID. This address is information indicating the address of the record in the storage device 100. If the value of the age field is "31" by referring to the record in the storage device 100, it is determined that the record is a corresponding record. When the values of the age fields are different, next in the hash bucket is acquired and records are searched sequentially. By searching this chain of hash buckets, a record in which the value of the age field of the subscriber table is "31" (see FIG. 3).
It is possible to search all Record1 and Record2) in.

【0020】以上のように、この実施の形態によれば、
1つのテーブルに複数のインデックスを付けることを可
能としているため、1つのテーブルに対して付加したイ
ンデックスの数だけいろいろなアプローチでレコードの
インデックスを使った高速検索が可能となり、1つのテ
ーブルに対していろいろなインデックス検索を行える効
果がある。
As described above, according to this embodiment,
Since it is possible to add multiple indexes to one table, it is possible to perform high-speed search using the index of the record by various approaches according to the number of indexes added to one table, and to one table. This has the effect of performing various index searches.

【0021】また、非ユニークインデックスをサポート
しており、図3の例で例えば加入者テーブルに1000
0件のレコードが挿入されていて、そのうち年齢の値が
31のレコードが100件あると仮定したときに、順次
検索では100から10000回のレコード検索を必要
とするが、インデックス検索であれば100件程度の検
索で十分であり、複数のレコードを検索する際に順次検
索以上に高速な検索が可能となる効果がある。
In addition, a non-unique index is supported, and in the example of FIG.
Assuming that 0 records are inserted and 100 of them have an age value of 31, there are 100 to 10,000 record searches required for sequential search, but 100 records for index search. It is sufficient to search about the number of records, and when searching a plurality of records, there is an effect that a search can be performed faster than a sequential search.

【0022】なお、以上説明した実施の形態では、デー
タベースに登録されているテーブルが便宜上一つとなっ
ているが、データベースに複数のテーブルが登録されて
いる場合にも適用可能である。また、インデックスに利
用されているキーが1つである場合の例が示されている
が、1つのインデックスに対して複数のキーが存在する
場合にも適用される。
In the embodiment described above, the number of tables registered in the database is one for the sake of convenience, but it is also applicable to the case where a plurality of tables are registered in the database. Also, an example in which the number of keys used in the index is one is shown, but the present invention is also applied to the case where there are a plurality of keys for one index.

【0023】[0023]

【発明の効果】以上のように、本発明によれば、各レコ
ードのユニークインデックスまたは非ユニークインデッ
クスに関するインデックスIDを作成し、データベース
上のレコードを指すアドレスを持ち、インデックスID
が同一であるチェーン構造によって繋がっているハッシ
ュバケット群、および、前記インデックスIDとそれに
対応するハッシュバケットの対応関係を規定するハッシ
ュポインタを利用し、前記データベースに蓄積されてい
るレコードを検索できるように構成したので、1つのテ
ーブルに対してユニークまたは非ユニークなインデック
ス検索と高速検索が可能になる効果がある。
As described above, according to the present invention, an index ID relating to a unique index or a non-unique index of each record is created, and an address pointing to a record on the database is provided.
So that records stored in the database can be searched for by using a group of hash buckets connected by the same chain structure and a hash pointer that defines the correspondence relationship between the index ID and the corresponding hash bucket. Since it is configured, there is an effect that a unique or non-unique index search and high-speed search can be performed on one table.

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

【図1】本発明の実施の一形態によるハッシュポイン
タ、ハッシュバケットおよびデータベース上の各レコー
ドの構造とそれらの関係を示す説明図である。
FIG. 1 is an explanatory diagram showing a structure of respective records on a hash pointer, a hash bucket, and a database and their relations according to an embodiment of the present invention.

【図2】本発明の実施の一形態によるレコード挿入時の
ハッシュポインタとハッシュバケットとの間の処理を示
す説明図である。
FIG. 2 is an explanatory diagram showing a process between a hash pointer and a hash bucket at the time of inserting a record according to the embodiment of the present invention.

【図3】本発明の実施の一形態のオブジェクトデータベ
ースシステムの複数ハッシュインデックスおよび非ユニ
ークインデックス管理方式を実現するための各要素とそ
の構造を示すブロック図である。
FIG. 3 is a block diagram showing each element and its structure for realizing the multiple hash index and non-unique index management method of the object database system according to the embodiment of the present invention.

【図4】本発明の実施の一形態による記憶装置へのレコ
ード挿入時の処理手順を示すシーケンス図である。
FIG. 4 is a sequence diagram showing a processing procedure at the time of inserting a record into the storage device according to the embodiment of the present invention.

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

100……記憶装置(データベース)、101……記憶
装置(ハッシュポインタ記憶手段)、102……記憶装
置(ハッシュバケット記憶手段)、200……インデッ
クスID生成装置(インデックスID生成手段)、20
1……検索装置(検索手段)、202……記憶操作装置
(記憶操作手段)。
100 ... Storage device (database), 101 ... Storage device (hash pointer storage means), 102 ... Storage device (hash bucket storage means), 200 ... Index ID generation device (index ID generation means), 20
1 ... Search device (search means), 202 ... Storage operation device (storage operation means).

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 データベースに登録されているテーブル
の属性と、そのテーブルの属性に属する各レコードのイ
ンデックスフィールドをもとに、前記各レコードのユニ
ークインデックスまたは非ユニークインデックスに関す
るインデックスIDを作成するインデックスID生成手
段と、 前記データベース上のレコードを指すアドレスを持ち、
同一のインデックスIDを持つハッシュバケットとチェ
ーン構造によって繋がっているハッシュバケット群を記
憶するハッシュバケット記憶手段と、 前記インデックスIDとそれに対応するハッシュバケッ
トの対応関係を規定するハッシュポインタを記憶するハ
ッシュポインタ記憶手段と、 前記データベースに蓄積されているレコードの検索を前
記ハッシュポインタ記憶手段が記憶したハッシュポイン
タと前記ハッシュバケット記憶手段が記憶したハッシュ
バケットを利用して高速検索する検索手段と、 前記データベース内にレコードを挿入する際に前記ハッ
シュバケットを生成し前記ハッシュバケット記憶手段に
記憶させる記憶操作手段と、 を備えたことを特徴とするオブジェクトデータベースシ
ステムの複数ハッシュインデックスおよび非ユニークイ
ンデックス管理方式。
1. An index ID for creating an index ID relating to a unique index or a non-unique index of each record based on the attribute of the table registered in the database and the index field of each record belonging to the attribute of the table. Generating means and an address pointing to a record on the database,
Hash bucket storage means for storing a hash bucket group connected to a hash bucket having the same index ID by a chain structure, and hash pointer storage for storing a hash pointer defining a correspondence relationship between the index ID and the corresponding hash bucket. Means, a search means for performing a high-speed search for a record stored in the database using the hash pointer stored by the hash pointer storage means and the hash bucket stored by the hash bucket storage means, and in the database Storage operation means for generating the hash bucket when inserting a record and storing the hash bucket in the hash bucket storage means; And non-unique index management method.
【請求項2】 前記テーブルには非ユニークインデック
スを含む検索のためのインデックスが付加されており、
前記インデックスID生成手段は、前記非ユニークイン
デックスを含む検索のためのインデックスと、前記テー
ブルの属性と、そのテーブルの属性に属する各レコード
のインデックスフィールドとをもとに、ユニークインデ
ックスまたは非ユニークインデックスに関するインデッ
クスIDを作成することを特徴とする請求項1記載のオ
ブジェクトデータベースシステムの複数ハッシュインデ
ックスおよび非ユニークインデックス管理方式。
2. An index for search including a non-unique index is added to the table,
The index ID generation means relates to a unique index or a non-unique index based on an index for searching including the non-unique index, an attribute of the table, and an index field of each record belonging to the attribute of the table. The multiple hash index and non-unique index management method of the object database system according to claim 1, wherein an index ID is created.
【請求項3】 前記検索手段は、インデックスID生成
手段が生成したインデックスIDをもとに前記ハッシュ
ポインタ記憶手段が記憶したハッシュポインタと前記ハ
ッシュバケット記憶手段が記憶したハッシュバケットを
利用し、前記インデックスIDのインデックスフィール
ドについての一致を判定し該当レコードの検索を行うこ
とを特徴とする請求項2記載のオブジェクトデータベー
スシステムの複数ハッシュインデックスおよび非ユニー
クインデックス管理方式。
3. The search means uses the hash pointer stored by the hash pointer storage means and the hash bucket stored by the hash bucket storage means based on the index ID generated by the index ID generation means, and the index 3. The multi-hash index and non-unique index management method of the object database system according to claim 2, wherein a match is found in the ID index field and the corresponding record is searched.
【請求項4】 前記記憶操作手段は、前記インデックス
ID生成手段が生成した前記レコードのインデックスI
Dをもとに、前記ハッシュポインタ記憶手段が記憶して
いるハッシュポインタを利用して前記インデックスID
が指すハッシュバケットのアドレスを参照し、ナルが設
定されていれば前記インデックスIDが指すハッシュバ
ケットのアドレスを設定し、ナルでなければ前記ハッシ
ュバケットのチェーンの最後に作成したハッシュバケッ
トを挿入し、前記レコードを前記データベースへ挿入す
ることを特徴とする請求項2記載のオブジェクトデータ
ベースシステムの複数ハッシュインデックスおよび非ユ
ニークインデックス管理方式。
4. The storage operation means is the index I of the record generated by the index ID generation means.
Based on D, the hash pointer stored in the hash pointer storage means is used to generate the index ID.
Refers to the address of the hash bucket pointed to, if the null is set, set the address of the hash bucket pointed to by the index ID, if not null, insert the hash bucket created at the end of the chain of the hash bucket, The multiple hash index and non-unique index management method of the object database system according to claim 2, wherein the record is inserted into the database.
JP2001211499A 2001-07-12 2001-07-12 Hush indexes of object database system and non-unique index management system Pending JP2003030040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001211499A JP2003030040A (en) 2001-07-12 2001-07-12 Hush indexes of object database system and non-unique index management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001211499A JP2003030040A (en) 2001-07-12 2001-07-12 Hush indexes of object database system and non-unique index management system

Publications (1)

Publication Number Publication Date
JP2003030040A true JP2003030040A (en) 2003-01-31

Family

ID=19046802

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001211499A Pending JP2003030040A (en) 2001-07-12 2001-07-12 Hush indexes of object database system and non-unique index management system

Country Status (1)

Country Link
JP (1) JP2003030040A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107402889A (en) * 2016-05-20 2017-11-28 三星电子株式会社 Retrieve data method, data storage method and data de-duplication module
CN112199333A (en) * 2020-09-24 2021-01-08 武汉绿色网络信息服务有限责任公司 Storage method and device supporting multi-value index file
CN112800057A (en) * 2021-01-22 2021-05-14 新华三大数据技术有限公司 Fingerprint table management method and device
CN114064621A (en) * 2021-10-28 2022-02-18 江苏未至科技股份有限公司 Method for judging repeated data
CN117591608A (en) * 2024-01-19 2024-02-23 恒辉信达技术有限公司 Cloud primary database data slicing method based on distributed hash

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107402889A (en) * 2016-05-20 2017-11-28 三星电子株式会社 Retrieve data method, data storage method and data de-duplication module
CN107402889B (en) * 2016-05-20 2023-07-11 三星电子株式会社 Data retrieval method, data storage method and data de-duplication module
CN112199333A (en) * 2020-09-24 2021-01-08 武汉绿色网络信息服务有限责任公司 Storage method and device supporting multi-value index file
CN112800057A (en) * 2021-01-22 2021-05-14 新华三大数据技术有限公司 Fingerprint table management method and device
CN112800057B (en) * 2021-01-22 2023-06-09 新华三大数据技术有限公司 Fingerprint table management method and device
CN114064621A (en) * 2021-10-28 2022-02-18 江苏未至科技股份有限公司 Method for judging repeated data
CN114064621B (en) * 2021-10-28 2022-07-15 江苏未至科技股份有限公司 Method for judging repeated data
CN117591608A (en) * 2024-01-19 2024-02-23 恒辉信达技术有限公司 Cloud primary database data slicing method based on distributed hash
CN117591608B (en) * 2024-01-19 2024-04-30 恒辉信达技术有限公司 Cloud primary database data slicing method based on distributed hash

Similar Documents

Publication Publication Date Title
US5555409A (en) Data management systems and methods including creation of composite views of data
CN103902698B (en) A kind of data-storage system and storage method
JP3318834B2 (en) Data file system and data retrieval method
Jagadish et al. On effective multi-dimensional indexing for strings
US20040015486A1 (en) System and method for storing and retrieving data
WO2018095299A1 (en) Time sequence data management method, device and apparatus
WO2023179787A1 (en) Metadata management method and apparatus for distributed file system
US7174341B2 (en) Dynamic database management system and method
CN107169003B (en) Data association method and device
CN111782731A (en) Data synchronization method and device
US6826563B1 (en) Supporting bitmap indexes on primary B+tree like structures
CN108984626B (en) Data processing method and device and server
CN106503186A (en) A kind of data managing method, client and system
CN107273443B (en) Mixed indexing method based on metadata of big data model
JPH0550774B2 (en)
JP2003030040A (en) Hush indexes of object database system and non-unique index management system
CN111522820A (en) Data storage structure, storage retrieval method, system, device and storage medium
WO2005066835A1 (en) A method for quickly retrieving a record in a data page of a database
US6275822B1 (en) Maintaining very large indexes supporting efficient relational querying
CN110413724A (en) A kind of data retrieval method and device
CN114218277A (en) Efficient query method and device for relational database
CN114579617A (en) Data query method and device, computer equipment and storage medium
CN113407538A (en) Incremental acquisition method for data of multi-source heterogeneous relational database
RU2389066C2 (en) Multidimensional database and method of managing multidimensional database
CN117235203A (en) Data storage method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060725

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20061226