JP2540821B2 - Database search system - Google Patents

Database search system

Info

Publication number
JP2540821B2
JP2540821B2 JP61250555A JP25055586A JP2540821B2 JP 2540821 B2 JP2540821 B2 JP 2540821B2 JP 61250555 A JP61250555 A JP 61250555A JP 25055586 A JP25055586 A JP 25055586A JP 2540821 B2 JP2540821 B2 JP 2540821B2
Authority
JP
Japan
Prior art keywords
index
block
level index
lowest level
key
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 - Fee Related
Application number
JP61250555A
Other languages
Japanese (ja)
Other versions
JPS63104134A (en
Inventor
和行 嶋津
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 Corp
Original Assignee
Nippon 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP61250555A priority Critical patent/JP2540821B2/en
Publication of JPS63104134A publication Critical patent/JPS63104134A/en
Application granted granted Critical
Publication of JP2540821B2 publication Critical patent/JP2540821B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は電子計算機のデータベースシステムに関し、
特に索引の検索制御に関する。
The present invention relates to a database system of an electronic computer,
In particular, it relates to index search control.

(従来の技術) 電子計算機を用いた情報処理の発展に伴い、データ処
理を行う業務プログラムが参照するデータファイルの共
通化が進んでいる。
(Prior Art) With the development of information processing using electronic computers, commonization of data files referred to by business programs that perform data processing is progressing.

例えば、企業において一般的に行われている例を示す
と、給与計算では社員番号,氏名,職歴,所属などの個
人に関する情報を参照、更新し、福利厚生管理では社員
番号,氏名,既往症,家族(未婚,既婚),扶養家族な
どの情報を参照、更新する。
For example, in the case of a typical example in a company, information about an individual such as employee number, name, work history, and affiliation is referred to and updated in payroll calculation, and employee number, name, anamnesis, and family are included in welfare management. Refer to and update information such as (unmarried, married) and dependents.

これらの情報は、業務プログラム毎に重複し所持する
のでなく、源泉ファイルとして共有し、効率良く保守
し、そこから高速にアクセスすることが望まれる“デー
タベースシステムの基礎(植村俊亮,オーム社,昭和58
年出版)”の17頁16行から20行目では、データベースシ
ステムを以下のように定義している。
It is hoped that these information will not be duplicated for each business program, but shared as a source file, efficiently maintained, and accessed at high speed from the basics of a database system (Shunsuke Uemura, Ohmsha, Showa 58
Page 17 lines 16 to 20 defines the database system as follows.

『データベースシステム(database system)とは、
会社,大学,病院,官庁など,一つの組織体に関するデ
ータをまとめて制御し、複数種類の利用者がそれを共同
利用するシステムをいう。データは必要最低限の冗長さ
をもって統合されてデータベースを形成し、利用者がそ
れぞれの業務につごうのよいやり方でそれを共用する。
ただし、利用者のデータベースに対する視点は異なって
も、データベースを操作する方式は統一され、集中制御
される。』 データベースとして共有したデータは大量になり、目
的のデータを検索するのに高速な手段が要求される。デ
ータベースの一般的な高速アクセス手段として、索引が
ある。“データベース管理(James Martin著,日本コン
ピュータ協会,昭和57年出版)”の124頁1行〜3行目
は索引について以下のように定義している。
"What is a database system?
A system that collectively controls data related to a single organization such as a company, a university, a hospital, or a government office, and allows multiple types of users to share the data. The data is integrated with the least amount of redundancy to form a database, which users share in a way that is convenient for their business.
However, even if the user's point of view of the database is different, the method of operating the database is unified and centrally controlled. The amount of data shared as a database will be large, and high-speed means will be required to retrieve the desired data. An index is a general high-speed access method for a database. Page 124, lines 1 to 3 of "Database Management (James Martin, Computer Society of Japan, published in 1982)" defines the index as follows.

『索引とは、入力として、ある属性値についての情報
を受入れ、出力として、これらの属性値をもつレコード
(複数の場合もある)をすばやく位置づけるのに助けと
なる情報を与える手続きと連動する表として定義されう
る。』 従来、索引の検索は索引に関する情報レコード、ある
いは索引の最上位レベルブロックから順次検索し、求め
る索引の含まれる最下位レベル索引ブロツクを検索して
きた。
“An index is a table that works with a procedure that accepts as input information about certain attribute values and provides as output information that helps to quickly locate the record (s) with these attribute values. Can be defined as Conventionally, the index is searched by sequentially searching from the information record regarding the index or the highest level block of the index, and searching the lowest level index block including the desired index.

最上位レベルブロック,最下位レベルブロックの入力
は、データベースファイルを格納する補助記憶装置から
主記憶装置にブロック単位に読み込むことによって行わ
れる。これらのブロックの要求者には、要求したブロッ
クが主記憶装置上に読み込まれたアドレスが返却され
る。
The highest level block and the lowest level block are input by reading from the auxiliary storage device storing the database file into the main storage device in block units. The address at which the requested block is read into the main memory is returned to the requester of these blocks.

“データベースシステムの設計と開発(味村,山田,
堀内著,オーム社,昭和58年出版)”では、データベー
スファイルの入力動作を主記憶上の特定の領域を用い
て、大容量の補助記憶装置に対して効率よく行う方式を
紹介している(195頁右欄下から9行目〜196頁左欄6行
目)。
"Design and development of database system (Amimura, Yamada,
Horiuchi, Ohmsha, published in 1983) ”introduces a method for efficiently inputting a database file to a large-capacity auxiliary storage device by using a specific area on the main storage ( Page 195, right column, line 9 from bottom to page 196, left column, line 6).

『磁気ディスクからチャネルを経てCIを読み込むと
き、主記憶装置上にバッファ領域がない場合は、事実上
I/O命令(EXCP)を発行させることができない。また、I
/O命令を発行する前に、データベースバッファ中に要求
されたデータがないか調べる。この方式はルックアサイ
ドバッファ方式と呼ぶもので、無条件にプログラムのI/
O要求に同期してI/O命令が発行されるものでないことを
示す。また、データベースバッファプールに空きバッフ
ァがない場合は、外部の磁気ディスクへ書き出してもよ
いバッファ内容のうち、最も古いものを書き出す。この
方式は、仮想記憶におけるページング方式と同じLRU(L
east recently use)基準である。』 上記説明におけるCIは、CONTROL INTERVALの略で本発
明におけるブロックと同義語である。
“When reading a CI from a magnetic disk through a channel, if there is no buffer area on the main memory,
I / O command (EXCP) cannot be issued. Also, I
Check the database buffer for the requested data before issuing the / O instruction. This method is called the look-aside buffer method, and is used to unconditionally
Indicates that the I / O instruction is not issued in synchronization with the O request. If there is no free buffer in the database buffer pool, the oldest buffer content that may be written to the external magnetic disk is written. This method uses the same LRU (L
east recently use) standard. The CI in the above description is an abbreviation for CONTROL INTERVAL and is synonymous with the block in the present invention.

第4図は、従来技術による索引検索方式を実現するた
めのブロツク構成図である。第4図において41は索引検
索手段、42は索引情報レコード参照手段、43は上位レベ
ル索引検索手段、44は最下位レベル索引検索手段、45は
主記憶装置、46は上位レベル索引ブロツク、47は最下位
レベル索引ブロツク、48は補助記憶装置である。
FIG. 4 is a block configuration diagram for realizing the index search method according to the conventional technique. In FIG. 4, 41 is an index retrieval means, 42 is an index information record reference means, 43 is an upper level index retrieval means, 44 is a lowest level index retrieval means, 45 is a main storage device, 46 is an upper level index block, and 47 is The lowest level index block, 48 is auxiliary storage.

第4図において、索引検索手段41は索引情報レコード
参照手段42と、上位レベル検索手段43と、最下位レベル
索引検索手段44とから構成される。また、主記憶装置45
は上位レベル索引ブロツクと、最下位レベル索引ブロツ
クとから構成される。
In FIG. 4, the index search means 41 is composed of index information record reference means 42, upper level search means 43, and lowest level index search means 44. Also, the main memory 45
Consists of an upper level index block and a lower level index block.

第5図は、従来技術による索引方式を示す説明図であ
る。第5図において、51は索引キー情報レコード、52は
最上位レベル索引ブロツク、53は最下位レベル索引ブロ
ツク、54は上位レベル索引キー、55は最下位レベル索引
キー、56は最下位レベル索引キーである。
FIG. 5 is an explanatory diagram showing a conventional indexing method. In FIG. 5, 51 is an index key information record, 52 is the highest level index block, 53 is the lowest level index block, 54 is the upper level index key, 55 is the lowest level index key, and 56 is the lowest level index key. Is.

第5図において、索引は索引キー情報レコード51と、
上位レベル索引キー54を格納する最上位レベル索引ブロ
ツク52と、最下位レベル索引キー55もしくは最下位レベ
ル索引キー56を格納する最下位レベル索引ブロツク53と
から成る。
In FIG. 5, the index is an index key information record 51,
It consists of a top level index block 52 which stores a top level index key 54 and a bottom level index block 53 which stores a bottom level index key 55 or a bottom level index key 56.

次に、従来技術の具体例を第4図と第5図を参照して
説明する。
Next, a specific example of the conventional technique will be described with reference to FIGS. 4 and 5.

第1に、索引検索手段41は索引情報レコード参照手段
42に対して、最上位レベル索引ブロツクのブロツク番号
を要求する。
First, the index search means 41 is an index information record reference means.
Request 42 the block number of the highest level index block.

第2に、上位レベル索引検索手段43は索引情報レコー
ド参照手段42、あるいは上位レベル索引検索手段43によ
つて得られたブロツク番号によつて上位レベル索引ブロ
ツクを入力して該当する上位索引キーを探索する。
Secondly, the upper level index search means 43 inputs the upper level index block by the index information record reference means 42 or the block number obtained by the upper level index search means 43 to input the corresponding upper index key. Explore.

第3に、上位レベル索引検索手段43によつて検索され
た上位レベル索引キーが上位レベル索引ブロツクポイン
トしているならば、再び上位レベル索引検索手段43に制
御を渡し、第2のステツプからの処理を繰返して行う。
また、検索された上位レベル索引キーが最下位レベル索
引ブロツクをポイントしているならば、最下位レベル検
索手段44に制御を渡す。
Thirdly, if the upper level index key retrieved by the upper level index retrieval means 43 points to the upper level index block, the control is passed to the upper level index retrieval means 43 again, and the control from the second step is started. Repeat the process.
If the retrieved upper level index key points to the lowest level index block, the control is passed to the lowest level search means 44.

第4に、最下位レベル検索手段44は、上位レベル索引
検索手段43によつて得られた最下位レベル索引ブロツク
番号により、最下位レベル索引ブロツクを入力して、該
当する最下位レベル索引キーの検索をする。
Fourth, the lowest level search means 44 inputs the lowest level index block according to the lowest level index block number obtained by the higher level index search means 43, and enters the corresponding lowest level index key. Do a search.

第5図において、最下位レベル索引キー55を直接読込
み、最下位レベル索引キー55から順次キーの昇順に読込
む処理を想定すると、最下位レベル索引キー56を検索す
るまでに次の処理を行う。すなわち、最下位レベル索引
キー55を検索するために第1に索引情報レコード51の参
照を行い、第2に上位レベル索引キー54の検索を行い、
第3に最下位レベル索引キー55の検索を行う。また、最
下位レベル索引キー56を検索するためには第1に索引情
報レコード51を参照し、第2に上位レベル索引キー54の
検索を行い、第3に最下位レベル索引キー55の検索を行
い、第4に最下位レベル索引キー55の昇順に当る最下位
レベル索引キー56を検索する。
In FIG. 5, assuming the process of directly reading the lowest level index key 55 and reading from the lowest level index key 55 in ascending order of the keys, the following process is performed until the lowest level index key 56 is searched. . That is, first to look up the index information record 51 to search for the lowest level index key 55, and secondly to search for the upper level index key 54,
Third, the lowest level index key 55 is searched. In order to search the lowest level index key 56, firstly, the index information record 51 is referred to, secondly, the upper level index key 54 is searched, and thirdly, the lowest level index key 55 is searched. Then, fourthly, the lowest level index key 56 corresponding to the ascending order of the lowest level index key 55 is searched.

第6図は、一般的な索引における上位レベル索引キー
と最下位レベル索引キーを図示したものである。上位レ
ベル索引キーと最下位レベル索引キーのいずれも、索引
キー値とポインタ値からなる。
FIG. 6 illustrates the upper level index key and the lower level index key in a general index. Both the upper level index key and the lower level index key consist of an index key value and a pointer value.

索引キー値はレコードに含まれる特定の項目、もしく
は複数の項目からなるものである。例えば、社員レコー
ドを想定した場合、氏名による検索を行うなら、社員レ
コード上の項目、氏名を索引キー値とする。ポインタ値
は上位レベル索引キーと下位レベル索引キーとは異な
る。上位レベル索引キーのポインタ値は、その上位レベ
ル索引キーが管理する下位レベルの索引ブロックの二次
記憶装置上のブロック番号を格納する。また、上位レベ
ル索引キーの索引キー値はこの下位のレベル索引ブロッ
クに含まれる上位レベル索引キー、もしくは最下位レベ
ル索引キーの中で最大の値を持つ索引キー値となる。
The index key value is a specific item or a plurality of items included in the record. For example, when an employee record is assumed, if a search by name is performed, the item and name on the employee record are used as the index key value. The pointer value is different from the upper level index key and the lower level index key. The pointer value of the higher level index key stores the block number on the secondary storage device of the lower level index block managed by the higher level index key. The index key value of the upper level index key is the upper level index key included in the lower level index block or the index key value having the largest value among the lowest level index keys.

一方、最下位レベル索引キーのポインタ値は、最下位
レベル索引キーと等しいレコードの二次記憶装置上のア
ドレス,通常はブロック番号とブロック内アドレスを所
持する。
On the other hand, the pointer value of the lowest level index key has the address on the secondary storage device of the record equal to the lowest level index key, usually the block number and the in-block address.

(発明か解決しようとする問題点) 上述した従来の方式では、直前に検索した最下位レベ
ル索引キーの検索に要する過程が重複する。すなわち、
上記従来技術において索引情報レコード51の参照を行う
処理と上位レベル索引キー54の検索を行う処理と、最下
位レベル索引キー55の検索を行う処理が繰返される。こ
れにより目的とする最下位レベル索引キー56を検索する
までに、時間がかかるという欠点がある。
(Problems to be Solved by the Invention) In the above-described conventional method, the processes required for searching the lowest level index key searched immediately before are duplicated. That is,
In the above-mentioned conventional technique, the process of referring to the index information record 51, the process of searching the upper level index key 54, and the process of searching the lowest level index key 55 are repeated. As a result, it takes a long time to search for the target lowest level index key 56.

本発明の目的は、直前に検索した最下位レベルの索引
キーを含む最下位レベル索引ブロツクを記憶することに
より上記欠点を除去し、短時間で検索を終了できるよう
に構成したデータベース検索システムを提供することに
ある。
An object of the present invention is to provide a database search system configured to eliminate the above-mentioned drawback by storing the lowest level index block including the lowest level index key searched immediately before and to complete the search in a short time. To do.

(問題点を解決するための手段) 本発明によるデータベース検索システムは、大量のデ
ータを記憶することが可能な不揮発性の補助記憶装置
と、高速なデータアクセスが可能な小容量の揮発性の主
記憶装置から構成され、必要最低限の冗長さをもって統
合されたデータのすべてを補助記憶装置上におき、索引
キー値とデータの主記憶装置上のアドレスを所持する最
下位レベル索引キーを複数個所持した最下位レベル索引
ブロックと、最下位レベルブロックを代表する索引キー
値と当該最下位レベルブロックの主記憶装置上のアドレ
スを所持する上位レベル索引キー値を複数個所持した上
位レベルブロックと、上位レベルブロックを代表する索
引キー値と当該上位レベルブロックの主記憶装置上のア
ドレスを所持する上位レベル索引キーを複数個所持した
唯一の最上位レベルブロックとの階層構造から構成され
る索引を補助記憶装置上におき、当該索引に対して、索
引キー値を以て検索する要求に対して、最上位レベルブ
ロックを主記憶装置上に読み込み、検索キー値と最上位
レベルブロック内の上位索引キーの索引キー値を比較す
ることにより、検索キー値と同値の索引キー値が含まれ
ると思われる直下の上位レベル索引ブロックを決定し、
これを最下位レベルブロックまで行うことによって、検
索キー値に合致する最下位レベルブロックに含まれる最
下位レベル索引キーを決定することにより、目的のデー
タを検索するための索引検索手段を有するデータベース
検索システムにおいて、索引情報退避手段と、特定ブロ
ック入力制御手段と、最下位レベル検索手段とを具備し
て構成したものである。
(Means for Solving Problems) A database search system according to the present invention is a nonvolatile auxiliary storage device capable of storing a large amount of data, and a small-capacity volatile main storage device capable of high-speed data access. All of the data that is composed of storage device and integrated with the minimum required redundancy is placed on the auxiliary storage device, and there are a plurality of lowest level index keys that have the index key value and the address of the data on the main storage device. A possessed lowest level index block, an index key value representing the lowest level block, and an upper level block possessing a plurality of upper level index key values possessing an address on the main memory of the lowest level block, Multiple upper-level index keys holding the upper-level block representative index key value and the address of the upper-level block on the main memory An index consisting of a hierarchical structure with the only top-level block possessed by it is placed in the auxiliary storage device, and the top-level block is stored in the main memory in response to a request to retrieve the index using the index key value. By reading on the device and comparing the search key value with the index key value of the upper index key in the top level block, the next higher level index block that seems to contain the same index key value as the search key value is found. Decide,
By performing this to the lowest level block, the lowest level index key included in the lowest level block that matches the search key value is determined, thereby searching the database having the index search means for searching the target data. The system comprises index information saving means, specific block input control means, and lowest level search means.

索引情報退避手段は、最新に検索した検索キーを含む
最下位レベルブロック番号および当該ブロックの主記憶
装置上におけるアドレスを記憶し退避するためのもので
ある。
The index information saving means is for storing and saving the lowest level block number including the latest searched search key and the address of the block in the main storage device.

特定ブロック入力制御手段は、当該索引を検索する際
に前記退避したブロックの前記記憶装置上におけるアド
レスを指示し、当該ブロックが指示された前記記憶装置
上に存在する場合には参照を可能とするためのものであ
る。
The specific block input control means indicates the address of the saved block in the storage device when searching the index, and enables the reference when the block exists in the specified storage device. It is for.

最下位レベル検索手段は、前記特定ブロック入力制御
手段によって参照が可能となったブロック内部に、求め
る索引キーが存在するか否かを判定するためのものであ
る。
The lowest level search means is for determining whether or not the desired index key exists inside the block which can be referred to by the specific block input control means.

(実施例) 次に、本発明について図面を参照して説明する。(Example) Next, this invention is demonstrated with reference to drawings.

第1図は、本発明によるデータベース検索システムを
実現する一実施例を示すブロツク図である。第1図にお
いて、10は索引検索手段、11は索引情報レコード参照手
段、12は上位レベル索引検索手段、13は最下位レベル索
引検索手段、14は索引情報退避手段、15は特定ブロツク
入力制御手段、16は主記憶装置、17は上位レベル索引ブ
ロツク、18は最下位レベル索引ブロツク、19は索引退避
情報、20は補助記憶装置である。
FIG. 1 is a block diagram showing an embodiment for realizing the database search system according to the present invention. In FIG. 1, 10 is an index retrieval means, 11 is an index information record referencing means, 12 is an upper level index retrieval means, 13 is a lowest level index retrieval means, 14 is index information saving means, and 15 is a specific block input control means. , 16 is a main storage device, 17 is an upper level index block, 18 is a lowest level index block, 19 is index save information, and 20 is an auxiliary storage device.

本発明による索引検索方式は、索引情報レコード参照
手段11、上位レベル索引検索手段12、下位レベル索引検
索手段13、ならびに索引情報退避手段14から成る索引検
索手段10と、特定ブロツク入力制御手段15と、主記憶装
置16と、補助記憶装置とから成る。索引情報レコード参
照手段11と、上位レベル索引検索手段12とは従来の技術
による手段と同様のものである。
The index search method according to the present invention comprises an index information record reference means 11, an upper level index search means 12, a lower level index search means 13, and an index information saving means 14, an index search means 10, and a specific block input control means 15. , A main storage device 16 and an auxiliary storage device. The index information record reference means 11 and the higher level index search means 12 are the same as the conventional technology.

第2図は、第1図の実施例における処理を示すフロー
チヤートである。これにもとづき説明する。
FIG. 2 is a flow chart showing the processing in the embodiment of FIG. It will be explained based on this.

第1に、索引検索手段10は主記憶装置16上に退避され
ている索引退避情報19が有効であるか判定する。索引退
避情報19は索引と一対一に存在し、第3図に示すように
退避された退避情報が有効か無効かを示すグラフと、最
新に検索した最下位レベル索引ブロツクのブロツク番号
と、主記憶装置16上のアドレスとから成る。判定した結
果、索引退避情報19が無効であるならば、従来技術によ
る検索を行う。一方、索引退避情報19が有効であるなら
ば最下位レベル索引検索手段13に制御を渡す。
First, the index search means 10 determines whether the index save information 19 saved in the main memory 16 is valid. The index save information 19 exists one-to-one with the index, and as shown in FIG. 3, a graph showing whether the saved save information is valid or invalid, the block number of the lowest-level index block searched most recently, and the main And the address on the storage device 16. If the index evacuation information 19 is invalid as a result of the determination, a search according to the conventional technique is performed. On the other hand, if the index save information 19 is valid, control is passed to the lowest level index search means 13.

第2に、最下位レベル索引検索手段13は索引退避情報
19の最下位レベルブロツク番号と、主記憶装置16上のア
ドレスとを指示し、特定ブロツク入力制御手段15に入力
を要求する。
Second, the lowest level index search means 13 is the index save information.
The lowest level block number 19 and the address on the main memory 16 are designated, and an input is requested to the specific block input control means 15.

第3に、入力要求のあつた最下位レベル索引ブロツク
番号が指示された主記憶装置16上のアドレスに存在し、
参照可能であるならば特定ブロツク入力制御手段15は参
照可能状態にして最下位レベル索引検索手段13に通知す
る。
Third, the lowest level index block number of the input request exists at the designated address on the main memory 16,
If the reference is possible, the specific block input control means 15 makes the reference possible and notifies the lowest level index search means 13.

上記の主記憶装置16上のアドレスに存在するか否かの
チェックは、主記憶上に読み込まれたブロックが、主記
憶装置の有効利用の目的のために、別のブロックの読み
込みに使われている可能性があるために行う。
It is checked whether the block read in the main memory is used for reading another block for the purpose of effective use of the main memory by checking whether the address exists in the main memory 16 or not. Because there is a possibility that

第4に、特定ブロツク入力制御手段15によつて参照不
可能が通知されたならば、最下位レベル索引検索手段13
は従来技術の制御と同様にして索引検索手段10に上記状
態を通知する。
Fourthly, if the non-reference is notified by the specific block input control means 15, the lowest level index retrieval means 13
Notifies the index search means 10 of the above-mentioned state in the same manner as the control of the prior art.

第5に、特定ブロツク入力制御手段15によつて、直前
に参照して最下位レベルブロツクが参照可能であること
が通知されると、最下位レベル索引検索手段13は求める
最下位レベル索引キーを検索する。ただし、このとき求
める最下位レベル索引キーが当該最下位レベル索引ブロ
ツクの範囲外であるならば、最下位レベル索引検索手段
13は従来技術による検索を行うよう索引検索手段10に通
知する。
Fifthly, when the specific block input control means 15 notifies that the lowest level block can be referred to immediately before, the lowest level index search means 13 determines the lowest level index key to be obtained. Search for. However, if the lowest level index key obtained at this time is outside the range of the lowest level index block, the lowest level index search means
13 notifies the index search means 10 to perform the search according to the conventional technique.

第6に、従来の方式、あるいは本発明の方式にかかわ
らず、検索によつて目的とする最下位レベル索引キーが
発見できたならば、索引情報退避手段14は、索引退避情
報19を主記憶装置16上に退避する。もし、最下位レベル
索引キーが未発見であるならば索引退避情報19のフラグ
を無効とする。
Sixthly, regardless of the conventional method or the method of the present invention, if the target lowest level index key can be found by the search, the index information saving means 14 stores the index save information 19 in the main memory. Retract on device 16. If the lowest level index key is not found, the flag of the index save information 19 is invalidated.

また、当該索引に対する検索がはじめてのとき、索引
退避情報19は無効として退避されている。
Also, when the index is searched for the first time, the index save information 19 is saved as invalid.

索引は目的とする索引キーを高速に検索することがで
きる。しかしながら、最終目的の最下位レベル索引キー
を得るには、検索毎に索引を構成する上位レベル索引ブ
ロックの検索を必要とする。本発明では直前に検索した
最下位レベルブロックを含む最下位レベル索引ブロック
に関する情報を記憶し、この記憶した最下位レベルブロ
ックから次の検索を行うことにより、次の検索に用いる
索引キーの最下位レベルブロックが直前に検索した索引
キー値と同一のブロックに含まれる場合、上位レベル索
引ブロックの検索を省略することができ、索引順などの
アクセスを行う場合には検索に要する時間を短縮するこ
とができる。
The index can search the target index key at high speed. However, in order to obtain the final purpose lowest level index key, each search requires a search of the higher level index blocks that make up the index. In the present invention, the information about the lowest level index block including the lowest level block searched immediately before is stored, and the next search is performed from the stored lowest level block, so that the lowest level of the index key used for the next search is stored. When the level block is included in the same block as the index key value searched immediately before, the search of the higher level index block can be omitted, and the time required for the search can be shortened when accessing the index order. You can

(発明の効果) 以上説明したように本発明は、直前に検索した最下位
レベルの索引キーを含む最下位レベル索引ブロツクを記
憶することにより、次に当該ブロツクに含まれる最下位
レベル索引キーを検索する際に同様の処理を繰り返すこ
となく高速に索引の検索処理を行うことができるという
効果がある。特に、索引キー経由の順アクセス処理、あ
るいは索引経由の動的アクセスで索引キー値が集中して
いるときには本発明はきわめて有効である。
(Effect of the invention) As described above, the present invention stores the lowest level index block including the lowest level index key retrieved immediately before, so that the lowest level index key included in the next block is stored. There is an effect that the index search processing can be performed at high speed without repeating the same processing when searching. In particular, the present invention is extremely effective when the index key values are concentrated by the sequential access processing via the index key or the dynamic access via the index.

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

第1図は、本発明によるデータベース検索システムを実
現する一実施例を示すブロツク図である。 第2図は、第1図の実施例における処理を示すフローチ
ヤートである。 第3図は、索引退避情報の形式を示す説明図である。 第4図は、従来技術による索引検索方式を示すブロツク
図である。 第5図は、索引における格納状況を示す説明図である。 第6図は、索引キーの形式を示す説明図である。 10,41……索引検索手段 11,42……索引情報レコード参照手段 12,43……上位レベル索引検索手段 13,44……最下位レベル索引検索手段 14……索引情報退避手段 15……特定ブロツク入力制御手段 16,45……主記憶装置 17,46……上位レベル索引ブロツク 18,47,53……最下位レベル索引ブロツク 19……索引退避情報 20,48……補助記憶装置 51……索引キー情報レコード 52……最上位レベル索引ブロツク 54……上位レベル索引キー 55……最下位レベル索引キー 56……最下位レベル索引キー
FIG. 1 is a block diagram showing an embodiment for realizing the database search system according to the present invention. FIG. 2 is a flow chart showing the processing in the embodiment of FIG. FIG. 3 is an explanatory diagram showing the format of the index save information. FIG. 4 is a block diagram showing an index search method according to the prior art. FIG. 5 is an explanatory diagram showing the storage status in the index. FIG. 6 is an explanatory diagram showing the format of the index key. 10, 41 …… Index search means 11, 42 …… Index information record reference means 12, 43 …… Upper level index search means 13, 44 …… Lowest level index search means 14 …… Index information saving means 15 …… Specification Block input control means 16,45 ...... Main memory 17,46 …… High level index block 18,47,53 …… Lowest level index block 19 …… Index save information 20,48 …… Auxiliary memory 51 …… Index key information record 52 …… Highest level index block 54 …… High level index key 55 …… Lowest level index key 56 …… Lowest level index key

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】大量のデータを記憶することが可能な不揮
発性の補助記憶装置と、高速なデータアクセスが可能な
小容量の揮発性の主記憶装置から構成され、 必要最低限の冗長さをもって統合されたデータのすべて
を補助記憶装置上におき、 索引キー値とデータの主記憶装置上のアドレスを所持す
る最下位レベル索引キーを複数個所持した最下位レベル
索引ブロックと、最下位レベル索引ブロックを代表する
索引キー値と当該最下位レベル索引ブロックの主記憶装
置上のアドレスを所持する上位レベル索引キー値を複数
個所持した上位レベル索引ブロックと、上位レベル索引
ブロックを代表する索引キー値と当該上位レベル索引ブ
ロックの主記憶装置上のアドレスを所持する上位レベル
索引キーを複数個所持した唯一の最上位レベル索引ブロ
ックとの階層構造から構成される索引を補助記憶装置上
におき、 当該索引に対して、索引キー値を以て検索する要求に対
して、最上位レベル索引ブロックを主記憶装置上に読み
込み、検索キー値と最上位レベル索引ブロック内の上位
索引キーの索引キー値を比較することにより、検索キー
値と同値の索引キー値が含まれると思われる直下の上位
レベル索引ブロックを決定し、これを最下位レベル索引
ブロックまで行うことによって、検索キー値に合致する
最下位レベル索引ブロックに含まれる最下位レベル索引
キーを決定することにより、目的のデータを検索するた
めの索引検索手段を有するデータベース検索システムに
おいて、 最新に検索した検索キーを含む最下位レベルブロック番
号、および当該ブロックの主記憶装置上におけるアドレ
スを記憶し退避するための索引情報退避手段と、 当該索引を検索する際に前記退避したブロックの前記記
憶装置上におけるアドレスを指示し、当該ブロックが指
示された前記記憶装置上に存在する場合には参照を可能
とするための特定ブロック入力制御手段と、 前記特定ブロック入力制御手段によって参照が可能とな
ったブロック内部に、求める索引キーが存在するか否か
を判定するために最下位レベル検索手段とを具備して構
成したことを特徴とするデータベース検索システム。
1. A non-volatile auxiliary storage device capable of storing a large amount of data and a small-capacity volatile main storage device capable of high-speed data access, and with minimum necessary redundancy. The lowest level index block that has all the integrated data on the auxiliary storage device, and the lowest level index block that holds the index key value and the lowest level index key that holds the address of the data on the main memory, and the lowest level index An index key value representing a block and an upper level index block having a plurality of upper level index key values holding the address on the main storage of the lowest level index block, and an index key value representing the upper level index block And the only top-level index block that has multiple higher-level index keys that have the address on the main memory of the higher-level index block. An index consisting of a hierarchical structure with a key is placed in the auxiliary storage device, and in response to a request to retrieve the index with the index key value, the highest level index block is read into the main storage device and the search key is retrieved. By comparing the value with the index key value of the higher index key in the highest level index block, we determine the next higher level index block that is likely to contain an index key value equal to the search key value, and A database search system having an index search means for searching target data by determining the lowest level index key included in the lowest level index block that matches the search key value by performing the process up to the lower level index block. , The lowest level block number including the search key that was searched most recently, and the address of the block in the main memory. And an index information saving means for storing and saving, and an address of the saved block on the storage device when searching the index, and when the block exists in the specified storage device. Is a specific block input control means for enabling reference, and the lowest level search for determining whether or not the index key to be sought exists inside the block that can be referenced by the specific block input control means. A database search system characterized by comprising means.
JP61250555A 1986-10-21 1986-10-21 Database search system Expired - Fee Related JP2540821B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61250555A JP2540821B2 (en) 1986-10-21 1986-10-21 Database search system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61250555A JP2540821B2 (en) 1986-10-21 1986-10-21 Database search system

Publications (2)

Publication Number Publication Date
JPS63104134A JPS63104134A (en) 1988-05-09
JP2540821B2 true JP2540821B2 (en) 1996-10-09

Family

ID=17209652

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61250555A Expired - Fee Related JP2540821B2 (en) 1986-10-21 1986-10-21 Database search system

Country Status (1)

Country Link
JP (1) JP2540821B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6061647B2 (en) * 2012-11-27 2017-01-18 キヤノン株式会社 File management apparatus, control method thereof, and program

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4871106A (en) * 1971-12-25 1973-09-26

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4871106A (en) * 1971-12-25 1973-09-26

Also Published As

Publication number Publication date
JPS63104134A (en) 1988-05-09

Similar Documents

Publication Publication Date Title
JP6205650B2 (en) Method and apparatus utilizing non-uniform hash function to place records in non-uniform access memory
US5261088A (en) Managing locality in space reuse in a shadow written B-tree via interior node free space list
JP4313323B2 (en) Searchable archive
US5544357A (en) Database accelerator
KR940005775B1 (en) Method of opening disk file
JPH09212528A (en) Method for storing data base, method for retrieving record from data base, and data base storage and retrieval system
EP0583108B1 (en) Entity-relation database
JP2540821B2 (en) Database search system
US20060085464A1 (en) Method and system for providing referential integrity constraints
JPH07334402A (en) Data base as main memory
CN115827653B (en) Pure column type updating method and device for HTAP and mass data
US11681705B2 (en) Trie data structure with subtrie data structures
JPH05189286A (en) System and method for controlling disk cache
JPH06103128A (en) Storage device
JPS62287350A (en) Index integrally updating system
JPH01255028A (en) Method for making access to external storage device
JPH1185585A (en) Method and device for complete memory resident index
JPH04336340A (en) Disk cache access control system
JP2615046B2 (en) Record addition processing method
JP2507399B2 (en) Database equipment
JPH01282635A (en) Index maintaining system
JPH0449132B2 (en)
JPS628819B2 (en)
JPH05225251A (en) Data base system
JPS589452B2 (en) Firmware broom

Legal Events

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