JP2000259460A - Database system and data updating system therefor - Google Patents
Database system and data updating system thereforInfo
- Publication number
- JP2000259460A JP2000259460A JP11067043A JP6704399A JP2000259460A JP 2000259460 A JP2000259460 A JP 2000259460A JP 11067043 A JP11067043 A JP 11067043A JP 6704399 A JP6704399 A JP 6704399A JP 2000259460 A JP2000259460 A JP 2000259460A
- Authority
- JP
- Japan
- Prior art keywords
- page
- record
- data
- database
- page number
- 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
Links
- 238000012545 processing Methods 0.000 claims abstract description 79
- 238000007726 management method Methods 0.000 claims description 80
- 238000000034 method Methods 0.000 claims description 48
- 230000008569 process Effects 0.000 claims description 29
- 230000008859 change Effects 0.000 claims description 4
- 238000013500 data storage Methods 0.000 claims description 4
- 230000001629 suppression Effects 0.000 claims 1
- 238000012423 maintenance Methods 0.000 abstract description 2
- 230000007717 exclusion Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 238000003780 insertion Methods 0.000 description 6
- 230000037431 insertion Effects 0.000 description 6
- 230000004913 activation Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、データベースシス
テムにおけるデータ更新方式に関し、データベースの管
理レコードに従ってデータ更新するデータベースシステ
ムとそのデータ更新方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data updating system in a database system, and more particularly to a database system for updating data in accordance with a management record of the database and a data updating system thereof.
【0002】[0002]
【従来の技術】従来のデータベースシステムにおけるデ
ータ更新方式の一例が、特開昭59−020068号公
報に記載されている。この従来のデータ更新方式は、各
ページに自身のページ番号、前ページ番号、次ページ番
号及びページ内レコード数を表すページ情報が付加され
ている順編成ファイルと、ファイルアクセスの際の情報
を有するファイルコントロールブロックと、これを記憶
する補助記憶装置と、演算制御装置とファイルコントロ
ールブロックを主記憶にロードする手段と、ファイルコ
ントロールブロックを更新する手段と、更新ページのペ
ージ情報を変更する追加/削除手段とから構成されてい
る。2. Description of the Related Art An example of a data updating method in a conventional database system is described in Japanese Patent Application Laid-Open No. 59-02068. This conventional data update method has a sequential file in which each page is added with page information indicating its own page number, previous page number, next page number, and the number of records in a page, and information at the time of file access. File control block, auxiliary storage device for storing the same, means for loading the arithmetic control unit and file control block into main memory, means for updating the file control block, and addition / deletion for changing the page information of the updated page Means.
【0003】このような構成を有する従来のデータ更新
方式は、つぎのように動作する。すなわち、レコード追
加時に挿入位置(ページ)をプロセス毎に保持してお
き、挿入ページに空きがない場合にはその前後のページ
にページ間チェーンを辿って、該当ページに格納されて
いるレコードを移送し、空き領域を作り、そこにレコー
ドを格納する方式と、空きが見つからない場合には新た
なページを挿入位置のページの前(又は後ろ)にページ
間チェーンを張り替えることによって挿入し、このペー
ジにレコードを追加するような技術が記載されている。The conventional data updating method having such a configuration operates as follows. That is, the insertion position (page) is retained for each process when a record is added, and if there is no space in the inserted page, the record stored in the relevant page is transferred by following the inter-page chain to the previous and next pages. Then, a method of creating an empty area and storing records therein, and, if no empty area is found, inserting a new page by replacing a chain between pages before (or after) the page at the insertion position. It describes a technique for adding records to a page.
【0004】また、同様なデータベースの更新方式とし
て、特開平9−330254号公報には、新たにレコー
ド格納領域を確保した際にホスト計算機間通信機能手段
によらずとも、領域確保時にデータベースファイル内の
領域管理ページに新規登録しておき、必要に応じて領域
管理ページを読み出せば常に最新の状態のレコード格納
領域の管理領域を取り出せるようにして、レコード格納
領域の確保処理における制御処理の簡素化、処理時間の
短縮を図っている。Japanese Patent Laid-Open Publication No. 9-330254 discloses a similar database updating method. When a new record storage area is secured, the database file is not allocated when the area is secured without using the host computer communication function means. Simplify the control process in securing the record storage area by newly registering it in the area management page and reading out the area management page as needed so that the management area of the latest record storage area can always be retrieved. And shorten the processing time.
【0005】また、特開平10−320258号公報に
は、他の利用者によるデータベースの更新処理中の排他
単位に格納されているデータを読み込んでも構わない無
排他検索要求について、アクセス要求について無排他検
索要求か否かを決定し、排他制御を行わないようにする
ことで、検索処理を高速化することが記載されている。Japanese Unexamined Patent Application Publication No. 10-320258 discloses a non-exclusive search request that may read data stored in an exclusive unit during a database update process by another user. It describes that a search process is speeded up by determining whether or not a search request is made and not performing exclusive control.
【0006】また、特開平7−105060号公報に
は、ページ内に格納するレコードの数を制限して、ペー
ジ排他の競合を抑え、ページ排他方式を使用してレコー
ド排他方式と同等の排他競合性能を得るため、レコード
アクセス管理としてレコードとページの対応付け、ペー
ジ管理、ページ排他等の処理部を設け、同一ページ内の
複数のレコードが異なるトランザクションから同時にア
クセスされる場合、レコード数に上限を設け、この競合
を一定の確率以下に抑えて、アクセスされるページの混
濁を防止することが開示されている。[0006] Japanese Patent Application Laid-Open No. 7-105060 discloses that the number of records stored in a page is limited to suppress contention of page exclusion, and to use the page exclusion method to obtain the same exclusion contention as the record exclusion method. In order to obtain performance, a processing unit such as mapping of records and pages, page management, page exclusion, etc. is provided as record access management, and when multiple records in the same page are accessed simultaneously from different transactions, the upper limit on the number of records is set. It is disclosed that the contention is suppressed to a certain probability or less to prevent turbidity of the accessed page.
【0007】[0007]
【発明が解決しようとする課題】しかし、上述した従来
技術、特に特開昭59−020068号公報には、次の
ような問題点があった。However, the above-mentioned prior art, in particular, JP-A-59-020068, has the following problems.
【0008】第1の問題点は、挿入ページに空き領域が
ない場合は、先ず前後のページに既に格納されているレ
コードを移送し、挿入ページに空き領域を作ろうと試み
ているばかりでなく、空きページをページ間チェーンで
リンクする際に常に、自身、前、次の3つのページのペ
ージ情報を更新しなければならないため、データ追加処
理時に挿入ページ、及びその前後のページに空き領域が
なく、新規ページを挿入する際に、処理時間が掛かると
いうことである。The first problem is that when there is no free space in the inserted page, not only is it first attempted to transfer the records already stored in the previous and next pages and make free space in the inserted page, When linking an empty page with the inter-page chain, the page information of the following three pages must be updated at all times. Therefore, there is no empty space in the inserted page and the pages before and after it during data addition processing. That is, it takes time to insert a new page.
【0009】第2の問題点は、データ挿入位置がある特
定の位置に集中すると、ページ挿入が頻発し、その前後
のページがページ情報更新のために同時アクセス制御対
象となるので、特にデータの順次追加と順読み検索が同
時走行した場合のスループットの低下があげられる。The second problem is that if the data insertion position is concentrated at a specific position, page insertion frequently occurs, and the pages before and after the data insertion are subject to simultaneous access control for updating the page information. There is a drop in throughput when sequential addition and sequential reading search run simultaneously.
【0010】本発明は、上記問題点を解決するために、
データベースの更新処理において、挿入ページに空きが
なくても、またページ挿入が頻発しても、予めダミーペ
ージを設けて、高速に処理することができる更新方式を
提供することを課題とする。[0010] The present invention has been made in order to solve the above problems.
It is an object of the present invention to provide an update method in which a dummy page is provided in advance and a high-speed processing can be performed even if there is no empty space in an inserted page or frequent page insertion occurs in a database update process.
【0011】[0011]
【課題を解決するための手段】本発明は、データベース
のデータをページ単位に更新するデータ更新方式におい
て、管理レコードとダミーページとを備えた前記データ
ベースと、前記データベースへのアクセスを処理するレ
コード処理制御手段と、該レコード処理制御手段の制御
の下でデータレコードを追加する処理を行う追加ページ
確保手段と、前記レコード処理制御手段の制御の下で追
加ページと当該追加ページの前段と後段のページとのチ
ェーンをとるチェーン遅延更新手段と、前記レコード処
理制御手段の制御の下でデータ更新の確定結果を参照す
る確定レコード参照手段と、前記追加ページ確保手段に
より前記データレコードの更新したページを管理する更
新ページ管理情報を含む情報記憶域とを備えたことを特
徴とする。According to the present invention, there is provided a data updating method for updating data of a database in page units, the database having a management record and a dummy page, and a record processing for processing access to the database. Control means, additional page securing means for performing a process of adding a data record under the control of the record processing control means, and additional pages and the preceding and succeeding pages of the additional pages under the control of the record processing control means Chain delay updating means for taking a chain with, a confirmed record referring means for referring to a confirmed result of data update under the control of the record processing control means, and managing the updated page of the data record by the additional page securing means. And an information storage area containing updated page management information.
【0012】また、本発明は、データベース内にデータ
ベースをレコード単位で管理する管理レコードの管理の
下でページ番号が変わらないダミーページを予め用意
し、前記データベースにデータレコードの追加の際に新
たなデータページが必要になったときには、前記ダミー
ページに先行する側の最終ページをリンクし、前記デー
タベースへのレコードの追加の場合に前記レコードの格
納のための領域用の空き領域がない場合に前記ダミーペ
ージの直前にデータ最終ページを挿入し、当該データ最
終ページ番号を前記ダミーページのページヘッダに書き
こむことを特徴とする。Further, according to the present invention, a dummy page whose page number does not change under management of a management record for managing the database in record units is prepared in the database in advance, and a new data record is added to the database when a data record is added. When a data page is needed, the last page preceding the dummy page is linked, and when a record is added to the database, if there is no free space for storing the record, The last page of data is inserted immediately before the dummy page, and the last page number of the data is written in the page header of the dummy page.
【0013】また、本発明は、機能的には、データベー
スの管理レコードからページ番号が変わらないダミーペ
ージを予め用意し、データレコード追加の際に新たなデ
ータページが必要になったときには、ダミーページの先
行する(PRIOR)側に最終ページをリンクすること
で管理レコードに対する更新処理を削減し、管理レコー
ドを参照する他のプロセスが更新ロック解除のための排
他待ち合わせによる処理時間の増加を抑え、スループッ
トとの向上を図るものである。Further, the present invention functionally prepares in advance a dummy page whose page number does not change from the management record of the database, and when a new data page is required when adding a data record, the dummy page is prepared. Linking the last page to the preceding (PRIOR) side of the process reduces update processing on the management record, and suppresses an increase in processing time due to exclusive waiting for another process referring to the management record to release the update lock, thereby improving throughput. It is intended to improve.
【0014】またダミーページや、ダミーページのPR
IOR側に位置し、既にデータが格納されているデータ
最終ページに対する更新も新規ページを追加する度にお
こなうのではなく、これらのページに対する更新イメー
ジを一時的に情報記憶域に貯え、データベースに格納し
た直後のデータが確立した静止点確立時に、はじめて更
新する遅延更新制御を行うことでダミーページやデータ
最終ページに対する更新ロック保持区間を削減し、他プ
ロセスで動作する参照系処理の同時走行性の向上を図る
為の構成を提供するものである。Also, a dummy page and a PR of the dummy page
Updates to the last page of data that is located on the IOR side and that already contains data are not performed every time a new page is added, but updated images for these pages are temporarily stored in the information storage area and stored in the database. Immediately after the quiesce point is established when data is established, the update update holding section for the dummy page or the last page of data is reduced by performing the delay update control for the first time, and the simultaneous running performance of the reference system processing operated by other processes is reduced. It is intended to provide a configuration for improvement.
【0015】また、本発明は、図1を参照して説明すれ
ば、データベース6に対しデータ追加処理に伴って新規
ページを挿入する際にはダミーページ63とデータペー
ジ群62との間にページ間チェーンによりリンクを張っ
て、ページ追加を行うが、追加ページ確保処理手段2で
は、 ダミーページ63のPRIOR側にページ追加す
る際に既に存在するページのチェーンは更新せずに、そ
の更新イメージのみを更新管理情報記憶域51に保持
し、データベースに格納した直後のデータが確立した静
止点確立時にチェーン遅延更新手段3で、実ページに対
する更新を行うことで 管理レコード61に対する更新
を削減し、また、データ参照に際しては、特に追加され
たが静止点が確立されていないデータを敢えて読まずに
処理するケースにおいて、データ最終ページとダミーペ
ージに例え更新ロックが掛けられていても 確定レコー
ド参照手段4によって排他解除待ちをなくすことで処理
時間の短縮と同時走行性の向上を図っている。Further, according to the present invention, referring to FIG. 1, when a new page is inserted into the database 6 in accordance with the data adding process, a page is inserted between the dummy page 63 and the data page group 62. A page is added by linking with an inter-chain, but the added page securing processing means 2 does not update the chain of pages already existing when adding a page to the PRIOR side of the dummy page 63, but only updates the updated image. Is stored in the update management information storage area 51, and the chain delay updating means 3 updates the real page at the time of establishment of the quiesce point where the data immediately after being stored in the database is established, thereby reducing updates to the management record 61. When referencing data, there is a case where data that has been added but a stationary point has not been established is intentionally processed without being read. , Thereby improving the shortening simultaneously running of processing time by eliminating an exclusive release wait be updated lock likened to the data last page and the dummy page is not applied by placing record reference means 4.
【0016】[0016]
【発明の実施の形態】本発明による実施形態について、
図面を参照しつつ詳細に説明する。DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments according to the present invention will be described.
This will be described in detail with reference to the drawings.
【0017】(本実施形態の構成)図1を参照すると、
本発明の一実施形態によるデータベースシステムにおけ
るデータ更新方式は、プログラム制御により動作するデ
ータ処理装置(図示せず)に含まれるレコード処理制御
手段1と、追加ページ確保手段2と、チェーン遅延更新
手段3と、確定レコード参照手段4と、プログラム制御
情報を記憶する情報記憶域5とこれに含まれる更新ペー
ジ管理情報51、及びデータベース6とこれを構成する
管理レコード61、データページ群62、及びダミーペ
ージ63とを備える。(Configuration of the Present Embodiment) Referring to FIG.
The data update method in the database system according to the embodiment of the present invention includes a record processing control unit 1, an additional page securing unit 2, and a chain delay updating unit 3 included in a data processing device (not shown) operated by program control. A fixed record reference means 4, an information storage area 5 for storing program control information and updated page management information 51 included therein, a database 6, a management record 61 constituting the database 6, a data page group 62, and a dummy page 63.
【0018】ここで、データベース6は、データレコー
ドを格納するためのデータページ群62と、データペー
ジ群62の先頭ページ番号、並びにデータページ群62
の最後にリンクされるダミーページ63と、ダミーペー
ジ63のページ番号を保持する管理レコード61とから
なる。また、データベース管理システムとしては、デー
タの操作単位はレコード(タプルともいう)であり、レ
コードと外部記憶装置との入出力単位であるページとの
マッピング、ページのメモリ上での管理や、空き領域不
足時の追い出し管理を行うレコードアクセス管理手段
や、操作単位のレコードのトランザクション(送受信装
置)間の排他的アクセス制御等を含んでいる。Here, the database 6 includes a data page group 62 for storing data records, a first page number of the data page group 62, and a data page group 62.
And a management record 61 holding the page number of the dummy page 63. In a database management system, the unit of data operation is a record (also referred to as a tuple), mapping of a record to a page which is an input / output unit between an external storage device, management of the page on a memory, and free space. It includes a record access management means for managing eviction when there is a shortage, an exclusive access control between transaction (transceiver) of a record in operation units, and the like.
【0019】また、情報記憶域5に含まれる更新ページ
管理情報51は、データベース6に対するレコード追加
処理によって、新たなデータページを必要とした際に、
データページ間のチェーンに関する情報を記録してい
る。The updated page management information 51 included in the information storage area 5 is used when a new data page is required by a record adding process to the database 6.
Records information about chains between data pages.
【0020】また、レコード処理制御手段1は、利用者
からのデータベースファイルに対するレコード追加、更
新処理等の処理要求が与えられた際には、レコード格納
可能な領域に処理対象レコードを追加、更新処理を施す
為の制御を行う。The record processing control means 1 adds a record to be processed to an area in which records can be stored, and updates the record when a processing request such as record addition or update processing to a database file is given from a user. Is performed to perform.
【0021】また、レコード処理制御手段1は、レコー
ド検索処理要求が与えられた場合には、検索条件に合う
レコードをデータベース6のデータページにあるデータ
レコードから捜し出し、加工、編集等を含むレコード検
索処理を施す為の制御を行う。更には、データベースの
更新(COMMIT)命令によって、データベースに格
納した直後の状態である静止点確立の要求が与えられる
と、実更新されていないページ間チェーンがあれば、正
しい情報でそれを更新するための制御も行う。When a record search processing request is given, the record processing control means 1 searches a data record in a data page of the database 6 for a record matching a search condition, and performs a record search including processing, editing and the like. Control for performing processing is performed. Further, when a request for establishing a quiesce point, which is a state immediately after storage in the database, is given by a database update (COMMIT) command, if there is an inter-page chain that has not been actually updated, it is updated with correct information. Control is also performed.
【0022】また、追加ページ確保手段2は、レコード
処理制御手段1から追加処理の要求が与えられた際に、
レコード格納の為の空き領域が、ページ間チェーンの最
後にあるデータ格納ページに存在しない場合に、レコー
ド処理制御手段1から起動され、空きページをサーチ
し、ページ間チェーンでデータベースとして確保された
一連のページにリンクを張る為の制御を行う。Further, when the record processing control unit 1 gives a request for additional processing, the additional page securing unit 2
If there is no free area for storing records in the data storage page at the end of the inter-page chain, the record processing control unit 1 starts up, searches for an empty page, and searches for a series of pages secured as a database in the inter-page chain. Control to link to the page.
【0023】特に、データベースに格納した直後のデー
タが確立した静止点確立時の最終データページと、ペー
ジ間チェーンの最後にあるダミーページ63に更新が入
るような場合に、実ページを更新せずに、更新ページ管
理情報51にその更新イメージを記憶しておく。Particularly, when the last data page at the time of establishment of the quiesce point where data immediately after storage in the database is established and the dummy page 63 at the end of the inter-page chain are updated, the actual page is not updated. Then, the updated image is stored in the updated page management information 51.
【0024】また、チェーン遅延更新手段3は、レコー
ド処理制御手段1からの制御の下で、追加ページ確保手
段2で実ページの更新をせずに、更新ページ管理情報5
1に一時的に保持したページ間チェーン情報を、静止点
確立時に実ページへ書き戻すことによって、ページ間チ
ェーンの整合性を取るための制御を行う。Under the control of the record processing control means 1, the chain delay updating means 3 does not update the real page by the additional page securing means 2 but updates the updated page management information 5
The inter-page chain information temporarily stored in 1 is written back to the actual page when the quiesce point is established, thereby controlling the inter-page chain to be consistent.
【0025】また、確定レコード参照手段4では、レコ
ード処理制御手段1からの制御の下で、データ追加処理
で更新ロックがかかっているページを、ロックを掛けず
に読むことによって、排他解除待ちせずに、検索処理を
続けていくことが出来るようにする為の制御を行う。Under the control of the record processing control means 1, the confirmed record reference means 4 reads the page on which the update lock has been locked in the data addition processing without locking, thereby waiting for the release of the exclusion. Instead, control is performed so that search processing can be continued.
【0026】特にデータページ間のチェーンを辿って順
検索する場合に、データの最終ページが他プロセスによ
り更新ロックが掛けられているような場合に、予め更新
ロックがどのページに掛かっているかを、更新ページ管
理情報51の情報より判断する。In particular, when a forward search is performed by tracing a chain between data pages, when an update lock is applied to the last page of data by another process, it is determined in advance which update lock is applied to which page. The determination is made based on the information of the update page management information 51.
【0027】(本実施形態の動作)次に、図1のシステ
ム構成図及び図2乃至図4の動作フローチャートを参照
して、本発明の実施の動作について詳細に説明する。(Operation of the Present Embodiment) Next, the operation of the embodiment of the present invention will be described in detail with reference to the system configuration diagram of FIG. 1 and the operation flowcharts of FIGS.
【0028】まず、図1に示す各手段の動作について概
説する。利用者プログラムから、レコード追加処理の実
行要求が与えられると、レコード処理制御手段1では、
まず、該当データベース6内のレコード表の領域管理情
報が格納されている管理ページ内の管理レコード61を
データベース6中から読み込み、データ格納ページ間チ
ェーンの最後にあるダミーページ63を更新ロックを掛
けて、更新バッファに読み込み、その先行する(PRI
OR)方向に存在する実際にデータが格納されている最
終ページ(データ最終ページ)を更新ロックを掛けて、
データベース中から更新バッファに読み込む。First, the operation of each means shown in FIG. 1 will be outlined. When a request to execute record addition processing is given from a user program, the record processing control means 1
First, the management record 61 in the management page in which the area management information of the record table in the corresponding database 6 is stored is read from the database 6 and the dummy page 63 at the end of the chain between data storage pages is updated and locked. , Read into the update buffer and its preceding (PRI
(OR) The update lock is applied to the last page (the last page of data) in which data is actually stored in the direction,
Read from the database into the update buffer.
【0029】次に、該データ最終ページ内に追加対象の
データレコードが格納できる空き領域があるか、並びに
格納可能レコード数を越えていないかを検査し、もし該
データ最終ページにデータレコードが格納できないと判
断した場合には、追加ページ確保手段2を起動し、デー
タベースファイル内から空きページ(未使用ページ)を
探し出し、これを新たなデータ最終ページとしてページ
間チェーンのメンテナンス処理を行なわせ、制御が追加
ページ確保手段2からレコード処理制御手段1に戻って
きた後、新規確保した未使用ページにデータを挿入する
処理を行う。Next, it is checked whether or not there is a free area in the last page of the data in which the data record to be added can be stored and whether or not the number of storable records has been exceeded. If it is determined that it is not possible, the additional page securing means 2 is started, a free page (unused page) is searched from the database file, and this is set as a new data final page, and the maintenance processing of the inter-page chain is performed. After returning from the additional page securing means 2 to the record processing control means 1, a process of inserting data into a newly secured unused page is performed.
【0030】また、利用者プログラム上に記述された更
新指示のCOMMIT命令の実行により、静止点を確立
する際には、レコード処理制御手段1は、追加されたデ
ータページを他プロセスでも参照/更新できるようにす
る為のチェーン遅延更新手段3の起動も制御している。When a quiesce point is established by executing a COMMIT instruction of an update instruction described in a user program, the record processing control means 1 refers to / updates the added data page in another process. It also controls the activation of the chain delay updating means 3 for enabling it.
【0031】レコード処理制御手段1によって起動され
たチェーン遅延更新手段3では、情報記憶域5に保持さ
れている更新ページ管理情報51に基づいて、データ追
加処理時に動作した追加ページ確保手段2内では行わな
かったダミーページ63の前ページ番号領域の実更新と
直前の静止点確立時にデータ最終ぺージだった確定最終
ぺージの次ページ番号領域の実更新処理を施す。In the chain delay updating means 3 started by the record processing control means 1, based on the updated page management information 51 held in the information storage area 5, the additional page securing means 2 operated at the time of the data adding processing. The actual update of the previous page number area of the dummy page 63 which was not performed and the actual update processing of the next page number area of the final data page which was the final data page when the still point was established immediately before are performed.
【0032】また、利用者プログラムによりレコード参
照処理の実行要求が与えられた際には、レコード処理制
御手段1は、確定レコード参照手段4を起動し、確定レ
コード参照手段4では、データの追加により最終データ
ページが変更され、かつ未だ静止点が確立されていない
場合においても、検索途中でデータ追加処理に伴ったペ
ージ排他制御による更新ロック解除待ちを回避して、直
近の静止点確立時点迄のデータ参照を行う。When an execution request for record reference processing is given by the user program, the record processing control means 1 activates the confirmed record reference means 4, and the confirmed record reference means 4 adds data by adding data. Even if the last data page has been changed and the quiesce point has not been established yet, avoid the update lock release wait by the page exclusive control accompanying the data addition process during the search, and wait until the latest quiesce point establishment point. Perform data reference.
【0033】(追加ページ確保手段2の動作)図2は、
追加ページ確保手段2の動作を示すフローチャートであ
る。(Operation of Additional Page Securing Means 2) FIG.
6 is a flowchart illustrating an operation of an additional page securing unit 2.
【0034】追加ページ確保手段2は、レコード処理制
御手段1によってレコード格納の為に必要となる空き領
域がデータ最終ページに無い場合に起動され、空きペー
ジをファイル中から探し、この空きページをダミーペー
ジ63の直前に挿入し、これを新たなデータ最終ページ
とし、これに追加要求のあったデータレコードを格納す
る為に呼び出されるものである。The additional page securing means 2 is started when the record processing control means 1 does not have a free area necessary for storing a record in the last page of the data, searches for a free page from the file, and dummy-checks the free page. It is inserted just before the page 63, this is set as a new data last page, and is called to store a data record requested to be added thereto.
【0035】レコード処理制御手段1によって起動され
た追加ページ確保手段2では、まず、ファイル中から空
きページを探し出し、これを更新ロックを掛けて読み込
む(ステップ201)。The additional page securing means 2 started by the record processing control means 1 first finds a free page from the file and reads it with an update lock (step 201).
【0036】この空きページ(以降、新規確保ページと
称す)をデータ最終ページとする為に、該ページのペー
ジヘッダにある次ページ番号格納域に、ページ間チェー
ンの一番最後にリンクされているダミーページ63のペ
ージ番号をセットする(ステップ202)。In order to make this empty page (hereinafter referred to as a newly reserved page) the last page of data, the next page number storage area in the page header of the page is linked to the end of the inter-page chain. The page number of the dummy page 63 is set (step 202).
【0037】次に、更新ページ管理情報51に追加最終
ページ番号が登録されているか否かを判定し(ステップ
203)、追加最終ページ番号が更新ページ管理情報5
1に登録されていなければ、直前の静止点確立後、はじ
めて新規確保ページを追加するケースと判断し(ステッ
プ203のNOの場合)、ステップ201で読み込んだ
新規確保ページの前ページ番号格納域に、更新ページ管
理情報51内に登録されている確定最終ページ番号、す
なわち直前の静止点確立時に最終データが格納されてい
たデータページのページ番号、をセットした後、ファイ
ルに書き戻す(ステップ204)。Next, it is determined whether or not the added last page number is registered in the updated page management information 51 (step 203).
If it is not registered in No. 1, it is determined that a newly secured page is to be added for the first time after the establishment of the immediately preceding static point (NO in step 203), and is stored in the previous page number storage area of the newly secured page read in step 201. After setting the final page number registered in the updated page management information 51, that is, the page number of the data page in which the final data was stored at the time of establishment of the last still point, the file is written back to the file (step 204). .
【0038】この結果、新規確保ページのヘッダ部にあ
る次ページ番号格納域にはダミーページ番号が、前ペー
ジ番号格納域には静止点確立時の最終データページ番号
(確定最終ページ番号)がセットされたことになる(ス
テップ205)。As a result, the dummy page number is set in the next page number storage area and the last data page number (fixed last page number) at the time of establishment of the quiesce point is set in the previous page number storage area in the header section of the newly secured page. That is, it is done (step 205).
【0039】一方、ステップ203で既に更新ページ管
理情報51に追加最終ページ番号が登録されていた場合
には、直前の静止点確立時から今回のレコード追加処理
までの間に、少なくとも1回は追加ページ確保手段2が
動作しているケースであると判断でき(ステップ203
のYESの場合)、新規確保ページの前ページ番号格納
域には、更新ページ管理情報51に登録されている追加
最終ページ番号をセットした後、ファイルに書き戻す
(ステップ206)。On the other hand, if the last page number to be added has already been registered in the updated page management information 51 in step 203, at least one additional page is added between the time when the last stationary point was established and the current record addition processing. It can be determined that the page securing means 2 is operating (step 203).
In the case of YES), the last page number registered in the updated page management information 51 is set in the previous page number storage area of the newly reserved page, and then the file is written back (step 206).
【0040】この場合は、新規確保ページのヘッダ部に
ある次ページ番号格納域にはダミーページ番号が、前ペ
ージ番号格納域には静止点確立後、もっとも直近に新た
に確保したデータ最終ページのページ番号(追加最終ペ
ージ番号)がセットされた状態となる。In this case, the dummy page number is stored in the next page number storage area in the header section of the newly allocated page, and the last page of the latest newly allocated data after the still point is established in the previous page number storage area. The page number (added last page number) is set.
【0041】ステップ203でYESの場合には、更
に、更新ページ管理情報51に登録されている追加最終
ページ番号に基づき、もっとも直近に確保したデータ最
終データ(追加最終ページ)を読み込み(ステップ20
7)、 追加最終ページの次ページ番号域にステップ2
01で見つけた新規確保ページのページ番号を格納し
(ステップ208)、追加最終ページをファイルに書き
戻す(ステップ209)。In the case of YES in step 203, based on the added last page number registered in the updated page management information 51, the most recently secured data last data (added last page) is read (step 20).
7), Step 2 in the page number area next to the last page to be added
The page number of the newly secured page found in 01 is stored (step 208), and the added final page is written back to the file (step 209).
【0042】ステップ207からステップ209の処理
により、追加最終ページのヘッダ部にある次ページ番号
は、ダミーページ63のページ番号から新規確保ページ
のページ番号に更新されることになる。By the processing from step 207 to step 209, the next page number in the header portion of the added last page is updated from the page number of the dummy page 63 to the page number of the newly secured page.
【0043】そして最後に、ダミーページ63の前ペー
ジ番号は更新せず、更新ページ管理情報51の追加最終
ページ番号を新たに確保したページのページ番号で登録
し直し(ステップ210)、データレコードの格納先と
して、新規確保ページの第一レコードを設定し(ステッ
プ211)、レコード処理制御手段1に制御を戻す。Finally, the last page number of the dummy page 63 is not updated, but the added last page number of the updated page management information 51 is re-registered with the page number of the newly secured page (step 210), and the data record The first record of the newly secured page is set as the storage destination (step 211), and control is returned to the record processing control means 1.
【0044】その後、制御が戻ってきたレコード処理制
御手段1では、追加ページ確保手段2からレコード格納
可能な旨が通知されてきた場合には、レコード格納可能
ページ番号、レコード位置が併せて返却されるので、該
当ページに追加要求のあったレコードイメージを書き込
み、レコード追加処理を正常動作させることが可能とな
る。After that, in the record processing control means 1 to which the control is returned, when the additional page securing means 2 notifies that the record can be stored, the record storage page number and the record position are returned together. Therefore, it is possible to write the record image requested to be added to the corresponding page, and to operate the record addition process normally.
【0045】なお、レコード処理制御手段1がレコード
格納が不可能な旨を受け取るような場合、例えばデータ
ベース6のファイル内に空きページが存在せず、データ
ベースファイル自体がオーバフロー状態となった場合に
は、レコード追加処理の要求元にレコード追加不成功の
結果を返すことが可能であるのは言うまでもない。When the record processing control means 1 receives a message indicating that record storage is impossible, for example, when there is no empty page in the file of the database 6 and the database file itself overflows, Needless to say, it is possible to return the result of the record addition failure to the request source of the record addition processing.
【0046】また、追加ページ確保手段2は、複数プロ
セスで同時に追加処理が動作した場合には、ダミーペー
ジ63に更新ロックを最初に掛け、共有排他制御を行っ
ているため、高々1プロセスでしか追加処理は動作しな
いように、シリアライズされているのも自明である。Further, when additional processing is simultaneously performed in a plurality of processes, the additional page securing means 2 first locks the dummy page 63 with an update lock and performs shared exclusion control. It is obvious that the additional processing is serialized so as not to operate.
【0047】(チェーン遅延更新手段3の動作)図3
は、チェーン遅延更新手段3の動作を示すフローチャー
トである。(Operation of Chain Delay Update Means 3) FIG.
5 is a flowchart showing the operation of the chain delay updating means 3.
【0048】チェーン遅延更新手段3は、レコード処理
制御手段1によってCOMMIT命令を実行する際、情
報記憶域5に保持されている更新ページ管理情報51に
基づき、追加ページ確保手段2の起動時にはページヘッ
ダ上は更新されていなかったダーミーページ63の前ペ
ージ番号領域、並びに直近の静止点確立時点でデータ格
納最終ページであった確定最終ページの次ページ番号領
域を、実際に更新してページ間チェーンを正しくリンク
し直す為に起動される。When the record processing control means 1 executes the COMMIT instruction, the chain delay updating means 3 uses the page header upon activation of the additional page securing means 2 based on the updated page management information 51 held in the information storage area 5. The top page number area of the dermy page 63, which has not been updated, and the next page number area of the final page determined to be the last data storage page at the time of establishment of the most recent still point are actually updated to form an inter-page chain. Invoked to relink correctly.
【0049】レコード処理制御手段1によって起動され
た追加ページ確保手段2では、まず、更新ページ管理情
報51に追加最終ページ番号が登録されているか否かを
判断し(ステップ301)、登録されていれば、直近の
静止点確立後に追加ページ確保手段2が動作したものと
みなし(ステップ301のYES)、ダミーページ63
の前ページ番号領域を書き換えるために、ダミーページ
63をファイルから読み込む(ステップ302)。The additional page securing means 2 started by the record processing control means 1 first determines whether or not an updated final page number is registered in the updated page management information 51 (step 301). For example, it is considered that the additional page securing means 2 has been operated after the establishment of the latest stationary point (YES in step 301), and the dummy page 63
In order to rewrite the previous page number area, the dummy page 63 is read from the file (step 302).
【0050】次に、ダミーページ63の前ページ番号領
域に更新ページ管理情報51に登録されている追加最終
ページ番号をセットし(ステップ303)、ダミーペー
ジ63の前ページ番号をファイルに書き戻す(ステップ
304)。Next, the additional last page number registered in the updated page management information 51 is set in the previous page number area of the dummy page 63 (step 303), and the previous page number of the dummy page 63 is written back to the file (step 303). Step 304).
【0051】一方、ステップ301で更新ページ管理情
報51に追加最終ページ番号が登録されていなければ、
追加ページ確保手段2は直前の静止点確立以来、動作し
なかったと判断できる為、ステップ302からステップ
304の処理は行わない(ステップ301のNO)。On the other hand, if the added last page number is not registered in the updated page management information 51 in step 301,
Since it can be determined that the additional page securing means 2 has not operated since the last stationary point was established, the processing from step 302 to step 304 is not performed (NO in step 301).
【0052】次に、更新ページ管理情報51に追加先頭
ページ番号が登録されているか否かを判断し(ステップ
305)、登録されていれば、ステップ301のYES
の時と同じく、直近の静止点確立後に追加ページ確保手
段2が動作したものとみなし(ステップ305のYE
S)、確定最終ページの次ページ番号領域を書き換える
ために、確定最終ページをファイルから読み込む(ステ
ップ306)。Next, it is determined whether or not an additional top page number is registered in the updated page management information 51 (step 305).
As in the case of (1), it is considered that the additional page securing means 2 has been operated after the latest stationary point was established (YE in step 305).
S) The final page is read from the file in order to rewrite the next page number area of the final page (step 306).
【0053】次に、確定最終ページの次ページ番号領域
に更新ページ管理情報51に登録されている追加先頭ペ
ージ番号をセットし(ステップ307)、確定最終ペー
ジをファイルに書き戻す(ステップ308)。Next, the first page number registered in the updated page management information 51 is set in the next page number area of the final page (step 307), and the final page is written back to the file (step 308).
【0054】一方、ステップ305で更新ページ管理情
報51に追加先頭ページ番号が登録されていなければ、
追加ページ確保手段2は直前の静止点確立以来、動作し
なかったと判断できる為、ステップ306からステップ
308の処理は行わない(ステップ305のNO)。On the other hand, if the additional top page number is not registered in the updated page management information 51 in step 305,
Since it can be determined that the additional page securing means 2 has not been operated since the last stationary point was established, the processing from step 306 to step 308 is not performed (NO in step 305).
【0055】最後に、更新ページ管理情報51の確定最
終ページ番号、追加先頭ページ番号、並びに追加最終ペ
ージ番号をクリアし(ステップ309)、制御をレコー
ド処理制御手段1に戻す。チェーン遅延更新手段3は上
述の動作を行い、ダミーページ63の最終ページとか又
は直前確定の最終ページと追加開始ページとなる次に入
るデータページとのリンクをはってチェーン関係を明確
に示す。Finally, the final page number, the added first page number, and the added last page number of the updated page management information 51 are cleared (step 309), and control is returned to the record processing control means 1. The chain delay updating means 3 performs the above operation, and clearly shows the chain relationship by linking the last page of the dummy page 63 or the last page determined immediately before and the next data page which is the additional start page.
【0056】(確定レコード参照手段4の動作)図4
は、確定レコード参照手段4の動作を示すフローチャー
トである。(Operation of Fixed Record Reference Means 4) FIG.
5 is a flowchart showing the operation of the confirmed record reference means 4.
【0057】確定レコード参照手段4は、レコード処理
制御手段1によってレコード検索要求があった際に起動
され、データベース6に対し他のプロセスでデータ追加
中であっても、データレコードの順検索処理を、更新ペ
ージの排他解除待ちすることなく行う為のものである。The confirmed record reference means 4 is started when a record search request is issued by the record processing control means 1, and performs a sequential search of data records even if data is being added to the database 6 by another process. , Without waiting for exclusive exclusion of the updated page.
【0058】以下、格納順にデータを読み出す検索条件
付きの順次検索処理を例に説明する。レコード処理制御
手段1によって起動された確定レコード参照手段4で
は、まず、更新ページ管理情報51から確定最終ページ
番号を得ると共に(ステップ401)、検索対象ページ
番号にデータページの先頭ページ番号をセットする(ス
テップ402)。Hereinafter, a sequential search process with a search condition for reading data in the storage order will be described as an example. The confirmed record reference means 4 started by the record processing control means 1 first obtains the confirmed final page number from the updated page management information 51 (step 401) and sets the first page number of the data page as the search target page number. (Step 402).
【0059】次に、検索対象のページ番号が確定最終ペ
ージ番号と同じか否かを比較し(ステップ403)、異
なっていれば一般の検索処理と同様、検索ロックを掛け
て該当ページを読み込む(ステップ403のNO)。Next, a comparison is made as to whether or not the page number of the search target is the same as the final page number determined (step 403). (NO in step 403).
【0060】一方、検索対象のページ番号が確定最終ペ
ージ番号と同じであれば(ステップ403のYES)、
該当検索対象のページは既に更新ロックが掛けられてい
る可能性が高い為、参照ロックを掛けずに参照専用バッ
ファに該当ページを読み込む(ステップ405)。On the other hand, if the page number to be searched is the same as the final page number determined (YES in step 403),
Since there is a high possibility that the relevant search target page has already been updated locked, the relevant page is read into the reference-only buffer without applying the reference lock (step 405).
【0061】このステップ403の条件判定により他プ
ロセスで、更新ロック中でも同一ページを同時アクセス
可能とすることができる。According to the condition determination in step 403, the same page can be simultaneously accessed by another process even during the update lock.
【0062】次に、検索対象ページが先頭ページか否か
を判断し(ステップ406)、検索対象ページが先頭ペ
ージでない場合には(ステップ406のNO)、この検
索対象ページを読み込む以前に、先行するPRIOR側
のデータページを参照ロックを掛けて読み込んでいる
為、このPRIOR側のページの参照ロックを解除する
(ステップ407)。Next, it is determined whether or not the search target page is the first page (step 406). If the search target page is not the first page (NO in step 406), the preceding search target page is read before it is read. Since the data page on the PRIOR side to be read is read with the reference lock applied, the reference lock on the page on the PRIOR side is released (step 407).
【0063】なお、検索対象ページが先頭ページの場合
は、他の異参照ロックを掛けていない為、PRIORペ
ージの参照ロックの解除は不要である(ステップ406
のYES)。When the page to be searched is the first page, it is not necessary to release the reference lock of the PRIOR page because another different reference lock is not applied (step 406).
YES).
【0064】次に、検索対象ページ内の格納レコード毎
に与えられた検索条件を満足するかどうかを判定し(ス
テップ408)、もし条件に一致したものが存在すれば
(ステップ408のYES)、その旨を要求元に返却す
ると共にレコード内容を要求元に返却し(ステップ40
9)、処理を終える。Next, it is determined whether or not a given search condition is satisfied for each record stored in the search target page (step 408). If there is a match with the condition (YES in step 408), That fact is returned to the request source, and the record contents are returned to the request source (step 40).
9), end the process.
【0065】また、読み込んだページ内のデータレコー
ドの全てが条件不一致だった場合は(ステップ408の
NO)、該当ページが確定最終ページかどうかを検査し
(ステップ410)、該当ページが確定最終ページであ
れば(ステップ410のYES)、1件も条件にヒット
しなかった旨を要求元に返し(ステップ411)、処理
を終える。If all the data records in the read page do not match the conditions (NO in step 408), it is checked whether the page is the final page (step 410). If it is (YES in step 410), it is returned to the requesting source that no condition is hit (step 411), and the process is terminated.
【0066】また、未だ読み込んだページが確定最終ペ
ージでなければ(ステップ410でNO)、次段のNE
XT側のページを読み込むために前ページ番号を新たな
検索対象ページ番号にセットし直し(ステップ41
2)、ステップ403から412の処理を繰り返す。If the read page is not the final page (NO in step 410), the next NE
In order to read the page on the XT side, the previous page number is set to a new search target page number (step 41).
2), the processing of steps 403 to 412 is repeated.
【0067】これらの一連の処理により、他プロセスで
データ追加に伴ったデータページ追加処理があっても、
更新ロックの排他解除待ちとなることもなく、しかも静
止点確立前の不定な追加データを余分に参照することも
なく検索処理を終えることが可能となる。By these series of processes, even if data page addition processing accompanying data addition in another process is performed,
The search process can be completed without waiting for exclusive lock release of the update lock and without additionally referencing indefinite additional data before establishment of the quiesce point.
【0068】(データベース処理の具体例)次に具体例
を用いて説明する。図5は、データベース6のデータレ
コードを格納するデータページ(ページB、ページ
C)、及びページ間のチェーンの最後に位置しているダ
ミーページ(ページD)、並びにこれらのページを管理
するレコードとそれを格納している管理ページ(ページ
A)の関連図と、情報管理記憶領域5に保持されている
更新ページ管理情報51の内容を例示する図である。(Specific Example of Database Processing) Next, a specific example will be described. FIG. 5 shows a data page (page B, page C) storing data records of the database 6, a dummy page (page D) located at the end of a chain between pages, and records managing these pages. FIG. 6 is a diagram illustrating a related diagram of a management page (page A) storing the same and the contents of updated page management information 51 held in the information management storage area 5.
【0069】図5に示す新たなデータページをデータベ
ースに書き込む場合について説明すると、管理レコード
61からはデータページ群62の先頭ページBへのチェ
ーンとダミーページDへのチェーンとが張られている。The case where a new data page shown in FIG. 5 is written in the database will be described. A chain from the management record 61 to the first page B of the data page group 62 and a chain to the dummy page D are provided.
【0070】またデータページB,C間はそれぞれ前ペ
ージと次ページを指し示すページ番号がページヘッダに
格納されている。Between the data pages B and C, page numbers indicating the previous page and the next page are stored in the page header.
【0071】また、ページCはデータレコードがm件格
納されている様子を示しており、次ページ番号Dを辿る
と、ページDには前ページ番号のページCと次段のペー
ジがない旨のNULLとレコードが1件も入っていない
ダミーページである様子が伺える。Further, page C shows a state in which m data records are stored, and if the next page number D is traced, page D has no previous page number page C and no next page page. It can be seen that the page is a dummy page containing no NULL and no record.
【0072】一方、更新ページ管理情報51は、COM
MIT命令直後の状態を表し、確定最終ページ番号Cと
ラインm、追加先頭ページ番号NULL、追加最終ペー
ジ番号NULLとというNULL値(クリアされた状
態)が入っている。On the other hand, the updated page management information 51 is
It represents a state immediately after the MIT instruction, and contains NULL values (cleared state) of a final page number C and line m, an additional head page number NULL, and an additional last page number NULL.
【0073】この状態からデータレコードを1件格納す
ると、図1のレコード処理制御手段1では、ページDを
経由し、ページCを参照し、レコードを格納するための
空きが有ると判断すれば、ページCにレコードmの後ろ
にを追加する。When one data record is stored from this state, the record processing control means 1 in FIG. 1 refers to page C via page D and determines that there is a free space for storing the record. Add after record m to page C.
【0074】この際、更新ページ管理情報51の確定最
終ページ番号はNULL値から”C”に変更される(図
面なし)。At this time, the final page number determined in the updated page management information 51 is changed from the NULL value to “C” (not shown).
【0075】次に更にデータ追加を行った場合を考え
る。図6はデータ追加によって新規最終ページが確保さ
れた後のページ間チェーンの状態、並びにその時の更新
ページ情報51の状態を表している。Next, consider a case where data addition is further performed. FIG. 6 shows the state of the inter-page chain after the new last page is secured by adding data, and the state of the updated page information 51 at that time.
【0076】図6において、ページCに新たにデータの
レコードnが追加出来ないとなった場合、追加ページ確
保手段2では以下の処理を行う。In FIG. 6, when it becomes impossible to add a new record n of data to page C, the additional page securing means 2 performs the following processing.
【0077】まず、ファイル内から未使用ページXを見
つけ(図2のステップ201)、ページXのページヘッ
ダにある次ページ番号領域にダミーページDのページ番
号’D’を埋め込む(図2のステップ202)。First, an unused page X is found in the file (step 201 in FIG. 2), and the page number 'D' of the dummy page D is embedded in the next page number area in the page header of the page X (step in FIG. 2). 202).
【0078】更に、更新ページ管理情報51の追加最終
ページ番号は、元々図5に示すようにNULL値である
ので、新規確保ページ番号Xの前ページ番号領域に確定
最終ページ番号”C”を埋め込み、ページXのヘッダを
作り上げる(図2のステップ203のNO、ステップ2
04)。Furthermore, since the added last page number of the updated page management information 51 is originally a NULL value as shown in FIG. 5, the final page number “C” is embedded in the page number area before the newly reserved page number X. , Create a header for page X (NO in step 203 of FIG. 2, step 2
04).
【0079】ここで、確定最終ぺージCの次ページ番号
領域、並びにダミーページDの前ページ番号領域のペー
ジ間チェーンは更新せず(つまりページCのNEXT
は”D”、ページDのPRIORは”C”のまま)、前
ページ番号は、チェーン遅延更新手段6の為に更新ペー
ジ管理情報51の追加先頭ページ番号、追加最終ページ
番号に共に、新規確保ページXのページ番号”X”を登
録する(ステップ205,ステップ206)。Here, the inter-page chain of the next page number area of the final page C and the previous page number area of the dummy page D is not updated (that is, the NEXT of the page C).
Is "D", the PRIOR of page D remains "C"), and the previous page number is newly secured for both the added first page number and the added last page number of the updated page management information 51 for the chain delay updating means 6. The page number “X” of the page X is registered (Step 205, Step 206).
【0080】また、図7は更にデータ追加処理を繰り返
した場合についてのページ間チェーンと、更新ページ管
理情報51の状態を表しており、図2のステップ203
によって、追加先頭ページ番号’X’が更新ページ管理
情報に登録されていた際の、図2のステップ203から
ステップ210間での処理結果を表している。FIG. 7 shows the inter-page chain and the status of the updated page management information 51 when the data addition processing is further repeated.
2 shows the processing result from step 203 to step 210 in FIG. 2 when the additional top page number 'X' is registered in the updated page management information.
【0081】これら図5,図6,図7からも解るよう
に、更新ページ管理情報51の追加先頭ページ番号に
は、確定最終ページCの真の次ページ番号’X’が、ま
た追加最終ページ番号にはダミーページDの真の前ペー
ジ番号’Y’が入ることになり、静止点確立時にこれら
に基づいてページC、ページDを更新してやれば正しく
チェーンがリンクされた状態になるのは想像に難くな
い。As can be seen from FIGS. 5, 6, and 7, the added first page number of the updated page management information 51 includes the true next page number “X” of the final page C, and the added last page. The number includes the true previous page number 'Y' of the dummy page D, and it is imagined that if the page C and the page D are updated based on these at the time of establishment of the stationary point, the chain will be correctly linked. Not difficult.
【0082】[0082]
【発明の効果】本発明によれば、ダミーページを予めデ
ータページ群の最後に用意しておくことで、管理レコー
ドの最終ページへのチェーン情報を更新する必要がなく
なり、先頭ページから検索処理を施す際のように、管理
ページ参照時に排他解除待ちをすることが無くなるの
で、管理レコード参照時の排他解除待ちによる処理時間
増加を低減できる。According to the present invention, by preparing a dummy page at the end of a data page group in advance, it is not necessary to update the chain information to the last page of the management record. Since it is not necessary to wait for release of exclusion when referring to a management page as in the case of applying, it is possible to reduce an increase in processing time due to waiting for release of exclusion when referring to a management record.
【0083】また、ダミーページと確定最終ページのヘ
ッダ情報であるページ間チェーンは、更新ページ管理情
報にそのチェーン情報を静止点確立時まで一時的に覚え
ておくので、ダミーページにはデータ追加時には更新が
入らず、ダミーページ参照時に掛けた更新ロックは、す
ぐに解除可能であるので、データ追加処理と参照処理の
同時走行性を増加することができる。The inter-page chain, which is the header information of the dummy page and the final page, temporarily stores the chain information in the updated page management information until the stationary point is established. Since update is not entered and the update lock acquired when referring to the dummy page can be released immediately, the simultaneous running performance of the data addition process and the reference process can be increased.
【0084】更に、確定最終ページはレコード追加の際
には更新ロックを静止点確立時まで保持しなければなら
ないが、例えば1ページに1レコードしか入らず、必ず
新規ページを追加しなければならないような場合には確
定最終ページにさえ、ヘッダ更新が入らないので、これ
もダミーページ同様、掛けた更新ロックをすぐに解除可
能となる。Further, when adding a record to the final fixed page, the update lock must be held until the quiesce point is established. For example, only one record is inserted per page, and a new page must be added without fail. In such a case, the header update is not entered even in the final page, so that the locked update lock can be released immediately like the dummy page.
【図1】本発明のデータベース更新システムの概略構成
ブロック図である。FIG. 1 is a schematic configuration block diagram of a database update system of the present invention.
【図2】本発明のデータベース更新システムの一フロー
チャートである。FIG. 2 is a flowchart of a database update system according to the present invention.
【図3】本発明のデータベース更新システムの一フロー
チャートである。FIG. 3 is a flowchart of a database update system according to the present invention.
【図4】本発明のデータベース更新システムの一フロー
チャートである。FIG. 4 is a flowchart of a database update system according to the present invention.
【図5】本発明のデータベース更新システムの概略動作
を説明する図である。FIG. 5 is a diagram illustrating a schematic operation of the database update system of the present invention.
【図6】本発明のデータベース更新システムの概略動作
を説明する図である。FIG. 6 is a diagram illustrating a schematic operation of the database update system of the present invention.
【図7】本発明のデータベース更新システムの概略動作
を説明する図である。FIG. 7 is a diagram illustrating a schematic operation of the database update system of the present invention.
1 レコード処理制御手段 2 追加ページ確保手段 3 チェーン遅延更新手段 4 確定レコード参照手段 5 情報記憶域 6 データベース 51 更新ページ管理情報 61 管理レコード 62 データページ群 63 ダミーページ DESCRIPTION OF SYMBOLS 1 Record processing control means 2 Additional page securing means 3 Chain delay update means 4 Confirmed record reference means 5 Information storage area 6 Database 51 Update page management information 61 Management record 62 Data page group 63 Dummy page
Claims (6)
新するデータ更新方式において、 管理レコードとダミーページとを備えた前記データベー
スと、前記データベースへのアクセスを処理するレコー
ド処理制御手段と、該レコード処理制御手段の制御の下
でデータレコードを追加する処理を行う追加ページ確保
手段と、前記レコード処理制御手段の制御の下で追加ペ
ージと当該追加ページの前段と後段のページとのチェー
ンをとるチェーン遅延更新手段と、前記レコード処理制
御手段の制御の下でデータ更新の確定結果を参照する確
定レコード参照手段と、前記追加ページ確保手段により
前記データレコードの更新したページを管理する更新ペ
ージ管理情報を含む情報記憶域とを備えたことを特徴と
するデータベースシステム。1. A data update method for updating data of a database in page units, said database provided with management records and dummy pages, record processing control means for processing access to said database, and said record processing control. Additional page securing means for performing a process of adding a data record under the control of the means, and chain delay updating for taking a chain of the additional page and the previous and subsequent pages of the additional page under the control of the record processing control means Means, means for referring to a confirmed result of data update under the control of the record processing control means, and information including updated page management information for managing the updated page of the data record by the additional page securing means. A database system comprising a storage area.
において、前記データベースの前記管理レコードからペ
ージ番号が変わらない前記ダミーページを用意し、前記
データレコードの追加の際に新たなデータページが必要
になったときには、前記ダミーページの先行する側に最
終ページをリンクすることで前記管理レコードに対する
更新処理を削減し、前記管理レコードを参照するプロセ
スが更新ロック解除のための排他待ち合わせによる処理
時間の増加を抑制することを特徴とするデータベースシ
ステム。2. The database system according to claim 1, wherein the dummy page whose page number does not change from the management record of the database is prepared, and a new data page is required when the data record is added. In this case, the last page is linked to the leading side of the dummy page to reduce the update processing for the management record, and the process that refers to the management record increases the processing time due to exclusive queuing for releasing the update lock. A database system characterized by suppression.
ド単位で管理する管理レコードの管理の下でページ番号
が変わらないダミーページを予め用意し、前記データベ
ースにデータレコードの追加の際に新たなデータページ
が必要になったときには、前記ダミーページに先行する
側の最終ページをリンクし、前記データベースへのレコ
ードの追加の場合に前記レコードの格納のための領域用
の空き領域がない場合に前記ダミーページの直前にデー
タ最終ページを挿入し、当該データ最終ページ番号を前
記ダミーページのページヘッダに書きこむことを特徴と
するデータベースのデータ更新方式。3. A dummy page whose page number does not change is prepared in advance under management of management records for managing the database in record units in the database, and a new data page is required when adding a data record to the database. When the last page of the dummy page is linked, the last page on the side preceding the dummy page is linked, and when there is no free space for storing the record in the case of adding a record to the database, immediately before the dummy page A data update method for a database, wherein a data last page is inserted into the dummy page and the data last page number is written in a page header of the dummy page.
更新方式において、 前記データベース内のレコードの領域管理情報が格納さ
れている管理レコードを前記データベース中から読み込
み、データ格納ページ間チェーンの最後にあるダミーペ
ージに更新ロックを掛けて更新バッファに読み込み、そ
の前記先行する側に存在する最終ページに更新ロックを
掛けて、前記データベース中から前記更新バッファに読
み込むことを特徴とするデータベースのデータ更新方
式。4. The data updating method of a database according to claim 3, wherein a management record storing area management information of a record in the database is read from the database, and the management record is located at the end of a chain between data storage pages. A data update method for a database, wherein an update lock is placed on a dummy page and read into an update buffer, an update lock is placed on a last page existing on the preceding side, and the dummy page is read from the database into the update buffer.
更新方式において、 情報管理を行う更新ページ管理情報に追加最終ページ番
号が登録されていない場合に前記更新ページ管理情報に
追加先頭ページ番号が登録されている場合には、先行す
る側の確定最終ページを前記データベースの管理レコー
ドから読み込み、前記確定最終ページの次の次ページ番
号領域に更新ページ管理情報の追加開始ページ番号を格
納し、前記確定最終ページを前記管理レコードに書き出
し、前記更新ページ管理情報の追加先頭ページの領域と
追加最終ページの領域をクリアすることを特徴とするデ
ータベースのデータ更新方式。5. The data updating method for a database according to claim 3, wherein an additional first page number is registered in the updated page management information when no additional last page number is registered in the updated page management information for performing information management. If so, the determined final page of the preceding side is read from the management record of the database, and the addition start page number of the updated page management information is stored in the next page number area next to the determined final page. A data updating method for a database, wherein a last page is written in the management record, and an area of an added first page and an area of an added last page of the updated page management information are cleared.
更新方式において、 前記データベースの検索の際に、情報管理を行う更新ペ
ージ管理情報から確定最終ページ番号を得て、前記検索
の検索ページ番号に先頭ページ番号を設定し、前記検索
ページ番号と前記確定最終ページ番号との一致を判断
し、前記検索ページ番号を参照ロックを掛けずに読み込
み、前記検索ページ番号が先頭ページであれば前記検索
の条件を満たす前記データベースのレコードがなければ
再度前記検索ページ番号と前記確定最終ページ番号との
一致を判断して不一致であれば前記検索ページ番号に、
前記検索ページ番号の次の次ページ番号を設定すること
を特徴とするデータベースのデータ更新方式。6. The data updating method for a database according to claim 3, wherein, when searching the database, a final page number determined from updated page management information for performing information management is obtained and the search page number for the search is obtained. A first page number is set, a match between the search page number and the final fixed page number is determined, the search page number is read without applying a reference lock, and if the search page number is the first page, the search page number is determined. If there is no record of the database that satisfies the condition, it is determined again whether the search page number matches the final fixed page number, and if they do not match, the search page number is
A data updating method for a database, wherein a next page number next to the search page number is set.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11067043A JP2000259460A (en) | 1999-03-12 | 1999-03-12 | Database system and data updating system therefor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11067043A JP2000259460A (en) | 1999-03-12 | 1999-03-12 | Database system and data updating system therefor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2000259460A true JP2000259460A (en) | 2000-09-22 |
Family
ID=13333438
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP11067043A Pending JP2000259460A (en) | 1999-03-12 | 1999-03-12 | Database system and data updating system therefor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2000259460A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20180044071A (en) * | 2016-10-21 | 2018-05-02 | 한양대학교 산학협력단 | Method and apparatus for processing data using dummy page |
| CN115623362A (en) * | 2021-07-15 | 2023-01-17 | 瑞昱新加坡有限公司 | Network device and data uplink transmission method thereof |
-
1999
- 1999-03-12 JP JP11067043A patent/JP2000259460A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20180044071A (en) * | 2016-10-21 | 2018-05-02 | 한양대학교 산학협력단 | Method and apparatus for processing data using dummy page |
| KR101887663B1 (en) * | 2016-10-21 | 2018-08-13 | 한양대학교 산학협력단 | Method and apparatus for processing data using dummy page |
| CN115623362A (en) * | 2021-07-15 | 2023-01-17 | 瑞昱新加坡有限公司 | Network device and data uplink transmission method thereof |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6834275B2 (en) | Transaction processing system using efficient file update processing and recovery processing | |
| US5175849A (en) | Capturing data of a database system | |
| US6813623B2 (en) | Method and apparatus for chunk based transaction logging with asynchronous input/output for a database management system | |
| CN113127212B (en) | Method and device for processing transaction in blockchain | |
| JPH04229355A (en) | Data access method and data processing system | |
| US5715447A (en) | Method of and an apparatus for shortening a lock period of a shared buffer | |
| US6560601B1 (en) | Database transaction with locking in two phases and multiple versions of objects | |
| US7818749B2 (en) | Data processing method, data processing apparatus, and data processing program | |
| JPH08328933A (en) | File access control system for parallel processing system | |
| CN101339527B (en) | Shadow EMS memory backup method and apparatus | |
| CN112631741A (en) | Transaction processing method, device and storage medium | |
| JP2007188497A (en) | Log information management system and method for transaction processing | |
| US7752399B2 (en) | Exclusion control method and information processing apparatus | |
| JPH06332780A (en) | Database exclusive control method | |
| JP2000259460A (en) | Database system and data updating system therefor | |
| JP3107094B2 (en) | Method and apparatus for shortening shared buffer lock period | |
| JP2933486B2 (en) | How to search all databases simultaneously | |
| JPH08329019A (en) | Semaphore data management method | |
| JPH0588954A (en) | Data base updating method | |
| US20240283755A1 (en) | Method for transmitting structured data | |
| CN117891625B (en) | Data sharing method, device, equipment and storage medium | |
| JP2980610B2 (en) | Transaction management device | |
| JP4131579B2 (en) | Data management system and data management method | |
| KR100312910B1 (en) | Method for expanding transaction isolation phase in database management system | |
| JPH04191934A (en) | Method and device for managing functional program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20040407 |