JPH04115333A - Method for processing data base management - Google Patents

Method for processing data base management

Info

Publication number
JPH04115333A
JPH04115333A JP2236550A JP23655090A JPH04115333A JP H04115333 A JPH04115333 A JP H04115333A JP 2236550 A JP2236550 A JP 2236550A JP 23655090 A JP23655090 A JP 23655090A JP H04115333 A JPH04115333 A JP H04115333A
Authority
JP
Japan
Prior art keywords
page
data
new
page group
processing
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
JP2236550A
Other languages
Japanese (ja)
Inventor
Mitsuhiro Ura
浦 満広
Kazutaka Ozawa
小澤 一孝
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 JP2236550A priority Critical patent/JPH04115333A/en
Publication of JPH04115333A publication Critical patent/JPH04115333A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To make it possible to immediately access data in a splitted state by adding a page in the case of splitting data, updating the page IDs of a distributing page and a new added page, pointing out the distributing page from the new page by a pointer, and at the time of failing the detection of required data in the new page, retrieving also undistributed data left in the distributing page. CONSTITUTION:A split processing part 15 sets up a pointer indicating a distributing page in control information set up in a new page, and when necessary, sets up flags indicating the execution of split processing in both the pages and updates directory information or the like. Said processing is executed so as to inhibit a data base managing part 12 from accessing a data base in a state occupying the whole data base e.g., and at the time of completing the processing, access inhibition is released. At the time of executing proper data redistribution, the processing part 15 redistributes data in the distributing page and an overflow page connected to the former page to the distributing page and the new page, and when necessary, also to the overflow page.

Description

【発明の詳細な説明】 〔概 要〕 計算機における、ダイナミックハツシング法による領域
管理を行なうデータベースに関し、ダイナミックハツシ
ング法によるスプリット処理を、データベースを利用す
るためのアクセスへの妨害をできるだけ少なくして実行
できるようにしたデータベース管理処理方法を目的とし
、記憶領域をページに分割し、データ内の所定のキーに
基づいてディレクトリから定まる各ページ群に当該デー
タを格納し、各該ページ群を1以上の連結した該ページ
で構成するデータベースにおいて、所定の契機を検出し
た場合には、新たな該ページを新ページ群として追加し
、該新ページ群に対応して設けるポインタに、該分配元
ページ群を指示する値を設定し、該新ページ群と該分配
元ページ群に対して該ディレクトリの内容を更新し、他
の所定の契機で、該分配元ページ群に格納されている全
データを、該分配元ページ群と該新ページ群とに再分配
して、該全データの再分配を完了した後、該新ページ群
の該ポインタを無効とし、該データベースのデータを所
与の該キーによって検索する場合には、該キーで定まる
該ページ群と、当該ページ群の有する有効な該ポインタ
で指示する該ページ群とを検索対象とするように構成す
る。
[Detailed Description of the Invention] [Summary] Regarding a database that performs area management using the dynamic hashing method in a computer, split processing using the dynamic hashing method is performed by minimizing interference with access to use the database. The purpose of the database management processing method is to divide the storage area into pages, store the data in each page group determined from the directory based on a predetermined key in the data, and store each page group in one or more pages. When a predetermined trigger is detected in the database composed of the linked pages, the new page is added as a new page group, and the source page group is added to the pointer provided corresponding to the new page group. , update the contents of the directory for the new page group and the distribution source page group, and at another predetermined opportunity, update all data stored in the distribution source page group. After completing the redistribution of all the data by redistributing it to the distribution source page group and the new page group, the pointer of the new page group is invalidated, and the data in the database is redistributed using the given key. When searching, the page group determined by the key and the page group pointed to by the valid pointer of the page group are configured to be searched.

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

本発明は、計算機における、ダイナミックハツシング法
による領域管理を行なうデータベースの管理処理方法に
関する。
The present invention relates to a database management processing method for performing area management using a dynamic hashing method in a computer.

(従来の技術] 第4図は計算機システムの構成例であって、計算機のデ
ータベースを利用する利用者は、例えば端末10から計
算機にアクセスして業務処理部11を起動して所要の業
務のための処理を実行し、そのためにデータベースへの
アクセスを要する場合には、データベース管理部12を
経てデータベース13にアクセスして、必要なデータを
検索したり、新たなデータを挿入したりする。スプリッ
ト処理部15はデータベースに関して後述のスプリット
処理を行う。
(Prior Art) FIG. 4 shows an example of the configuration of a computer system, in which a user who uses a computer database accesses the computer from, for example, a terminal 10 and starts a business processing unit 11 to perform a required business. When processing is performed and access to the database is required for that purpose, the database 13 is accessed via the database management unit 12 to search for necessary data or insert new data.Split processing The unit 15 performs split processing, which will be described later, on the database.

データベース13に蓄積されているデータは、例えば磁
気ディスク記憶装置等の大容量記憶頭載を適当な大きさ
のページ14に分割して、各ページに格納され、例えば
ページごとのページIDで識別され、そのページに格納
するデータ内の所定のキーをページIDに変換する関数
を利用することにより、必要なデータのキーによる検索
は、キーからページIOを求めて当該ページを読み出し
、そのページのデータのキーを走査して目的のデータを
得るようにする。
The data stored in the database 13 is stored in each page by dividing a large-capacity storage head such as a magnetic disk storage device into appropriately sized pages 14, and is identified by, for example, a page ID for each page. By using a function that converts a predetermined key in the data stored in that page into a page ID, you can search for the necessary data by key, obtain the page IO from the key, read the page, and retrieve the data of that page. scan the key to obtain the desired data.

このようにして所要のページを読み出すためには、キー
からページ10を決定し、そのページIDのページの物
理的な位置を決定するため等にデータベース13にある
制御情報にアクセスし、又あるページIDでアクセスす
べきページが複数ページに渡るときは、それらを順次読
み出さなければならない。
In order to read a desired page in this way, page 10 is determined from the key, control information in the database 13 is accessed to determine the physical location of the page with that page ID, and a certain page When there are multiple pages to be accessed with an ID, they must be read out sequentially.

従って、データベースにおいては、データを格納する記
憶領域の利用効率、即ち占有する記憶領域に対する有効
データの占める割合と、キーによるデータ検索の処理効
率、即ち1検索について何個のページにアクセスを要す
るかが、データベースの性能の主要な指標となり、両者
は一般に相反する要因があるので、両者に適当なトレー
ドオフを得るためのデータベースの各種管理方法が考え
られている。
Therefore, in a database, the utilization efficiency of the storage area for storing data, that is, the ratio of valid data to the occupied storage area, and the processing efficiency of data search by key, that is, how many pages need to be accessed for one search. is the main index of database performance, and since the two generally have conflicting factors, various database management methods have been considered to obtain an appropriate trade-off between the two.

そのような−管理方法にダイナミックハツシュ法がある
 (例えば、”Dynamic Hashir+5 S
chemesACM Computtng 5urve
ys、Vol、20+No、2.June1988、p
p、85−113を参照)。この方法は、記憶領域をペ
ージに分割して管理し、各データを、そのキーから決定
するページに格納する場合に、キーKから作る適当なビ
ット長のハツシュ関数による関数値h (K)からペー
ジIDを決定するようにし、データ量の増減に応じて、
割当ページの個数を増減するに伴い、ページIDのビッ
ト列として使用するビット長を伸縮するように管理する
ものである。
One such management method is the dynamic hashir method (for example, “Dynamic Hashir+5 S
chemesACM Computtng 5urve
ys, Vol, 20+No, 2. June 1988, p.
(See p. 85-113). This method divides the storage area into pages and stores each piece of data in a page determined from its key. The page ID is determined, and depending on the increase or decrease in the amount of data,
As the number of allocated pages increases or decreases, the bit length used as the bit string of the page ID is managed to expand or contract.

このダイナミックハツシュ法には、更に種々の方法が考
えられているが、ディレクトリ法とリニアハツシュ法が
よ(知られている。
Various methods have been considered for this dynamic hashing method, but the most popular are the directory method and the linear hashing method.

第2図はディレクトリ法を説明する図であり、第2図(
al)のように3ページからなる場合に、各ページを2
進木構造の葉ノードとして、例えば図のように構成する
と、そのときのディレクトリは(a2)のようになり、
この場合にページIDは2ビツトである。ディレクトリ
はキーを表す2進数の先頭から2ビツトを使って、図は
例えば「00」でディレクトリを引くとページAを指示
するポインタを得るように構成されていることを示す。
Figure 2 is a diagram explaining the directory method, and Figure 2 (
al), each page consists of 2 pages.
For example, if the leaf node of the advanced tree structure is configured as shown in the figure, the directory at that time will be like (a2),
In this case, the page ID is 2 bits. The directory uses the first two bits of the binary number representing the key, and the diagram shows that the directory is configured such that, for example, when the directory is retrieved with "00", a pointer pointing to page A is obtained.

次に例えばページAが一杯になる場合には、ページDを
第2図(bl)に示すような位置に追加して、ページI
Dを3ビツトに拡大し、ページAにあったデータを、キ
ーの先頭から3ビツトの「000」とrooI Jによ
ってページAとページDに分け、以後のディレクトリは
図の(b2)のように3ビツトのページIDで索引する
構造にする。このように、2進木構造の深さをデータ量
に応じて増減するのがディレクトリ法の基本的な考え方
である。
Next, for example, if page A becomes full, add page D to the position shown in Figure 2 (bl) and page I.
Expand D to 3 bits, divide the data on page A into page A and page D using the 3-bit "000" from the beginning of the key and rooI J, and create subsequent directories as shown in (b2) in the figure. Create a structure that indexes using 3-bit page IDs. The basic idea of the directory method is to increase or decrease the depth of the binary tree structure in accordance with the amount of data.

前記のページAのデータをページAとページDに再分配
するような操作をページのスプリットといい、適当な契
機でスプリット処理部15が起動されて処理する。ディ
レクトリ法の場合にスプリットする契機は、あるページ
で一定量のデータが蓄積されてスプリットすべき条件に
達することにより生じるが、ページが一杯になったら、
そのページにオーバフローベージをつないで、データを
一時格納しておき、ディレクトリを拡大してスプリット
を実行する時期は遅延するようにすることもできる。
The operation of redistributing the data of page A to page A and page D is called page splitting, and the split processing unit 15 is activated and processed at an appropriate opportunity. In the case of the directory method, the trigger for splitting occurs when a certain amount of data accumulates on a certain page and the condition for splitting is reached.
You can also connect an overflow page to that page, temporarily storing data, and then delaying the time to expand the directory and perform a split.

リニアハツシュ法の考え方は、論理的に連続する領域に
設けるページについて、スプリットポインタ(SP)の
指すページを次のスプリット対象ベージとして、適当な
契機でスプリットを行うごとに順次SPを次のページへ
進めるものとし、SPの前後によって適用するハツシュ
関数を異ならせるというものである。
The idea of the linear hash method is that for pages set in logically continuous areas, the page pointed to by the split pointer (SP) is the next page to be split, and each time a split is performed at an appropriate opportunity, the SP is sequentially advanced to the next page. The hash function to be applied differs depending on before and after SP.

第3図は、リニアハツシュ法を説明する図であり、図の
例では説明を簡単にするために、上記のハシシュ関数の
相違をビット長の相違として示し、ハツシュ関数がペー
ジIDに対応するものとして説明する。例えば初期状態
でページIDは2ビツトであるとすると、第3図(a)
のようにページIDr00」〜「11」に対応するペー
ジが論理的に連続する領域に設けられ、SPが先頭のペ
ージaを指すようにする。このようにして、データを入
力し、例えばデータが所定量増加すると、それをスプリ
ットの契機としてスプリット処理部15が起動し、SP
の指すページaを、(b)に示すようにページaとペー
ジAに再分配し、SPは次のページbを指示するように
更新する。
FIG. 3 is a diagram for explaining the linear hashing method. In the example shown in the figure, in order to simplify the explanation, the difference in the hashish functions described above is shown as a difference in bit length, and the hashish function is assumed to correspond to the page ID. explain. For example, if the page ID is 2 bits in the initial state, then the page ID in Fig. 3(a)
The pages corresponding to pages IDr00" to "11" are provided in a logically continuous area, and SP points to the first page a. In this way, when data is input and, for example, the data increases by a predetermined amount, the split processing unit 15 is started using this as a trigger for splitting, and the SP
Page a pointed to by is redistributed to page a and page A as shown in (b), and SP is updated to point to the next page b.

このようにスプリットが行われると、各ページIDは、
SPの指すページとそれより右のページは元のページI
Dで、それより左のページと追加したページは1ビット
長いページIDになるので、データベース管理部12は
ページを索引する場合にはそれを識別する必要がある。
When splitting is performed in this way, each page ID is
The page pointed to by SP and the pages to the right are the original page I
In D, the pages to the left and the added pages have page IDs that are 1 bit longer, so the database management unit 12 needs to identify them when indexing the pages.

この状態で更に所定量のデータが増加すると、SPの指
すページbを、図の(C)のようにページbとページB
に再分配し、SPは次のページCを指示する。更にデー
タが増加すれば、前記と同様に、順次ベージCを追加し
てページCをスプリットしく第3図(d))、ページd
にページDを追加しく第3図(e))、この時点ですべ
てのページ10が3ビツトになり、SPは再びページa
に移る。この間に各ページから溢れるデータはオーバフ
ローページをつないで格納しておき (第3図(d)に
おけるページb、d等)、当該ベージのスプリットが以
上のようにして行われる時に、オーバフローページのデ
ータを含めてスプリットする。
When the predetermined amount of data further increases in this state, page b pointed to by SP is changed to page b and page B as shown in (C) in the figure.
and SP points to the next page C. If the data further increases, page C is sequentially added in the same manner as above and page C is split (Fig. 3(d)), page d
(Fig. 3(e)), at this point all pages 10 are 3 bits, and SP is again page a.
Move to. During this time, the data overflowing from each page is stored by connecting the overflow pages (pages b, d, etc. in Figure 3 (d)), and when the page is split as described above, the data on the overflow page is stored. Split including.

〔発明が解決しようとする課B] 以上に説明したように、ダイナミックハツシング法で管
理するデータベースで、ページをスプリットする場合に
は、ページを索引する機構となるディレクトリあるいは
ページID等の変更を伴い、ベージ索引機構とページの
内容とに矛盾を生じないようにするためには、例えばス
プリット元のページへのアクセスを禁止した状態で、ペ
ージを追加してベージ間のデータの再分配を完了し、そ
の後データベースへのアクセスを一旦禁止して、ページ
索引機構を更新した後、アクセス禁止を解くというよう
な制御が必要になる。
[Question B to be solved by the invention] As explained above, when splitting pages in a database managed using the dynamic hashing method, it is necessary to change the directory or page ID, etc., which is the mechanism for indexing the pages. Therefore, in order to avoid conflicts between the page indexing mechanism and the page contents, for example, it is necessary to add pages and complete the redistribution of data between pages while prohibiting access to the split source page. However, after that, it is necessary to temporarily prohibit access to the database, update the page indexing mechanism, and then remove the access prohibition.

その場合に、スプリットのためのデータの再分配は、各
データのキーからづ−ジIDを求め、決定したページに
データを転送する処理を含むので、比較的長い処理時間
を要し、アクセス禁止期間が長くなる。そのために、オ
ンラインの応用業務等の比較的短い応答時間を要求され
る分野では、ダイナミックハツシング法を有効に利用で
きないという問題がある。
In that case, redistribution of data for splitting involves the processing of determining the page ID from the key of each data and transferring the data to the determined page, which requires a relatively long processing time and prohibits access. The period becomes longer. Therefore, there is a problem in that the dynamic hashing method cannot be used effectively in fields that require a relatively short response time, such as online application work.

本発明は、ダイナミックハツシング法によるスプリット
処理を、データベースを利用するためのアクセスへの妨
害をできるだけ少なくして実行できるようにしたデータ
ベース管理処理方法を目的とする。
An object of the present invention is to provide a database management processing method that enables split processing using the dynamic hashing method to be executed with as little interference as possible to access to use the database.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は、本発明の構成を示す処理の流れ図である。 FIG. 1 is a process flowchart showing the configuration of the present invention.

図はデータベース管理処理方法の構成であって、記憶領
域をページに分割し、データ内の所定のキーに基づいて
ディレクトリから定まる各ページ群に当該データを格納
し、各該ページ群を1以上の連結した該ページで構成す
るデータベースにおいて、スプリット処理部は所定の契
機を検出した場合には、第1図(a)に従い新たな該ペ
ージを新ページ群として追加しく処理ステップ1)、該
新ページ群に対応して設けるポインタに、該分配元ペー
ジ群を指示する値を設定しく処理ステップ2)、該新ペ
ージ群と該分配元ページ群に対して該ディレクトリの内
容を更新しく処理ステップ3)、他の所定の契機で、該
分配元ページ群に格納されている全データを、該分配元
ページ群と該新ページ群とに再分配して(処理ステップ
4)、該全データの再分配を完了した後、該新ページ群
の該ポインタを無効としく処理ステップ5)、データベ
ース管理部は該データベースのデータを所与の該キーに
よって検索する場合には、第1図(b)に従い該キーで
定まる該ページ群と、当該ページ群の有する有効な該ポ
インタで指示する該ページ群とを検索対象とする(処理
ステップ6〜9)。
The figure shows the configuration of a database management processing method, in which a storage area is divided into pages, the data is stored in each page group determined from a directory based on a predetermined key in the data, and each page group is divided into one or more pages. In a database composed of the linked pages, when the split processing unit detects a predetermined trigger, it adds the new page as a new page group according to FIG. 1(a). Processing step 1): Process step 2): Set a value indicating the distribution source page group in a pointer provided corresponding to the group; Process step 3): update the contents of the directory for the new page group and distribution source page group. , At another predetermined opportunity, all the data stored in the distribution source page group is redistributed to the distribution source page group and the new page group (processing step 4), and all the data is redistributed. After completing the processing step 5), the database management section invalidates the pointer of the new page group, and when searching for data in the database using the given key, the database management section invalidates the pointer of the new page group according to FIG. 1(b). The page group determined by the key and the page group pointed to by the valid pointer of the page group are searched (processing steps 6 to 9).

〔作 用〕[For production]

本処理方法により、スプリットを行う場合には、ページ
を追加し、分配元及び追加の新ページのページIDを更
新すると共に、新ページから分配元ページを指示するポ
インタを設けておき、検索で新ページに所要のデータを
検出できなかったときは、そのポインタに従って分配元
に残っている未再分配のデータも検索対象にできるよう
にするので、直ちにスプリット後の状態でアクセスする
ことが可能になる。又、データの再配分を行う契機は遅
延するものの、CPU負荷等を考慮した契機に再分配を
行うことができるので、オンライン業務処理等とデータ
再配分処理との負荷の集中を回避することができる。な
お、データ再配分を遅延した状態で、分配元への挿入要
求を満たすために格納域を空ける必要があれば、その時
に本来分配元ページから新ページに移動すべきデータを
一部だけ移動して、部分的に再分配を行うことができる
ので、分配元ページ群に新たなオーバフローページを追
加する必要は無い。
When performing a split using this processing method, add a page, update the page ID of the distribution source and the additional new page, and set a pointer that indicates the distribution source page from the new page. If the required data cannot be found on a page, the unredistributed data remaining at the distribution source can also be searched according to the pointer, making it possible to access it immediately after the split. . In addition, although the trigger for data redistribution is delayed, redistribution can be performed at an opportunity that takes into consideration CPU load, etc., so it is possible to avoid concentration of load between online business processing and data redistribution processing. can. Note that if data redistribution is delayed and it is necessary to free up a storage area in order to satisfy an insert request to the distribution source, at that time, only part of the data that should have been moved from the distribution source page to the new page will be moved. Therefore, there is no need to add a new overflow page to the distribution source page group.

〔実施例〕〔Example〕

スプリット契機は前記従来の場合と同様とし、スプリッ
ト処理のために第4図のスプリット処理部15が起動す
ると、第1図の処理ステップ1で、データベースにスプ
リットの分配先とする新ページを空きのま一追加する。
The trigger for the split is the same as in the conventional case, and when the split processing unit 15 in FIG. 4 starts up for split processing, in processing step 1 in FIG. I'll add one more thing.

スプリット処理部15は処理ステップ2で、新ページに
設けた制御情報に、分配元ページを指示するポインタを
設定し、又必要な場合には、両ページにスプリット処理
中を示すフラグを設定し、処理ステップ3でディレクト
リ情報等を更新する。
In processing step 2, the split processing unit 15 sets a pointer indicating the distribution source page in the control information provided on the new page, and if necessary, sets a flag indicating that split processing is in progress on both pages, In processing step 3, directory information etc. are updated.

以上の処理をデータベース管理部12によるデータベー
スへのアクセスを禁止するように、例えばデータベース
全体を占有する状態で行い、完了するとアクセス禁止を
解く。
The above processing is performed, for example, in a state where the entire database is occupied so as to prohibit access to the database by the database management unit 12, and when the processing is completed, the access prohibition is lifted.

以上におけるスプリット契機、新ページの配置、ディレ
クトリ更新内容等は、ディレクトリ法、リニアハツシュ
法等の管理法の相違により若干具なるが、何れの場合も
以上の処理の結果、新たな検索パスによって分配元ペー
ジ及び新ページにアクセス可能な制御情報が準備される
The split trigger, placement of new pages, directory update contents, etc. in the above differ slightly due to differences in management methods such as the directory method and the linear hash method, but in any case, as a result of the above processing, the distribution source is Control information that allows access to the page and the new page is prepared.

その後適当なデータ再分配実行の契機にスプリット処理
部15は、処理ステップ4で分配元ページ及びそれにつ
ながるオーバフローページのデータを、分配元ページと
新ページ及び必要な場合はそれらにつながるオーバフロ
ーページに再分配するが、スプリット処理部15はデー
タベース管理部12と競合する態様でアクセスし、必要
なページのみを占有して処理を進めるので、データベー
ス管理部12によるアクセスが並行できる。
Thereafter, in response to an appropriate data redistribution execution opportunity, the split processing unit 15 re-distributes the data of the distribution source page and the overflow page connected to it into the distribution source page and new page, and if necessary, the overflow page connected to them in processing step 4. However, the split processing unit 15 accesses in a manner competing with the database management unit 12 and proceeds with processing by occupying only necessary pages, so that the database management unit 12 can access in parallel.

このようにして、データの再分配を完了すると、処理ス
テップ5でスプリット処理中のフラグをリセットし、又
新ページのポインタを未設定を表す所定値にリセットし
て無効化する。
When the data redistribution is completed in this way, the split processing flag is reset in processing step 5, and the new page pointer is reset to a predetermined value indicating that it has not been set, thereby invalidating it.

並行してデータベースにアクセスするデータベース管理
部12は検索処理の場合に、第1図に示すように、処理
ステップ6でキーによって定まるページIDのページ及
びそれにつながるオーバフローベージを検索する処理を
行い、検索に成功しなかった場合には、処理ステップ7
で不成功と識別すると、処理ステップ8で前記ページI
Dのページの制御情報のポインタが有効かを識別する。
In the case of the search process, the database management unit 12 that accesses the database in parallel performs the process of searching for the page with the page ID determined by the key and the overflow pages connected to it in processing step 6, as shown in FIG. is not successful, processing step 7
If the page I is identified as unsuccessful in process step 8, the page I
It is determined whether the control information pointer of page D is valid.

ポインタが有効な場合には、そのポインタで指示する先
のページに再分配前のデータが残っている可能性がある
ので、処理ステップ9でポインタの指示光のページを新
たな検索対象にして処理ステップ6に戻り検索を行う。
If the pointer is valid, there is a possibility that data before redistribution remains on the page pointed to by the pointer, so in processing step 9, the page pointed to by the pointer is set as a new search target. Return to step 6 and perform the search.

第5図はディレクトリ法において、本発明を実施する場
合の処理の一例を説明する図であり、説明を簡単にする
ために、1ページは2データを格納する容量があるもの
とする。又ページIDはキーの末尾ビットとする。
FIG. 5 is a diagram illustrating an example of processing when implementing the present invention in the directory method. To simplify the explanation, it is assumed that one page has a capacity to store two pieces of data. Also, the page ID is the last bit of the key.

初め第5図(a)に示すようにディレクトリから指され
る1ページに、キーの002及び003のデータが格納
されているとし、ここでキー005のデータを挿入しよ
うとすると、ページがないので(b)のように空きペー
ジを追加し、新ページに元のページを指すポインタを設
定し、スプリット処理中を示すフラグを“1”にする。
Initially, data for keys 002 and 003 are stored on a page pointed to by the directory as shown in Figure 5(a), and when you try to insert data for key 005, the page does not exist. As shown in (b), an empty page is added, a pointer pointing to the original page is set on the new page, and a flag indicating that split processing is in progress is set to "1".

この状態で、挿入されるデータのキーが005なので、
(C)に示すようにページ10 r I Jのページジ
ヘ移動され、これでスプリットを完了するのでフラグを
“0”にリセットし、ポインタを無効化(図にφで示す
)する、なお、IDrOJのページに002.003の
データがある間に、例えばキー008のデータの挿入を
要するようになった場合には、スプリット処理中フラグ
が“1”であることにより、挿入処理の中で移動対象の
データを探して移動するようにしてもよい。
In this state, the key of the data to be inserted is 005, so
As shown in (C), it is moved to page 10 r I J, and this completes the split, so the flag is reset to "0" and the pointer is invalidated (indicated by φ in the figure). For example, if it becomes necessary to insert data for key 008 while there is data 002.003 on the page, the split processing flag is "1", so the data to be moved during the insertion processing is Alternatively, the data may be searched for and moved.

第6図は、リニアハツシュ法において、本発明を実施す
る場合の処理の一例を説明する図であり、この例も1ペ
ージは2データを格納する容量があるものとする。又ペ
ージIDはキーの末尾ビット列とする。
FIG. 6 is a diagram illustrating an example of processing when implementing the present invention in the linear hash method, and this example also assumes that one page has a capacity to store two data. Also, the page ID is the last bit string of the key.

初めにページID r00J〜「11」の4ページがあ
り、SPがページID rio」を指していたものとし
、例えばデータが3個挿入されるごとにページIDrl
oo Jより右のページが1ページづつ追加されて、S
Pは1ページ右へ移されて、スプリット処理が行われて
きて、第6図(a)に示すようにページ10 rlOJ
のページをスプリットするためのページとして、ページ
ID rllOJを追加する状態になった場合について
説明する。
Initially, there are four pages with page IDs r00J to "11", and SP points to page ID rio. For example, each time three pieces of data are inserted, page IDrl
oo Pages to the right of J are added one by one, and S
P is moved one page to the right and split processing is performed, and as shown in FIG. 6(a), page 10 rlOJ
A case will be described in which a page ID rllOJ is added as a page for splitting a page.

従って、SPはページID rllJへ進められ、新ペ
ージrllOJのポインタは元のページro10 Jを
指すように設定され、新ページ、元のページ、及びその
オーバフローページのフラグは“1”にされる。この状
態で、データベース管理部12による通常のアクセスが
可能であり、別の再配分実行の契機でデータの再分配を
行うと、(b)に示すようになる。
Therefore, SP is advanced to page ID rllJ, the pointer of the new page rllOJ is set to point to the original page ro10J, and the flags of the new page, the original page, and its overflow page are set to "1". In this state, normal access by the database management unit 12 is possible, and if data is redistributed in response to another redistribution execution, the result will be as shown in (b).

なお、データの再分配を元のページro10 Jからペ
ージごとに進め、ページr010 Jのデータの再分配
を終わったとき、新ページのポインタを、rolo J
ベージから、それにつながるオーバフローページを指示
するように更新して、スプリット処理中のrllo J
ページのデータの検索における処理効率を改善できる。
Note that data redistribution is proceeded page by page from the original page ro10J, and when the data redistribution of page r010J is finished, the pointer of the new page is changed to roloJ.
Update the page to point to the overflow page that leads to it, and use rllo J during the split process.
It can improve the processing efficiency of retrieving page data.

以上の説明では、ダイナミックハツシング法として、デ
ィレクトリ法とリニアハツシュ法について述べたが、そ
の他の方法例えばいわゆる部分拡張ハツシュ法等にも、
各方法により必要な場合は、新ページから元のページを
指示するポインタを複数設ける等の変更により、本発明
を同様に適用することができる。
In the above explanation, the directory method and linear hashing method have been described as dynamic hashing methods, but other methods such as the so-called partially expanded hashing method can also be used.
If necessary for each method, the present invention can be similarly applied by making changes such as providing a plurality of pointers pointing from the new page to the original page.

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

以上の説明から明らかなように本発明によれば、計算機
のダイナミックハツシング法による領域管理を行なうデ
ータベースにおいて、スプリット処理を、データベース
を利用するためのアクセスへの妨害をできるだけ少なく
して実行できるという著しい工業的効果がある。
As is clear from the above description, according to the present invention, split processing can be performed in a database whose area is managed by a computer's dynamic hashing method with as little interference as possible to access to use the database. It has significant industrial effects.

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

第1図は本発明の構成を示す処理の流れ図、第2図はデ
ィレクトリ法の説明図、 第3図はリニアハツシュ法の説明図、 第4図は計算機システムの構成例ブロック図、第5図は
本発明のディレクトリ法実施例説明図、第6図は本発明
のリニアハツシュ法実施例説明図である。図において、 1〜9は処理ステップ、10は端末、 11は業務処理部、   12はデータベース管理部、
13はデータベース、  14はページ、(al) (a2) (bl) (b2) ディレクトリ法の説明図 第2図 本発明の構成を示す処理の流れ図 第1図 リニアハツシュ法の説明図 第3図 計算機システムの構成例ブロンク図 第 図 本発明のディレクトリ法実施例説明図 本発明のリニアハッシェ法実施例説明図第 図
Fig. 1 is a process flowchart showing the configuration of the present invention, Fig. 2 is an explanatory diagram of the directory method, Fig. 3 is an explanatory diagram of the linear hash method, Fig. 4 is a block diagram of an example configuration of a computer system, and Fig. 5 is an explanatory diagram of the directory method. FIG. 6 is an explanatory diagram of an embodiment of the directory method of the present invention. FIG. 6 is an explanatory diagram of an embodiment of the linear hash method of the present invention. In the figure, 1 to 9 are processing steps, 10 is a terminal, 11 is a business processing unit, 12 is a database management unit,
13 is a database, 14 is a page, (al) (a2) (bl) (b2) An explanatory diagram of the directory method. Figure 2. A process flow diagram showing the configuration of the present invention. Figure 1. An explanatory diagram of the linear hash method. Figure 3. A computer system. Configuration example bronc diagram Diagram explanatory diagram of an embodiment of the directory method of the present invention Diagram explanatory diagram of an embodiment of the linear hash method of the present invention

Claims (1)

【特許請求の範囲】 記憶領域をページに分割し、データ内の所定のキーに基
づいてディレクトリから定まる各ページ群に当該データ
を格納し、各該ページ群を1以上の連結した該ページで
構成するデータベースにおいて、 所定の契機を検出した場合には、新たな該ページを新ペ
ージ群として追加し(1)、該新ページ群に対応して設
けるポインタに、該分配元ページ群を指示する値を設定
し(2)、該新ページ群と該分配元ページ群に対して該
ディレクトリの内容を更新し(3)、 他の所定の契機で、該分配元ページ群に格納されている
全データを、該分配元ページ群と該新ページ群とに再分
配して(4)、該全データの再分配を完了した後、該新
ページ群の該ポインタを無効とし(5)、 該データベースのデータを所与の該キーによって検索す
る場合には、該キーで定まる該ページ群と、当該ページ
群の有する有効な該ポインタで指示する該ページ群とを
検索対象とする(6〜9)ように構成されていることを
特徴とするデータベース管理処理方法。
[Claims] A storage area is divided into pages, the data is stored in each page group determined from a directory based on a predetermined key in the data, and each page group is composed of one or more linked pages. When a predetermined trigger is detected in the database, a new page is added as a new page group (1), and a value indicating the distribution source page group is added to a pointer provided corresponding to the new page group. (2), updates the contents of the directory for the new page group and the distribution source page group (3), and at another predetermined trigger, updates all data stored in the distribution source page group. is redistributed to the distribution source page group and the new page group (4), and after completing the redistribution of all the data, the pointer of the new page group is invalidated (5), and the database is When searching for data using a given key, the page group determined by the key and the page group pointed to by the valid pointer of the page group are searched (6 to 9). A database management processing method comprising:
JP2236550A 1990-09-05 1990-09-05 Method for processing data base management Pending JPH04115333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2236550A JPH04115333A (en) 1990-09-05 1990-09-05 Method for processing data base management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2236550A JPH04115333A (en) 1990-09-05 1990-09-05 Method for processing data base management

Publications (1)

Publication Number Publication Date
JPH04115333A true JPH04115333A (en) 1992-04-16

Family

ID=17002317

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2236550A Pending JPH04115333A (en) 1990-09-05 1990-09-05 Method for processing data base management

Country Status (1)

Country Link
JP (1) JPH04115333A (en)

Similar Documents

Publication Publication Date Title
US4677550A (en) Method of compacting and searching a data index
US6457021B1 (en) In-memory database system
US5355481A (en) Data base access system
JP2002501256A (en) Database device
US7269589B2 (en) Database managing method and system having data backup function and associated programs
EP3995972A1 (en) Metadata processing method and apparatus, and computer-readable storage medium
JPH08235040A (en) Data file management system
JPH09305622A (en) Method and system for managing data base having document retrieval function
JPH04115333A (en) Method for processing data base management
JP2675958B2 (en) Information retrieval computer system and method of operating storage device thereof
JP2000090115A (en) Index generating method and retrieval method
Omiecinski Concurrent file reorganization: Clustering, conversion and maintenance
JP2586610B2 (en) File creation method
JPH0456344B2 (en)
JP2871755B2 (en) Split control method in dynamic hash
JPH1185585A (en) Method and device for complete memory resident index
JPH04112253A (en) Data accessing method using multilayer buffer
JPH0283640A (en) Data base updating method
JP2604787B2 (en) Two-dimensional data storage method
JPH0962696A (en) Data base managing system
JP2658097B2 (en) Secondary file creation method
JP2643850B2 (en) File processing device
JP2722660B2 (en) How to manage indexed sequential files
JPH02116936A (en) Reorganizing system
JPH09305449A (en) Data base managing system