JPH11154109A - System for dividing index storage area - Google Patents

System for dividing index storage area

Info

Publication number
JPH11154109A
JPH11154109A JP9320783A JP32078397A JPH11154109A JP H11154109 A JPH11154109 A JP H11154109A JP 9320783 A JP9320783 A JP 9320783A JP 32078397 A JP32078397 A JP 32078397A JP H11154109 A JPH11154109 A JP H11154109A
Authority
JP
Japan
Prior art keywords
page
key value
entry
added
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.)
Pending
Application number
JP9320783A
Other languages
Japanese (ja)
Inventor
Sukeyoshi Segata
祐喜 瀬形
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP9320783A priority Critical patent/JPH11154109A/en
Publication of JPH11154109A publication Critical patent/JPH11154109A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To improve the efficiency of a page use which does not become the storage destination of continuous key values and to improve the page use rate as a whole by adjusting a storage destination page with the key value which is logically positioned in the center as a reference in a key value group in the page. SOLUTION: If an entry having a key value '28' is added when the entries which continuously have '27' from the key value '22' are added, they are added in the latter half with the entry having the key value '23' which is logically Positioned in the center of an index page P2 as the reference. Thus, a boundary is decided between the entry group to the entries having the key value '27' which is smaller than the key value '28' of the added entry and which is the nearest and the remaining entry group containing the entries having the added key value '28'. The entry group which does not contain the entry having the added key value '28' based on the decided boundary is moved to an index page P3 and a division processing is completed.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、インデクスを有す
るデータベース管理システムに関し、特に、空領域のな
いページにキー値を追加する場合のインデクス格納ペー
ジ分割方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database management system having an index, and more particularly, to a method of dividing an index storage page when adding a key value to a page having no empty area.

【0002】[0002]

【従来の技術】従来、データベース管理システムにおい
て、空領域のないページにキー値を追加しようとする場
合、特開昭62−211748号にあるように、ページ
内のキー数を等分し、2つのページに分割して格納する
等分割方式、ページに対するキー値の論理的な追加位置
を境界として分割して格納するキー値順格納時分割方式
が用いられている。
2. Description of the Related Art Conventionally, in a database management system, when an attempt is made to add a key value to a page having no empty area, the number of keys in the page is equally divided as described in JP-A-62-211748. An equal-division method that divides and stores the data into one page, and a key-value-sequential storage time-division method that divides and stores the logical value at a logical addition position of the page as a boundary are used.

【0003】[0003]

【発明が解決しようとする課題】上述した従来の等分割
格納方式では、データをキー値順に連続して追加する場
合、ページ分割の度に空領域がページの約50%を占
め、ページ利用率が悪化するという問題がある。また、
キー値順格納時分割方式では、データをキー順に連続し
て追加する場合、追加対象ページを値の隣接する小さい
キー値が格納されたページとするデータベース管理シス
テムでは、キー値順に見て追加キー値の直後、追加対象
ページを値の隣接する大きいキー値が格納されたページ
とするデータベース管理システムでは、キー値順に見て
追加キー値の直前を境界として分割して格納するため、
追加位置によっては、ページ分割後にデータがキー値順
に連続して追加されないページの利用率が50%未満と
なる場合があるという問題がある。
In the conventional equal-division storage method described above, when data is successively added in the order of the key value, the empty area occupies about 50% of the page every time the page is divided, and the page utilization rate is increased. There is a problem that is worse. Also,
In the key value order storage time division method, when data is successively added in the key order, the page to be added is a page in which the smaller key value adjacent to the value is stored. Immediately after the value, in the database management system where the page to be added is a page in which a large key value adjacent to the value is stored, the page is divided and stored just before the additional key value as a boundary in the order of the key value.
Depending on the addition position, there is a problem that the utilization rate of a page to which data is not continuously added in the order of the key value after page division may be less than 50%.

【0004】本発明の目的は、データをキー値順に連続
して追加する場合に、キー値の追加対象となる空領域の
ないページ内のキー値群をページに対するキー値の論理
的な追加位置を境界として2つのページに分割して格納
するとき、連続するキー値が以降に追加されることを予
測し、連続するキー値の格納先となるページの空領域を
広く確保し、連続するキー値の格納先とならないページ
の利用率を高めるよう調整し、全体としてのページ利用
率の向上を図ることができるページ分割方法を提供する
ことにある。
SUMMARY OF THE INVENTION An object of the present invention is to, when data is successively added in the order of a key value, set a key value group in a page having no empty area to which the key value is to be added in a logical addition position of the key value to the page. When storing in two pages with a boundary as a boundary, it is predicted that a continuous key value will be added later, a large empty area of the page as a storage destination of the continuous key value is secured, and a continuous key value is stored. It is an object of the present invention to provide a page division method capable of adjusting so as to increase the usage rate of a page that does not store a value and improving the overall page usage rate.

【0005】[0005]

【課題を解決するための手段】上記の目的を解決するた
め、本発明のページ分割方法は、連続するキー値が以降
に追加されることを予測し、連続するキー値の格納先と
なるページの空領域を広く確保するため、対象となるペ
ージへのキー値の論理的な追加位置が、ページ内のキー
値群のうち論理的に真ん中に位置するキー値を基準とし
て前半部であれば、分割により小さいキー値群が格納さ
れるページ、後半部であれば、分割により大きいキー値
群が格納されるページを追加キー値の格納先ページとす
るよう調整することを特徴とする。
In order to solve the above-mentioned object, a page dividing method according to the present invention predicts that a continuous key value will be added later, and sets a page as a storage destination of the continuous key value. If the logical addition position of the key value to the target page is the first half based on the key value that is logically located at the center of the key value group in the page to secure a wide empty area of The page is characterized in that the page in which the smaller key value group is stored in the division and the page in which the larger key value group is stored in the second half are set as the storage destination page of the additional key value.

【0006】[0006]

【発明の実施の形態】以下、本発明の実施の形態を図面
を用いて具体的に説明する。
Embodiments of the present invention will be specifically described below with reference to the drawings.

【0007】図1は、本発明の一実施例におけるデータ
ベース管理システムを含むオンラインシステム構成を示
したものである。図1において、電子計算機10にはオ
ンライン処理で使用するオンライン端末11およびデー
タベース12を格納する外部記憶装置13が接続されて
いる。電子計算機には、端末からの入力によってトラン
ザクション制御をするオンラインプログラム14、トラ
ンザクション処理を行う業務プログラム15、業務プロ
グラムからの要求により、データベース12が格納され
ている外部記憶装置13に対してデータの格納、取り出
しを行うデータベース管理システム16が接続されてい
る。
FIG. 1 shows an online system configuration including a database management system according to an embodiment of the present invention. In FIG. 1, an online terminal 11 used for online processing and an external storage device 13 for storing a database 12 are connected to the computer 10. The electronic computer has an online program 14 for performing transaction control based on input from a terminal, a business program 15 for performing transaction processing, and storing data in an external storage device 13 storing a database 12 in response to a request from the business program. , A database management system 16 for performing the retrieval.

【0008】図2は、データベース12の構成例を示し
たものであり、データ21を格納するデータページ22
と、データの格納位置を管理するためのインデクス部2
3からなる。インデクス23は木構造をしており、キー
値とキー値を有するデータの格納位置を示すポインタ情
報からなるエントリ24を持つ。業務プログラムからの
データ格納要求を受けると、追加データの格納位置を示
すポインタ情報を有するエントリの格納先となるインデ
クスページを決定し、エントリを追加できる空領域があ
るかチェックする。その結果、エントリを追加できる空
領域がない場合にインデクスページの分割処理を行う。
FIG. 2 shows an example of the configuration of the database 12. The data page 22 stores data 21.
And an index unit 2 for managing data storage positions
Consists of three. The index 23 has a tree structure, and has an entry 24 including a key value and pointer information indicating a storage position of data having the key value. When a data storage request is received from the business program, an index page as a storage destination of an entry having pointer information indicating a storage position of additional data is determined, and it is checked whether there is an empty area to which an entry can be added. As a result, when there is no empty area to which an entry can be added, the index page is divided.

【0009】図3(A)、(B)、および、図4
(A)、(B)に、本発明によるインデクスのエントリ
の格納状態の遷移を示し、エントリの追加対象となるペ
ージを決定する場合に、大きく且つ一番近いキー値を持
つエントリが格納されたページに格納する手段を用いる
場合を例に、図5のインデクスページ分割処理の流れを
示すフローチャートを参照して説明する。
FIGS. 3A, 3B and 4
(A) and (B) show the transition of the storage state of the index entry according to the present invention, and when determining the page to which the entry is to be added, the entry having the largest and closest key value is stored. An example in which a unit for storing a page is used will be described with reference to a flowchart showing the flow of the index page division process in FIG.

【0010】まず、ステップ41において、エントリの
追加位置がインデクスページの前半部(追加するエント
リのキー値が、インデクスページ内のエントリのうち論
理的に真ん中に位置するエントリのキー値以下)か、後
半部(追加するエントリのキー値が、インデクスページ
内のエントリのうち論理的に真ん中に位置するエントリ
のキー値より大きい値)かをチェックする。
First, in step 41, whether the entry is to be added in the first half of the index page (the key value of the entry to be added is equal to or less than the key value of the entry in the index page that is logically located in the middle) It is checked whether the latter half (the key value of the entry to be added is larger than the key value of the entry located logically in the middle of the entries in the index page).

【0011】次に、連続するキー値を持つエントリが以
降に追加されることを予測し、連続するキー値を持つエ
ントリの格納先となるインデクスページの空領域を広く
確保しておくよう分割の境界を次のように決定する。
Next, it is predicted that an entry having a continuous key value will be added later, and the division is performed so as to secure a wide empty area of an index page as a storage destination of the entry having a continuous key value. The boundaries are determined as follows.

【0012】図3(A)に示すような空領域のないイン
デクスページP1に対してキー値「21」を持つエント
リを追加する場合、インデクスページP1の論理的に真
ん中に位置するキー値「50」を持つエントリを基準と
して前半部に追加されるため、YESを選択し、ステッ
プ42において、追加するエントリを含む、インデクス
ページP1内の最小キー値「10」を持つエントリか
ら、追加するエントリのキー値「21」より大きく且つ
一番近いキー値「40」を持つエントリまでのエントリ
群と、残りのエントリ群とに境界を決定する。
When an entry having a key value "21" is added to an index page P1 having no empty area as shown in FIG. 3A, a key value "50" logically located at the center of the index page P1 is added. Is added to the first half based on the entry having ".", YES is selected, and in step 42, from the entry having the minimum key value "10" in the index page P1 including the entry to be added, A boundary is determined between the entry group up to the entry having the closest key value “40” that is larger than the key value “21” and the remaining entry group.

【0013】次にステップ44で、決定した境界をもと
に追加するキー値「21」を持つエントリを含むエント
リ群をインデクスページP2に移動し、分割処理を完了
する。
Next, in step 44, the entry group including the entry having the key value "21" to be added based on the determined boundary is moved to the index page P2, and the division processing is completed.

【0014】更に、キー値「22」から連続して「2
7」を持つエントリまでの追加が行われた図4(A)に
示すような状態である時、キー値「28」を持つエント
リを追加する場合、インデクスページP2の論理的に真
ん中に位置するキー値「23」を持つエントリを基準と
して後半部に追加されるため、NOを選択し、ステップ
43において、追加するエントリのキー値「28」より
小さく且つ一番近いキー値「27」を持つエントリまで
のエントリ群と、追加するキー値「28」を持つエント
リを含む、残りのエントリ群とに境界を決定する。
Further, "2" continues from the key value "22".
When the entry having the key value "28" is added in a state as shown in FIG. 4A in which the entry up to the entry having "7" is added, the entry is logically located at the center of the index page P2. Since the entry having the key value "23" is added to the latter half based on the entry, "NO" is selected, and in step 43, the entry having the key value "27" smaller than and closest to the key value "28" of the entry to be added is selected. A boundary is determined between the entry group up to the entry and the remaining entry group including the entry having the key value “28” to be added.

【0015】次にステップ44で、決定した境界をもと
に追加するキー値「28」を持つエントリを含まないエ
ントリ群をインデクスページP3に移動し、分割処理を
完了する。
Next, in step 44, the entry group not including the entry having the key value "28" to be added based on the determined boundary is moved to the index page P3, and the division processing is completed.

【0016】以上説明したように、本実施例によるペー
ジ分割処理方法によれば、分割後の追加エントリの格納
先を動的に決定することによって、ページ利用率を向上
することができる。
As described above, according to the page division processing method according to the present embodiment, the page utilization rate can be improved by dynamically determining the storage location of the divided additional entry.

【0017】[0017]

【発明の効果】以上説明したように、本発明のページ分
割方法によれば、データをキー順に連続して追加する場
合に、記憶装置全体としてのページ利用率を向上するこ
とができる。
As described above, according to the page dividing method of the present invention, when data is continuously added in the key order, the page utilization rate of the entire storage device can be improved.

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

【図1】本発明によるデータベースを有するオンライン
システムの構成例を示す図。
FIG. 1 is a diagram showing a configuration example of an online system having a database according to the present invention.

【図2】本発明の対象となるデータベースの構成例を示
す図。
FIG. 2 is a diagram showing a configuration example of a database to which the present invention is applied.

【図3】(A)、(B)は、本発明によるページの前半
部にエントリを追加する場合のページの利用状態の遷移
を示す図。
FIGS. 3A and 3B are diagrams showing transition of a use state of a page when an entry is added to the first half of the page according to the present invention.

【図4】(A)、(B)は、本発明によるページの後半
部にエントリを追加する場合のページの利用状態の遷移
を示す図。
FIGS. 4A and 4B are diagrams showing transition of a use state of a page when an entry is added to the latter half of the page according to the present invention.

【図5】ページ分割処理の流れを示すフローチャート図
である。
FIG. 5 is a flowchart illustrating a flow of a page division process.

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

11…オンライン端末、 12…データベース、1
3…外部記憶装置、 14…オンライン管理プロ
グラム、15…業務プログラム、 16…データベ
ース管理プログラム、21…データ、 2
2…データページ、23…インデクスページ、 24
…インデクスエントリ、
11: Online terminal, 12: Database, 1
3 external storage device 14 online management program 15 business program 16 database management program 21 data 2
2 ... data page, 23 ... index page, 24
… Index entry,

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】記憶領域をページ単位に分割し、各ページ
にインデクスのキー値をキー順に格納するデータベース
管理システムにおいて、空領域のないインデクス格納ペ
ージにキー値を追加する場合に、ページ内のキー値群を
ページに対するキー値の論理的な追加位置を境界として
2つのページに分割して格納するとき、連続するキー値
が以降に追加されることを予測し、連続するキー値の格
納先となるページの空領域を広く確保するため、対象と
なるページへのキー値の論理的な追加位置が、ページ内
のキー値群のうち論理的に真ん中に位置するキー値を基
準として前半部であれば、分割により小さいキー値群が
格納されるページ、後半部であれば、分割により大きい
キー値群が格納されるページを追加キー値の格納先ペー
ジとするよう調整し、ページ利用率を向上することを特
徴とするページ分割方法。
In a database management system that divides a storage area into pages and stores index key values in key order in each page, when a key value is added to an index storage page having no empty area, When a key value group is divided and stored in two pages with the logical addition position of the key value to the page as a boundary, it is predicted that successive key values will be added later, and the storage destination of the successive key values In order to secure a large empty area on the target page, the logical addition position of the key value to the target page is set in the first half of the key value group in the page, based on the key value that is logically located in the center. If so, adjust the page where the smaller key value group is stored in the division, and if it is the second half, adjust the page where the larger key value group is stored as the storage page for the additional key value , Page division method characterized by improving the page utilization.
JP9320783A 1997-11-21 1997-11-21 System for dividing index storage area Pending JPH11154109A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9320783A JPH11154109A (en) 1997-11-21 1997-11-21 System for dividing index storage area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9320783A JPH11154109A (en) 1997-11-21 1997-11-21 System for dividing index storage area

Publications (1)

Publication Number Publication Date
JPH11154109A true JPH11154109A (en) 1999-06-08

Family

ID=18125203

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9320783A Pending JPH11154109A (en) 1997-11-21 1997-11-21 System for dividing index storage area

Country Status (1)

Country Link
JP (1) JPH11154109A (en)

Similar Documents

Publication Publication Date Title
US6658549B2 (en) Method and system allowing a single entity to manage memory comprising compressed and uncompressed data
JP2708657B2 (en) Split control method
JP3034873B2 (en) Information processing device
US5430874A (en) Control method and system for managing memory control blocks of programmed tasks in a multi-processing system
JPH11154109A (en) System for dividing index storage area
JPS61216016A (en) Area control system for data base
Wilkes The design of multiple-access computer systems
JP2615046B2 (en) Record addition processing method
JPH05314179A (en) Data retrieval processing method for distributed data base
JP2562515B2 (en) Direct access storage device selection processing method
JPH0962696A (en) Data base managing system
JPH01181121A (en) Memory area allocating system
JPH03196345A (en) Data input/output system
CN116226081A (en) Database elastic expansion method and device, electronic equipment and storage medium
JP2654230B2 (en) File transfer method
JPH1040147A (en) System controlling virtual file cache
JPH09244958A (en) Paging method and system therefor
JPH0498542A (en) File control system
JPH0228846A (en) Data storing system
JPS6389951A (en) Cache memory device
JPH04199338A (en) Data base management system
JP2001184262A (en) Cache memory structure and cache memory device
JPS62229345A (en) File multiplexing system
JPH03255549A (en) Record exclusion system
JPH04369076A (en) Distributed type data base processing system