JPS63189934A - Sub-entry processing system for data base - Google Patents

Sub-entry processing system for data base

Info

Publication number
JPS63189934A
JPS63189934A JP62022021A JP2202187A JPS63189934A JP S63189934 A JPS63189934 A JP S63189934A JP 62022021 A JP62022021 A JP 62022021A JP 2202187 A JP2202187 A JP 2202187A JP S63189934 A JPS63189934 A JP S63189934A
Authority
JP
Japan
Prior art keywords
index
record
processing
key value
block
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
JP62022021A
Other languages
Japanese (ja)
Inventor
Junji Yamanaka
山中 潤二
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP62022021A priority Critical patent/JPS63189934A/en
Publication of JPS63189934A publication Critical patent/JPS63189934A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve processing efficiency based on sub-entry and maintenance efficiency by determining the storing position of an index concerned in an index storing file by key value randomizing processing. CONSTITUTION:An address (block number) to store an index 15 in the index storing file 14 is determined by a key value based on operation by the randomizing processing part 11. Thereby, block access to the file 14 is executed usually only once in the retrieving or updating processing of an index. Since key values are randomized, the number of indexes in each block is averaged. Thus, the processing efficiency of sub-entry and the maintenance efficiency can be improved.

Description

【発明の詳細な説明】 (概要〕 レコードに含まれるデータ項目の内容をキーにして、デ
ータベースから該当するレコードを検索するデータベー
ス副次エントリ処理方式において。
[Detailed Description of the Invention] (Summary) In a database side entry processing method that searches a database for a corresponding record using the contents of data items included in the record as a key.

副次エントリを実現するためのキー値とレコード格納ア
ドレスとを組にした索引を格納・検索するにあたって、
キー値のランダマイズ処理により索引格納ファイルにお
ける該当する索引の格納位置を決定する構造とし、デー
タベース管理における処理効率およびメンテナンス効率
の向上を図る。
When storing and searching an index that combines key values and record storage addresses to realize secondary entries,
The structure is such that the storage position of the corresponding index in the index storage file is determined by key value randomization processing, and the processing efficiency and maintenance efficiency in database management are improved.

〔産業上の利用分野〕[Industrial application field]

本発明はデータベース副次エントリ処理方式。 The present invention is a database side entry processing method.

特に1例えば高処理能力を要求されるオンライントラン
ザクション向けのネットワーク型データベースに対する
データベース副次エントリ処理方式%式% オンライントランザクシラン業務では、高処理能力を保
障することが必須の課題とされている。
In particular, 1. For example, a database side entry processing method for a network type database for online transactions that requires high processing power.In online transaction processing, ensuring high processing power is an essential issue.

このため、データベースの各種エントリ手法を選択する
にあたりでも、処理能力の高い主エントリを採用せざる
を得す、これがデータベースの設計に労力を費やす結果
となっている。
For this reason, when selecting various database entry methods, it is necessary to adopt a main entry with high processing performance, which results in a lot of effort being spent on database design.

いわゆる副次エントリによる方式が、主エントリによる
方式に近い処理能力で実現できれば、利用者にとって、
データベースの適用範囲を大幅に拡大することが可能と
なる。そのため、従来の副次エントリ処理方式より高い
処理性能を持つ副次エントリ処理方式が必要とされる。
If a so-called secondary entry method can be realized with processing power close to that of the main entry method, it will be beneficial for users.
It becomes possible to significantly expand the scope of application of the database. Therefore, there is a need for a secondary entry processing method that has higher processing performance than conventional secondary entry processing methods.

〔従来の技術〕 第3図は従来方式の例を示す。第3図において。[Conventional technology] FIG. 3 shows an example of the conventional method. In fig.

16はネットワーク型のデータベース、20は索引格納
ファイル、Rはレコードを表す。
Reference numeral 16 represents a network type database, 20 represents an index storage file, and R represents a record.

データ項目の内容をキーにして1データベースのレコー
ドを直接求める方式として、いわゆる副次エントリ方式
がある。副次エントリ方式では。
There is a so-called secondary entry method as a method for directly obtaining records in one database using the contents of data items as keys. In the secondary entry method.

キー値と、そのキー値を持つレコードの格納位置情報と
の組による索引を管理し、その索引によって、必要とす
るレコードに直ちにアクセスできるようにされている。
It manages an index based on a pair of a key value and storage location information of a record having that key value, and uses the index to immediately access a desired record.

従来方式では、索引を、キー値の昇順(アルファベット
類)にソーティングし、その検索を平均化するために1
例えば第3図に示すように、木構造のインデックスによ
って、管理するようにされていた。
In the conventional method, the index is sorted in ascending order of key values (alphabetically), and 1
For example, as shown in FIG. 3, management was performed using a tree-structured index.

なお、副次エントリを用いないデータベース管理システ
ムでは、データベースにおけるレコード自体の格納場所
を所定のハツシング処理によって決定する方式が用いら
れることもあるが1例えばネットワーク型のデータベー
ス等、既存のデータベースに適用することはできない。
Note that in database management systems that do not use secondary entries, a method is sometimes used in which the storage location of the record itself in the database is determined by a predetermined hashing process. It is not possible.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

第3図に示すような木構造のインデックスによって実現
された索引を検索するには、索引格納ファイル20にお
いて、上位階層から下位階層に向けて9階層数分のブロ
ックをアクセスする必要がある。また、索引に対応する
データベース16のレコードRが追加されたり、削除さ
れたり、あるいはデータ項目の内容が変更されたりする
と、索引をメンテナンスする必要が生じ、動的に木構造
を変化させることになる。特に、木構造のインデックス
の階層に変化を伴う場合には、大きな処理コストが要求
されるという問題がある。
In order to search an index realized by a tree-structured index as shown in FIG. 3, it is necessary to access blocks corresponding to nine levels in the index storage file 20 from the upper level to the lower level. Furthermore, when a record R in the database 16 corresponding to the index is added or deleted, or when the contents of a data item are changed, it becomes necessary to maintain the index, and the tree structure changes dynamically. . In particular, there is a problem in that a large processing cost is required when the hierarchy of a tree-structured index is changed.

本発明は上記問題点の解決を図り、既存のデータベース
本体の構造を変えることなく、副次エントリによる処理
効率およびメンテナンス効率を向上させることを目的と
している。
The present invention aims to solve the above-mentioned problems, and aims to improve processing efficiency and maintenance efficiency using side entries without changing the structure of the existing database main body.

〔問題点を解決するための手段〕[Means for solving problems]

第1図は本発明の基本構成例を示す。 FIG. 1 shows an example of the basic configuration of the present invention.

第1図において、10はCPUおよびメモリからなる処
理装置、11は所定の関数によりキー値をランダマイズ
するランダマイズ処理部、12はキー値に基づいて索引
を格納する処理を行う索引格納処理部、13はキー値に
基づいて索引を検索する処理を行う索引検索処理部、1
4は索引が格納される索引格納ファイル、15はキー値
とレコード格納アドレスとを組にした索引、16はデー
タベース、Bl、B2.・・・Bnは索引格納ファイー
ル14におけるアクセス単位となるブロック、Rはレコ
ードを表す。
In FIG. 1, 10 is a processing device consisting of a CPU and a memory, 11 is a randomization processing unit that randomizes key values using a predetermined function, 12 is an index storage processing unit that performs processing to store an index based on the key value, and 13 1 is an index search processing unit that performs processing to search an index based on a key value;
4 is an index storage file in which an index is stored, 15 is an index that is a pair of a key value and a record storage address, 16 is a database, Bl, B2 . ... Bn represents a block serving as an access unit in the index storage file 14, and R represents a record.

索引格納ファイル14は、n個のブロック81〜Bnを
持ち、それらの各ブロックB1〜Bnには、制御部と、
各ブロックに対応する索引15とが格納される。索引1
5は、キー値と、そのキー値を持つレコードの格納アド
レスとからなる。
The index storage file 14 has n blocks 81 to Bn, and each of these blocks B1 to Bn includes a control unit,
An index 15 corresponding to each block is stored. Index 1
5 consists of a key value and a storage address of the record having that key value.

ランダマイズ処理部11は、与えられたキー値に対し、
所定の関数を施し、該キー値を索引格納ファイル14の
ブロック数に応じた範囲でランダマイズする処理を行う
ものである。
For the given key value, the randomization processing unit 11
A predetermined function is applied to randomize the key value within a range corresponding to the number of blocks in the index storage file 14.

索引格納処理部12は、データベース16におけるレコ
ードの追加・削除があった場合や、副次エントリの対象
となるデータ項目の内容に変更があった場合等に、その
項目の内容であるキー値を指定して、ランダマイズ処理
部11を呼び出し。
When a record is added or deleted in the database 16, or when there is a change in the contents of a data item that is the subject of a secondary entry, the index storage processing unit 12 stores the key value that is the contents of the item. Specify and call the randomization processing unit 11.

索引15が格納される索引格納ファイル14におけるブ
ロックを決定する。
A block in the index storage file 14 in which the index 15 is stored is determined.

索引検索処理部13は、検索するレコードのキー値を指
定して、ランダマイズ処理部11を呼び出し、そのラン
ダマイズ結果に対応する索引格納ファイル14のブロッ
クから、検索するレコードのレコード格納アドレスを得
る。
The index search processing unit 13 specifies the key value of the record to be searched, calls the randomization processing unit 11, and obtains the record storage address of the record to be searched from the block of the index storage file 14 corresponding to the randomization result.

なお、複数のデータ項目の内容をキー値として。Note that the contents of multiple data items are used as key values.

ランダマイズすることも可能である。Randomization is also possible.

〔作用〕[Effect]

本発明によれば、ランダマイズ処理部11による演算に
よって、キー値から索引格納ファイル14における索引
15が格納されるべきアドレス(ブロック番号)が決定
される。従って、索引の検索や索引の更新処理において
、索引格納ファイル14に対するブロック・アクセスが
1通常1回で済むことになる。キー値のランダマイズが
なされるため、各ブロックにおける索引数は、平均化さ
れる。
According to the present invention, the address (block number) at which the index 15 is to be stored in the index storage file 14 is determined from the key value by the calculation performed by the randomization processing unit 11 . Therefore, in index search and index update processing, the block access to the index storage file 14 usually only needs to be made once. Since the key values are randomized, the number of indexes in each block is averaged.

索引格納ファイル14の構造と、索引15へのアクセス
関連部分とを変更するだけで、データベース16自体に
ついては、既存のものをそのまま継続して使用でき、ま
た、データベース16を利用する各種応用処理部等につ
いても、変更を要しない、従来用いられていた木構造の
インデックスによる索引構成と3本発明による索引構成
とを。
By simply changing the structure of the index storage file 14 and the parts related to access to the index 15, the existing database 16 itself can be used as is, and various application processing units that use the database 16 can be used. etc., an index structure using a conventionally used tree-structured index and an index structure according to the present invention, which do not require any changes.

キーとなるデータ項目の特性等に応じて、利用者が選択
できるようにしておけば、さらに柔軟性が増す。
If the user is allowed to make a selection depending on the characteristics of the key data item, further flexibility will be achieved.

〔実施例〕〔Example〕

第2図は本発明の一実施例を示す。 FIG. 2 shows an embodiment of the invention.

第2図における符号は、第1図に示すものに対応する。The symbols in FIG. 2 correspond to those shown in FIG.

B50は索引格納ファイル14における50番目のブロ
ックを表す。
B50 represents the 50th block in the index storage file 14.

索引格納ファイル14における各ブロックは。Each block in the index storage file 14.

制御部と索引15の並びとからなる、制御部は。The control section consists of a control section and an array of indexes 15.

そのブロックに含まれる索引の件数と、そのブロックに
おける空き領域の先頭アドレスと、オーバフローその他
の制御情報とを持つ、この例では。
In this example, it has the number of indexes included in the block, the start address of free space in the block, overflow and other control information.

ブロックB50は、キー値が「東京」である索引を2個
持ち、それらやレコード格納アドレスが。
Block B50 has two indexes whose key value is "Tokyo", and these and record storage addresses.

それぞれ1000番地と1005番地である。They are addresses 1000 and 1005, respectively.

キー値=「東京」による索引15の検索゛または更新の
処理の場合には、キー値−「東京」の指定により、ラン
ダマイズ処理部11が呼び出される。
In the case of searching or updating the index 15 with the key value = "Tokyo", the randomization processing unit 11 is called by specifying the key value - "Tokyo".

ランダマイズ処理部11は、所定のハツシング関数りを
用いて、「東京」をパラメータとする演算を実行し、そ
のランダマイズ結果BNを要求元に通知する。
The randomization processing unit 11 uses a predetermined hashing function to execute an operation using "Tokyo" as a parameter, and notifies the request source of the randomization result BN.

ランダマイズ結果BNは、索引格納ファイル14におけ
るブロック番号に対応し、BNが50であれば、索引格
納ファイル14における50番目のブロックB5Qが索
引格納場所とされる。
The randomization result BN corresponds to the block number in the index storage file 14, and if BN is 50, the 50th block B5Q in the index storage file 14 is set as the index storage location.

例えば、新しいレコードの追加の場合には、ブロックB
50の制御部から、空き領域の先頭アドレスを得て、そ
こにキー値として「東京」を格納すると共に、その新し
いレコードの格納アドレスを格納する。また、制御部に
おける件数情報と。
For example, when adding a new record, block B
The head address of the free area is obtained from the control unit 50, and "Tokyo" is stored there as a key value, as well as the storage address of the new record. Also, the number information in the control unit.

空き領域情報等を更新する。該ブロック50に空き領域
がなくなり、新しい索引を格納できない場合には1次の
ブロックまたはオーバフロー用に用意されたブロックに
新しい索引を格納し、必要に応じてオーバフロー制御情
報を、制御部に設定する。
Update free space information, etc. If there is no free space in the block 50 and a new index cannot be stored, the new index is stored in the primary block or a block prepared for overflow, and overflow control information is set in the control unit as necessary. .

キー値の指定によるレコードの検索の場合には。For finding records by specifying a key value.

ランダマイズ処理部11から通知されたブロック番号の
ブロックB50に格納されている索引15を順次読み出
し、該当するレコード格納アドレスを抽出する。この例
では、データベース16における1000番地のレコー
ドと1005番地のレコードが求めるレコードである。
The index 15 stored in the block B50 of the block number notified from the randomization processing unit 11 is sequentially read out, and the corresponding record storage address is extracted. In this example, records at addresses 1000 and 1005 in the database 16 are the desired records.

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

以上説明したように1本発明によれば、索引の検索や更
新に関する処理コストの大半が、キー値のランダマイズ
処理で吸収されるため、全体的な処理コストを大幅に削
減することが可能となり。
As explained above, according to the present invention, most of the processing costs related to index searches and updates are absorbed by key value randomization processing, making it possible to significantly reduce overall processing costs.

高処理能力を発揮することができる。同時に、従来のよ
うな木構造のインデックスの維持・管理が不要となり、
処理が簡易化され、また、既存のデータベースへの適用
も、比較的容易に実現することができる。
It can demonstrate high processing capacity. At the same time, there is no need to maintain and manage traditional tree-structured indexes.
Processing is simplified, and application to existing databases can be realized relatively easily.

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

第1図は本発明の基本構成例、第2図は本発明の一実施
例、第3図は従来方式の例を示す。 図中、10は処理装置、11はランダマイズ処理部、1
2は索引格納処理部、1′3は索引検索処理部、14は
索引格納ファイル、15は索引、16はデータベースを
表す。
FIG. 1 shows an example of the basic configuration of the present invention, FIG. 2 shows an embodiment of the invention, and FIG. 3 shows an example of a conventional system. In the figure, 10 is a processing device, 11 is a randomization processing section, 1
2 represents an index storage processing section, 1'3 represents an index search processing section, 14 represents an index storage file, 15 represents an index, and 16 represents a database.

Claims (1)

【特許請求の範囲】 レコードに含まれるデータ項目の内容をキーにして、デ
ータベース(16)から該当するレコードを検索するデ
ータベース副次エントリ処理方式において、 キー値とそのキー値を持つレコードの格納位置情報との
対応情報からなる索引(15)が、アクセス単位となる
ブロック毎にまとめられて格納される索引格納ファイル
(14)と、 所与のキー値に対し所定の関数を施し、該キー値を上記
索引格納ファイル(14)のブロック数に応じた範囲で
ランダマイズするランダマイズ処理手段(11)と、 データベース(16)に格納されるレコードのキー値を
指定して、上記ランダマイズ処理手段(11)を呼び出
し、そのランダマイズ結果に対応する上記索引格納ファ
イル(14)のブロックに、当該レコードの索引を格納
する索引格納処理手段(12)と、検索するレコードの
キー値を指定して、上記ランダマイズ処理手段(11)
を呼び出し、そのランダマイズ結果に対応する上記索引
格納ファイル(14)のブロックから、検索するレコー
ドの格納位置情報を得る索引検索処理手段(13)とを
備えたことを特徴とするデータベース副次エントリ処理
方式。
[Claims] In a database sub-entry processing method in which a corresponding record is searched from a database (16) using the content of a data item included in a record as a key, a key value and a storage position of a record having the key value are provided. An index storage file (14) in which an index (15) consisting of information that corresponds to information is stored together for each block serving as an access unit; a randomization processing means (11) for randomizing within a range according to the number of blocks of the index storage file (14); and a randomization processing means (11) for specifying a key value of a record to be stored in the database (16). , and specify the index storage processing means (12) that stores the index of the record in the block of the index storage file (14) corresponding to the randomization result and the key value of the record to be searched, and perform the randomization process. Means (11)
and an index search processing means (13) for obtaining storage position information of a record to be searched from a block of the index storage file (14) corresponding to the randomization result. method.
JP62022021A 1987-02-02 1987-02-02 Sub-entry processing system for data base Pending JPS63189934A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62022021A JPS63189934A (en) 1987-02-02 1987-02-02 Sub-entry processing system for data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62022021A JPS63189934A (en) 1987-02-02 1987-02-02 Sub-entry processing system for data base

Publications (1)

Publication Number Publication Date
JPS63189934A true JPS63189934A (en) 1988-08-05

Family

ID=12071331

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62022021A Pending JPS63189934A (en) 1987-02-02 1987-02-02 Sub-entry processing system for data base

Country Status (1)

Country Link
JP (1) JPS63189934A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0452764A (en) * 1990-06-14 1992-02-20 Matsushita Electric Ind Co Ltd Document retrieval device
EP3236369A1 (en) 2016-04-18 2017-10-25 Fujitsu Limited Index generation program, index generation device and index generation method, search program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0452764A (en) * 1990-06-14 1992-02-20 Matsushita Electric Ind Co Ltd Document retrieval device
EP3236369A1 (en) 2016-04-18 2017-10-25 Fujitsu Limited Index generation program, index generation device and index generation method, search program
EP3770770A1 (en) 2016-04-18 2021-01-27 Fujitsu Limited Index generation program, index generation device and index generation method, search program
US11080234B2 (en) 2016-04-18 2021-08-03 Fujitsu Limited Computer readable recording medium for index generation

Similar Documents

Publication Publication Date Title
US4468728A (en) Data structure and search method for a data base management system
US6175835B1 (en) Layered index with a basic unbalanced partitioned index that allows a balanced structure of blocks
US5404510A (en) Database index design based upon request importance and the reuse and modification of similar existing indexes
US6859808B1 (en) Mapping logical row identifiers for primary B+tree-like structures to physical row identifiers
CA2319177A1 (en) Database apparatus
GB2406679A (en) Index tree structure and key compression for a database
US8161051B2 (en) Method and apparatus for data processing with index search
US20050021923A1 (en) Memory management frame handler
JPS63189934A (en) Sub-entry processing system for data base
JP3552339B2 (en) Database system
CN106649462A (en) Implementation method for mass data full-text retrieval scene
JPH07334402A (en) Data base as main memory
JPH02297670A (en) Data base retrieving system
KR20200092710A (en) Hybride index appratus in database management system based heterogeneous storage
JP3031944B2 (en) Data processing device
JPH0962696A (en) Data base managing system
JPH1173353A (en) Transaction retrieval processor based on specified time
JP2722660B2 (en) How to manage indexed sequential files
JPH03282966A (en) Method for managing hash entry area
JPH01282635A (en) Index maintaining system
JPS61251941A (en) Data base management system
KR100778328B1 (en) A method of query optimization in database by the use of virtual columns
Nelson A prefix trie index for inverted files
JPS629433A (en) Data base access mechanism
JPH0338743A (en) Data base managing system