JP2002032248A - Providing system of version of transaction in data base inquiry processing and data base inquiry processing system using version provided by the same system - Google Patents

Providing system of version of transaction in data base inquiry processing and data base inquiry processing system using version provided by the same system

Info

Publication number
JP2002032248A
JP2002032248A JP2000218315A JP2000218315A JP2002032248A JP 2002032248 A JP2002032248 A JP 2002032248A JP 2000218315 A JP2000218315 A JP 2000218315A JP 2000218315 A JP2000218315 A JP 2000218315A JP 2002032248 A JP2002032248 A JP 2002032248A
Authority
JP
Japan
Prior art keywords
transaction
database
version
query
record
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
JP2000218315A
Other languages
Japanese (ja)
Inventor
Hiroshi Takegawa
弘志 竹川
Kazushige Asada
一繁 浅田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2000218315A priority Critical patent/JP2002032248A/en
Publication of JP2002032248A publication Critical patent/JP2002032248A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a providing system of a version of transaction in an inquiry processing the mounting of which is simplified and which is easily maintained. SOLUTION: A proper version is provided to the transaction by which inquiry is carried out by storing a last updated transaction ID 52 as a transaction ID of the transaction by which a record is updated last and a field 54 before update as data of a data base before update in addition to a filed 53 as record data and a record ID 51 to uniquely identify it a field 54 before update as data of a data base before update in the record of a data base file.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、データベース問合
せ処理におけるトランザクションの版の提供システム及
びデータベース問合せ処理システムに関し、より詳細に
は、従来のデータベースファイルアクセス手段における
トランザクション同時実行制御手段の呼び出しによるト
ランザクションの版の提供や整合性制約の検査の省略が
可能で、実装が簡略化され、維持が容易な、データベー
ス問合せ処理におけるトランザクションの版の提供シス
テム及び該システムにより提供された版を用いたデータ
ベース問合せ処理システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a system for providing a version of a transaction in database query processing and a database query processing system. More specifically, the present invention relates to a conventional database file access means. A system for providing a version of a transaction in a database query process, in which version provision and checking of integrity constraints can be omitted, implementation is simplified, and maintenance is easy, and database query processing using the version provided by the system About the system.

【0002】[0002]

【従来の技術】あるデータベースに対して複数のトラン
ザクションが操作を行うとき、トランザクションはその
性質として隔離性(isolation)を持つため、
同じデータベースがそれぞれのトランザクションにとっ
て異なって見える。
2. Description of the Related Art When a plurality of transactions operate on a certain database, the transaction has an isolation property by its nature.
The same database looks different for each transaction.

【0003】図5乃至図7は、各トランザクションから
のデータベースの見え方の違いを説明するための図で、
銀行の預金残高を管理するデータベースを例にその違い
を説明するための図である。今、データベースにはA,
B,Cさんの3人の預金残高が記録されており、それぞ
れ¥100,¥500,¥300とする。図5中のV0
は、操作しているトランザクションが1つもないときの
このデータベースを表している。2つのトランザクショ
ンT1,T2が開始され、それぞれがこのデータベース
を操作し始めたとする。トランザクションT1は、Aさ
んの残高を¥200に修正し、Cさんの残高を参照す
る。トランザクションT2は、Bさんの残高を¥0に修
正し、Cさんの残高を参照する。このとき、トランザク
ションT1にとって、A,Cさんの残高はそれぞれ¥2
00,¥300に、トランザクションT2にとって、
B,Cさんの残高はそれぞれ¥0,¥300に見える。
FIGS. 5 to 7 are diagrams for explaining the difference in the appearance of a database from each transaction.
It is a figure for explaining the difference taking the database which manages the balance of a bank as an example. Now, the database contains A,
The deposit balances of three persons B and C are recorded, and are assumed to be $ 100, $ 500, and $ 300, respectively. V0 in FIG.
Represents this database when there are no operating transactions. Assume that two transactions T1, T2 have begun and each has begun operating on this database. The transaction T1 corrects the balance of Mr. A to $ 200, and refers to the balance of Mr. C. Transaction T2 corrects the balance of Mr. B to $ 0 and refers to the balance of Mr. C. At this time, for transaction T1, the balances of A and C are each $ 2.
00, $ 300, for transaction T2,
B and C's balance looks $ 0 and $ 300, respectively.

【0004】このトランザクションごとのデータベース
の見え方、姿のことを、版(version)と呼ぶこ
とにする。図5では、V1がトランザクションT1にと
っての版になり、V2がトランザクションT2にとって
の版になる。
The appearance and appearance of the database for each transaction will be referred to as a version. In FIG. 5, V1 is the version for transaction T1, and V2 is the version for transaction T2.

【0005】トランザクションがコミットして終了する
と、そのトランザクションの版のうち、トランザクショ
ンが開始されてから変更された部分が実際のデータベー
スに反映される。トランザクションがアボートして終了
すると、そのトランザクションの版の変更された部分は
捨てられ、実際のデータベースは変更されない。例え
ば、図5のトランザクションT1がコミットして終了す
ると、図6のV0’のようにトランザクションT1での
Aさんの残高の¥100から¥200への変更が実際の
データベースに反映される。トランザクションでの更新
の結果、トランザクションごとの版の間で矛盾が生じて
はならない。
When a transaction commits and ends, the portion of the version of the transaction that has changed since the transaction started is reflected in the actual database. When a transaction aborts and ends, the changed portion of the transaction version is discarded and the actual database remains unchanged. For example, when the transaction T1 in FIG. 5 commits and ends, the change in the balance of Mr. A from $ 100 to $ 200 in the transaction T1 is reflected in the actual database as in V0 'in FIG. Transactional updates must not result in inconsistencies between transactional versions.

【0006】図5のV1ではAさんの残高はトランザク
ションT1が¥100から¥200に修正したので、¥
200に見える。しかしながら、トランザクションT1
はまだ終了していないので、この変更は実際のデータベ
ースに反映されるかわからない。そのため、このときト
ランザクションT2がAさんの残高を参照すると、V2
としてV0、V1のどちらのAさんの残高が見えても矛
盾が起きる可能性がある。図7(A)のように、V0の
Aさんの残高である¥100をV2でのAさんの残高と
すると、トランザクションT1がコミットしたとき、V
0’とV2の間で、Aさんの残高が異なることになる。
また、図7(B)のようにV1の¥200をV2での残
高にしても、トランザクションT1がアボートしたと
き、V0とV2の間で、Aさんの残高が異なることにな
る。
In V1 of FIG. 5, the balance of Mr. A has been changed from $ 100 to $ 200 by transaction T1, so
Looks 200. However, transaction T1
Isn't finished yet, so I don't know if this change will be reflected in the actual database. Therefore, at this time, if transaction T2 refers to Mr. A's balance, V2
Even if the balance of Mr. A in V0 or V1 is visible, inconsistency may occur. As shown in FIG. 7A, when $ 100, which is the balance of Mr. A in V0, is the balance of Mr. A in V2, when the transaction T1 commits,
The balance of Mr. A is different between 0 'and V2.
Further, even if $ 200 of V1 is set to the balance at V2 as shown in FIG. 7B, when transaction T1 aborts, the balance of Mr. A differs between V0 and V2.

【0007】トランザクションごとの版の間でこのよう
な矛盾が生じるような操作を防ぐことによって、トラン
ザクションの隔離性を守るために、従来から2相ルール
によるロック(two−phase locking)
やタイムスタンプによる順序付け(timestamp
ordering)などのトランザクションの直列化
手法(serialization)が知られている。
[0007] In order to prevent such an inconsistency between versions for each transaction and to protect the isolation of transactions, conventionally, two-phase locking is used.
Or timestamp ordering (timestamp
There is known a serialization technique for transactions such as ordering.

【0008】しかし、このような矛盾が生じるかもしれ
ないにもかかわらず、他のトランザクションの版が参照
できると、便利な場合がある。例えば、銀行で管理して
いる総預金残高が¥800以上でなければならないと
き、図5の状況では、V0は¥100+¥500+¥3
00=¥900になり、この条件を満たしている。T1
がAさんの残高を¥200に修正しようとしたときに、
この条件を満たしているか調べるには、Bさんの残高が
必要になる。Bさんの残高は、トランザクションT2に
より¥0に修正されているが、トランザクションT2は
終了していないので、この修正は確定されていない。こ
のような場合、V0とV2のBさんの残高のそれぞれを
使って条件を満たすか調べてみて、両方とも満たしてい
れば、トランザクションT2がコミットしても、アボー
トしても条件を満たすことになる。V0のBさんの残高
では、¥200+¥500+¥300=¥1000で条
件を満たすが、V2のBさんの残高では、¥200+¥
0+¥300=¥500で条件を満たさないので、T1
によるAさんの残高の修正はできない。
However, in spite of the possibility that such inconsistency may arise, it is sometimes useful to be able to refer to other transaction versions. For example, when the total deposit balance managed by the bank must be equal to or more than $ 800, in the situation of FIG. 5, V0 is $ 100 + $ 500 + $ 3.
00 = $ 900, which satisfies this condition. T1
Tries to correct Mr. A's balance to $ 200,
To check whether this condition is satisfied, the balance of Mr. B is required. Mr. B's balance has been modified to $ 0 by transaction T2, but since transaction T2 has not been completed, this modification has not been finalized. In such a case, it is checked whether the condition is satisfied using each of Mr. B's balances of V0 and V2, and if both are satisfied, the condition is satisfied even if the transaction T2 commits or aborts. Become. In the balance of Mr. B in V0, the condition is satisfied with $ 200 + $ 500 + $ 300 = $ 1000, but in the balance of Mr. B in V2, {200+}
Since the condition 0 + $ 300 = $ 500 does not satisfy the condition, T1
Cannot correct Mr. A's balance.

【0009】このようなデータベースに設定されている
条件は整合性(integrity)制約と呼ばれ、ト
ランザクションはその実行により、この条件を守って、
データベースの一貫性(consistency)を保
つ必要がある。整合性制約には、他にも一意性(uni
que)制約や主キー(primary key)制約
などがあり、トランザクションはデータベースを変更す
る前に、変更してもこれらの制約を満たすことを調べな
ければならない。そのためには、先ほどの例のように、
他のすべてのトランザクションの版を必要に応じて参照
できなければならない。
A condition set in such a database is called an integrity constraint, and a transaction satisfies the condition by executing the condition.
It is necessary to maintain the consistency of the database. Integrity constraints also include other uniqueness (uni)
There are que constraints and primary key constraints, etc., and the transaction must make sure that the changes satisfy these constraints before changing the database. To do so, as in the previous example,
It must be possible to refer to all other transaction versions as needed.

【0010】また、SQL規格で定められているアイソ
レーションレベル(isolation level)
のように、トランザクションの開始時からその隔離性を
部分的に放棄することにより、他のトランザクションの
版を参照可能にする場合もある。
Also, an isolation level defined by the SQL standard.
In some cases, a version of another transaction can be referred to by partially giving up its isolation from the beginning of the transaction.

【0011】このようなトランザクションの版を実現す
る従来のトランザクション処理システムのソフトウェア
の構成を説明する。図8は、従来技術によるトランザク
ション処理システムのソフトウェア構成の一例を示す図
である。要求される問合せは、問合せ入出力手段62に
より受け付けられる。問合せ入出力手段62は、受け付
けた問合せを問合せ最適化手段63に渡し、問合せをど
のように実行するか、すなわち、アクセスプランを決定
してもらう。決定されたアクセスプランは問合せ実行手
段64に渡され、実際に問合せを実行する。問合せ実行
手段64は、必要に応じてトランザクション制御手段6
7に対して、トランザクションの操作を指示し、データ
ベースファイルアクセス手段65に対して、データベー
スファイルの操作を指示する。
A software configuration of a conventional transaction processing system for realizing such a transaction version will be described. FIG. 8 is a diagram illustrating an example of a software configuration of a transaction processing system according to the related art. The requested inquiry is accepted by the inquiry input / output means 62. The query input / output unit 62 passes the received query to the query optimization unit 63, and asks the query optimization unit 63 to determine how to execute the query, that is, determine an access plan. The determined access plan is passed to the query execution means 64, and the query is actually executed. The query execution means 64 is provided with the transaction control means 6 if necessary.
7 is instructed to operate a transaction, and the database file access means 65 is instructed to operate a database file.

【0012】データベースファイルアクセス手段65
は、問合せ実行手段64からの指示にしたがい、データ
ベースのデータであるレコードが記録されているハード
ディスク上のデータベースファイル68を操作する。こ
のとき、あるトランザクションが操作するデータベース
ファイル68やそのレコードなどを、他のトランザクシ
ョンから隔離し、そのトランザクションの版を生成する
ために、2相ルールによるロックなどのトランザクショ
ン同時実行制御手段66を呼び出す。また、操作後の状
態が定義されている整合性制約を満たすかどうかを、そ
の制約の内容にしたがって、他のトランザクションの版
である更新前のレコードと更新後のレコードを参照する
ことにより調べる。データベースファイル68の構造や
使用する障害回復方法にもよるが、更新後のレコードは
データベースファイル68から、更新前のレコードはロ
グファイル69から得る方法がある。ログファイル69
は障害回復に必要な情報が記録され、ハードディスク上
に存在する。
Database file access means 65
Operates the database file 68 on the hard disk in which the record, which is the data of the database, is recorded in accordance with the instruction from the query execution means 64. At this time, in order to isolate the database file 68 operated by a certain transaction, its record, and the like from other transactions, and to generate a version of the transaction, a transaction simultaneous execution control unit 66 such as a lock based on a two-phase rule is called. Whether the state after the operation satisfies the defined integrity constraint is checked by referring to the record before update and the record after update, which is a version of another transaction, according to the contents of the constraint. Depending on the structure of the database file 68 and the failure recovery method to be used, there is a method in which records after updating are obtained from the database file 68 and records before updating are obtained from the log file 69. Log file 69
The information required for recovery from a failure is recorded on a hard disk.

【0013】トランザクション制御手段67は、問合せ
実行手段64からの指示にしたがい、トランザクション
の開始、終了や、トランザクション同時実行制御手段6
6を呼び出して、トランザクションのアイソレーション
レベルの変更を行う。
The transaction control means 67 starts and ends a transaction and executes the transaction simultaneous execution control means 6 in accordance with an instruction from the query execution means 64.
6 to change the isolation level of the transaction.

【0014】[0014]

【発明が解決しようとする課題】しかしながら、上述し
たデータベースファイルアクセス手段は、レコードを格
納するレコードファイルや、索引を提供するB+木ファ
イルなど、データベースファイルの種類に応じて、その
操作手段を提供しなければならないため、実装は複雑に
なり、維持が困難である。
However, the database file access means described above provides operation means according to the type of database file, such as a record file for storing records and a B + tree file for providing an index. The implementation is complicated and difficult to maintain.

【0015】上述したデータベースファイルアクセス手
段において、(1)トランザクション同時実行制御手段
の呼び出しによってトランザクションの版を提供するこ
と、(2)データベースに定義されている整合性制約
を、操作後のデータベースが満たすかを検査すること、
(3)この検査のためのデータベースファイル、ログフ
ァイルからの他のトランザクションの版、すなわち更新
前、更新後レコードを参照することは、データベースフ
ァイルの操作手段の提供をより困難にすることになる。
In the database file access means described above, (1) providing a version of a transaction by calling the transaction concurrent execution control means, and (2) the database after operation satisfies the integrity constraint defined in the database. Inspecting,
(3) Referencing the version of another transaction from the database file and log file for this check, that is, the record before and after the update, makes it more difficult to provide operating means for the database file.

【0016】また、問合せ最適化手段によるアクセスプ
ランの生成時に、トランザクションの版の提供や整合性
制約の検査を後回しにしたり、まったく必要ないことが
わかっても、データベースファイルを操作したときに、
データベースファイルアクセス手段内部で必ずこれらの
操作が行われてしまう。
Further, when the access plan is generated by the query optimizing means, the provision of the transaction version and the check of the integrity constraint are postponed, or even if it is found that the transaction plan is not necessary at all, when the database file is operated,
These operations are always performed inside the database file access means.

【0017】本発明は、上述のごとき実情に鑑みてなさ
れたものであり、従来のデータベースファイルアクセス
手段におけるトランザクション同時実行制御手段の呼び
出しによるトランザクションの版の提供や、整合性制約
の検査の省略により、実装が簡略化され、維持が容易
な、データベース問合せ処理におけるトランザクション
の版の提供システム及びデータベース問合せ処理システ
ムを提供することをその目的とする。
The present invention has been made in view of the above circumstances, and provides a transaction version by calling the transaction concurrent execution control means in the conventional database file access means and omits checking consistency constraints. It is an object of the present invention to provide a system for providing a version of a transaction in a database query process and a database query processing system which are simplified in implementation and easy to maintain.

【0018】[0018]

【課題を解決するための手段】請求項1の発明は、デー
タベースへの問合せ要求に応じた問合せ処理の過程にお
いて、前記データベースに対して複数のトランザクショ
ン処理を行うとき、前記データベースのファイルのレコ
ードに、レコードデータに加えて、前記レコードを更新
したトランザクションのID及び更新前のレコードデー
タをそれぞれフィールド値として格納することにより、
問合せを実行しているトランザクションに対して適切な
版を提供することを特徴としたものである。
According to a first aspect of the present invention, when a plurality of transaction processes are performed on the database in the process of query processing in response to a query request to the database, a record of a file of the database is stored in the database. By storing, in addition to the record data, the ID of the transaction that updated the record and the record data before the update as field values,
It is characterized by providing an appropriate version for the transaction executing the query.

【0019】請求項2の発明は、請求項1の発明のデー
タベース問合せ処理におけるトランザクションの版の提
供方法により提供された版を用いて、トランザクション
における所望のアイソレーションレベルを実現してデー
タベースの問合せ処理を行うことを特徴としたものであ
る。
According to a second aspect of the present invention, a desired level of isolation in a transaction is realized by using a version provided by the method for providing a version of a transaction in the database query processing according to the first aspect of the present invention. Is performed.

【0020】請求項3の発明は、請求項1の発明のデー
タベース問合せ処理におけるトランザクションの版の提
供方法により提供された版を用いて、データベースの整
合性制約の検査を行い、該検査結果にしたがってデータ
ベースの問合せ処理を行うことを特徴としたものであ
る。
According to a third aspect of the present invention, a consistency check of a database is performed by using a version provided by the method for providing a version of a transaction in the database query processing according to the first aspect of the present invention, and according to the result of the check. It is characterized by performing a query process of a database.

【0021】請求項4の発明は、データベースへの問合
せ要求に応じた問合せ処理の過程において、前記データ
ベースに対して複数のトランザクション処理を行うと
き、前記データベースのファイルのレコードに、レコー
ドデータに加えて、前記レコードを更新したトランザク
ションのID及び更新前のレコードデータをそれぞれフ
ィールド値として格納することにより、問合せを実行し
ているトランザクションに対して適切な版を提供するこ
とを特徴としたものである。
According to a fourth aspect of the present invention, when a plurality of transaction processes are performed on the database in the process of query processing in response to a query request to the database, a record of the database file is added to the record data in addition to the record data. By storing the ID of the transaction that updated the record and the record data before the update as field values, an appropriate version is provided for the transaction that is executing the inquiry.

【0022】請求項5の発明は、請求項4の発明のデー
タベース問合せ処理におけるトランザクションの版の提
供システムにより提供された版を用いて、トランザクシ
ョンにおける所望のアイソレーションレベルを実現して
データベースの問合せ処理を行うことを特徴としたもの
である。
According to a fifth aspect of the present invention, there is provided a database query processing in which a desired isolation level in a transaction is realized by using a version provided by the transaction version providing system in the database query processing of the fourth aspect of the present invention. Is performed.

【0023】請求項6の発明は、請求項4の発明のデー
タベース問合せ処理におけるトランザクションの版の提
供システムにより提供された版を用いて、データベース
の整合性制約の検査を行い、該検査結果にしたがってデ
ータベースの問合せ処理を行うことを特徴としたもので
ある。
According to a sixth aspect of the present invention, a consistency check of a database is performed by using a version provided by a system for providing a version of a transaction in a database query process according to the fourth aspect of the present invention. It is characterized by performing a query process of a database.

【0024】請求項7の発明は、データベースのファイ
ルを有するサーバと、該データベースに対して問合せ要
求を行うためのクライアント端末と、前記サーバ及びク
ライアント端末を接続するネットワークとからなるトラ
ンザクションの版の提供装置であって、前記クライアン
ト端末からの前記データベースへの問合せ要求に応じた
問合せ処理の過程において、前記データベースに対して
複数のトランザクション処理を行うとき、前記データベ
ースのファイルのレコードに、レコードデータに加え
て、前記レコードを更新したトランザクションのID及
び更新前のレコードデータをそれぞれフィールド値とし
て格納することにより、問合せを実行しているトランザ
クションに対して適切な版を提供することを特徴とした
ものである。
According to a seventh aspect of the present invention, there is provided a transaction version comprising a server having a database file, a client terminal for making an inquiry request to the database, and a network connecting the server and the client terminal. In the apparatus, when performing a plurality of transaction processes on the database in the course of an inquiry process in response to an inquiry request to the database from the client terminal, in addition to record data in a record of a file of the database, By storing the ID of the transaction that has updated the record and the record data before the update as field values, an appropriate version is provided for the transaction that is executing the query. .

【0025】請求項8の発明は、請求項7の発明のデー
タベース問合せ処理におけるトランザクションの版の提
供装置により提供された版を用いて、トランザクション
における所望のアイソレーションレベルを実現してデー
タベースの問合せ処理を行うことを特徴としたものであ
る。
According to an eighth aspect of the present invention, there is provided a database query processing which realizes a desired isolation level in a transaction by using the version provided by the transaction version providing apparatus in the database query processing according to the seventh aspect of the present invention. Is performed.

【0026】請求項9の発明は、請求項7の発明のデー
タベース問合せ処理におけるトランザクションの版の提
供装置により提供された版を用いて、データベースの整
合性制約の検査を行い、該検査結果にしたがってデータ
ベースの問合せ処理を行うことを特徴としたものであ
る。
According to a ninth aspect of the present invention, a consistency check of a database is performed by using a version provided by a transaction version providing device in a database query process according to the seventh aspect of the present invention, and according to the check result. It is characterized by performing a query process of a database.

【0027】請求項10の発明は、データベースへの問
合せ要求に応じた問合せ処理の過程において、前記デー
タベースに対して複数のトランザクション処理を行うと
き、前記データベースのファイルのレコードに、レコー
ドデータに加えて、前記レコードを更新したトランザク
ションのID及び更新前のレコードデータをそれぞれフ
ィールド値として格納することにより、問合せを実行し
ているトランザクションに対して適切な版を提供するこ
とを特徴としたものである。
According to a tenth aspect of the present invention, when a plurality of transaction processes are performed on the database in the process of query processing in response to a query request to the database, a record of the database file is added to the record data in addition to the record data. By storing the ID of the transaction that updated the record and the record data before the update as field values, an appropriate version is provided for the transaction that is executing the inquiry.

【0028】請求項11の発明は、請求項10の発明の
データベース問合せ処理におけるトランザクションの版
の提供を実行するためのプログラムを実行することによ
り提供された版を用いて、トランザクションにおける所
望のアイソレーションレベルを実現してデータベースの
問合せ処理を行うことを特徴としたものである。
According to an eleventh aspect of the present invention, a desired isolation in a transaction is obtained by using a version provided by executing a program for executing a version of a transaction in the database query processing according to the tenth aspect of the present invention. It is characterized in that the level is realized and the query processing of the database is performed.

【0029】請求項12の発明は、請求項10の発明の
データベース問合せ処理におけるトランザクションの版
の提供を実行するためのプログラムを実行することによ
り提供された版を用いて、データベースの整合性制約の
検査を行い、該検査結果にしたがってデータベースの問
合せ処理を行うことを特徴としたものである。
According to a twelfth aspect of the present invention, a version provided by executing a program for providing a version of a transaction in the database query processing according to the tenth aspect of the present invention is used to execute a database integrity constraint. A check is performed, and an inquiry process of a database is performed according to the check result.

【0030】[0030]

【発明の実施の形態】図1は本発明によるトランザクシ
ョン処理のために構成されたサーバ−クライアントシス
テムの一例を示す図、図2は図1を展開した図で、本発
明によるトランザクション処理のために構成されたコン
ピュータシステムのハードウェア構成の一例を示す図、
図3は本発明によるトランザクション処理のための機能
構成或いはシステムのソフトウェア構成の一例を示す図
である。図1及び図2中、1はメモリ11,CPU1
2,ハードディスク13を有するサーバ、2は通信ネッ
トワーク等のネットワーク、3(3’)はメモリ31
(31’),CPU32(32’),ハードディスク3
3(33’)を有し、通信ネットワーク2を介してサー
バ1に接続された複数の端末(クライアント若しくはク
ライアント端末ともいう)、34(34’)は端末3
(3’)の表示装置であるモニタ、35(35’)は端
末3(3’)のポインティングデバイスであるマウス、
36(36’)は端末3(3’)の入力装置であるキー
ボードである。
FIG. 1 is a diagram showing an example of a server-client system configured for transaction processing according to the present invention. FIG. 2 is an expanded view of FIG. The figure showing an example of the hardware configuration of the configured computer system,
FIG. 3 is a diagram showing an example of a functional configuration for transaction processing or a software configuration of a system according to the present invention. 1 and 2, 1 is a memory 11, a CPU 1
2, a server having a hard disk 13, 2 a network such as a communication network, and 3 (3 ') a memory 31
(31 '), CPU 32 (32'), hard disk 3
3 (33 '), a plurality of terminals (also called clients or client terminals) connected to the server 1 via the communication network 2, and 34 (34')
A monitor which is a display device of (3 '); a mouse which is a pointing device of terminal 3 (3');
A keyboard 36 (36 ') is an input device of the terminal 3 (3').

【0031】端末3(3’)は、システムの利用者が問
合せ要求を入力したり、問合せ結果を出力したりするた
めに利用する計算機である。一般に、端末3には問合せ
要求を入力するためのキーボード36及びマウス35な
どのポインティングデバイスや、問合せ結果を表示する
ためのディスプレイ34が装備される。また、端末3は
メモリ31,CPU32,ハードディスク33を備え、
ソフトウェアによるプログラムが実行可能である。端末
3では、後述する図3中の問合せ入出力手段43がプロ
グラムとして実行される。
The terminal 3 (3 ') is a computer used by a user of the system to input an inquiry request and output an inquiry result. Generally, the terminal 3 is provided with a pointing device such as a keyboard 36 and a mouse 35 for inputting an inquiry request and a display 34 for displaying an inquiry result. The terminal 3 includes a memory 31, a CPU 32, and a hard disk 33,
A software program can be executed. In the terminal 3, an inquiry input / output unit 43 in FIG. 3 described later is executed as a program.

【0032】サーバ1は、端末3から入力された問合せ
要求に応じた問合せ処理を行い、その結果を端末3に返
すための計算機である。端末3とサーバ1は、後述する
ネットワーク2で接続される。サーバ1はメモリ11,
CPU12,ハードディスク13を備え、ソフトウェア
によるプログラムが実行可能である。サーバ1では、後
述する図3中の問合せ最適化手段43、問合せ実行手段
44、データベースファイルアクセス手段45、トラン
ザクション同時実行制御手段46、トランザクション制
御手段47、及び削除レコード破棄問合せ発行手段41
がプログラムとして実行される。データベースファイル
48は、ハードディスク13に記録される。
The server 1 is a computer for performing an inquiry process according to the inquiry request input from the terminal 3 and returning the result to the terminal 3. The terminal 3 and the server 1 are connected by a network 2 described later. The server 1 has a memory 11,
It has a CPU 12 and a hard disk 13 and can execute a program by software. In the server 1, a query optimizing unit 43, a query executing unit 44, a database file access unit 45, a transaction simultaneous execution control unit 46, a transaction control unit 47, and a deleted record discarding query issuing unit 41 in FIG.
Is executed as a program. The database file 48 is recorded on the hard disk 13.

【0033】ネットワーク2は、端末3及びサーバ1を
つなぐ伝送路である。一般に、ケーブルで実現され、通
信プロトコルにはTCP/IPが使われる。ただし、端
末3とサーバ1との通信プロトコルが一致すれば、ケー
ブルを使用しない無線LANや放送波を使ったネットワ
ークでも構わない。
The network 2 is a transmission line connecting the terminal 3 and the server 1. Generally, it is realized by a cable, and TCP / IP is used as a communication protocol. However, if the communication protocol between the terminal 3 and the server 1 matches, a wireless LAN without using a cable or a network using broadcast waves may be used.

【0034】図3を参照して、本発明によるトランザク
ションの版の提供と問い合わせ処理の概要を機能的に説
明する。本発明による版の提供及び問い合わせ処理の機
能を実現する手段としては、削除レコード破棄問合せ発
行手段41と、基本的に図8で説明した各手段を援用し
た、問合せ入出力手段42,問合せ最適化手段43,問
合せ実行手段44,データベースファイルアクセス手段
45,トランザクション同時実行制御手段46,トラン
ザクション制御手段47,データベースファイル48を
備える。上記各手段について図8で説明した各手段との
違いを中心に以下に説明する。
With reference to FIG. 3, the outline of the provision of the transaction version and the inquiry processing according to the present invention will be functionally described. As means for realizing the functions of version provision and query processing according to the present invention, a deleted record discarding query issuing means 41 and a query input / output means 42, a query optimization It has means 43, query execution means 44, database file access means 45, transaction simultaneous execution control means 46, transaction control means 47, and database file 48. Each of the above means will be described below focusing on differences from each means described in FIG.

【0035】問合せ実行手段44は、従来のデータベー
スファイルアクセス手段65において実装されてきたト
ランザクションの版の提供や、整合性制約の検査をアク
セスプランの実行によって行う。ここで、版(vers
ion)とは、トランザクションごとのデータベースの
見え方、姿のことである。問合せ最適化手段43は、問
合せ入出力手段42から与えられた問合せにしたがっ
て、必要に応じて、トランザクションの版の提供や、整
合性制約の検査を含むアクセスプランを生成する。
The query execution unit 44 provides a version of the transaction implemented in the conventional database file access unit 65 and checks the integrity constraint by executing an access plan. Here, the version (vers
“ion)” refers to the appearance and appearance of the database for each transaction. The query optimizing unit 43 generates an access plan including provision of a transaction version and checking of integrity constraints as necessary according to the query given from the query input / output unit 42.

【0036】データベースファイル48のレコードに
は、データベースのデータを表すフィールドに加えて、
以下のフィールドを定義する。 (1)レコードを最後に更新したトランザクションのト
ランザクションIDを表すフィールド、 (2)更新前のデータベースのデータを表すフィール
ド。
In the records of the database file 48, in addition to the fields representing the data of the database,
Define the following fields: (1) A field representing the transaction ID of the transaction that last updated the record, and (2) a field representing the data of the database before the update.

【0037】問合せ実行手段44によるデータベースフ
ァイル48の更新操作は、対象となるレコードの最後に
更新したトランザクションのトランザクションIDと、
必要に応じて、更新前のデータを表すフィールドを更新
する。
The update operation of the database file 48 by the query execution means 44 includes the transaction ID of the last updated transaction of the target record,
Update the field representing the data before update, if necessary.

【0038】問合せ実行手段44によるトランザクショ
ンの版の提供のうち、可能なものは、トランザクション
表中の現在実行中のトランザクションのトランザクショ
ンIDと、データベースファイルのレコード中のそのレ
コードを最後に更新したトランザクションのトランザク
ションIDを使った選択操作により行う。可能でないも
のに関しては、従来の2相ルールによるロックなどのト
ランザクション同時実行制御手段46により行う。
Of the transaction versions provided by the query execution means 44, the possible ones are the transaction ID of the currently executing transaction in the transaction table and the transaction ID of the last updated transaction in the database file record. This is performed by a selection operation using a transaction ID. For those that are not possible, this is performed by the transaction simultaneous execution control means 46 such as a lock based on the conventional two-phase rule.

【0039】問合せ実行手段44によるデータベースの
整合性制約の検査は、データベースファイル48からの
更新後のデータと、他のトランザクションにより更新中
のレコードについては、更新前のデータを使用して行
う。
The checking of the database consistency constraint by the query execution means 44 is performed using the data after the update from the database file 48 and the data before the update for the record being updated by another transaction.

【0040】トランザクション制御手段47は、問合せ
実行手段44からの指示に従い、(1)トランザクショ
ンの開始、(2)トランザクションの終了(コミット,
アボート)、(3)トランザクションのアイソレーショ
ンレベルの変更、の各処理を行う。トランザクション制
御手段47は、トランザクションを開始するごとに、そ
れぞれのトランザクションを一意に識別可能なトランザ
クションIDを割り当てる。現在実行中のトランザクシ
ョン、つまり、終了していないトランザクションのトラ
ンザクションIDは、メモリ11上のトランザクション
表に管理される。
According to the instruction from the query execution means 44, the transaction control means 47 (1) starts the transaction, (2) ends the transaction (commit,
Abort) and (3) changing the isolation level of the transaction. Each time a transaction is started, the transaction control means 47 assigns a transaction ID capable of uniquely identifying each transaction. The transaction ID of the transaction currently being executed, that is, the transaction that has not been completed, is managed in the transaction table on the memory 11.

【0041】図4は、本発明による問合せ処理を実行す
るためのデータベースファイル及びトランザクション表
の一例を示す図である。例えば、図4のトランザクショ
ン表を見ると、現在実行中のトランザクションは2つあ
り、それぞれのトランザクションIDが“11”と“1
2”であることがわかる。
FIG. 4 is a diagram showing an example of a database file and a transaction table for executing the inquiry processing according to the present invention. For example, looking at the transaction table of FIG. 4, there are two transactions currently being executed, and their transaction IDs are "11" and "1".
2 ".

【0042】データベースファイル48は、ハードディ
スク13上に記憶され、データベースのデータをレコー
ドの集まりとして記録している。図4の上部は、あるデ
ータベースファイルを表している。一行一行はレコード
を表しており、それぞれのレコードには、それを一意に
識別するためのレコードID51、レコードを最後に更
新したトランザクションのトランザクションIDである
最終更新トランザクションID52、データベースのデ
ータであるフィールド53、更新前のデータベースのデ
ータである更新前フィールド54が格納される。
The database file 48 is stored on the hard disk 13 and records data of the database as a set of records. The upper part of FIG. 4 shows a certain database file. Each row represents a record, and each record has a record ID 51 for uniquely identifying the record, a last update transaction ID 52 which is a transaction ID of a transaction which last updated the record, and a field 53 which is data of a database. , A pre-update field 54 which is data of the database before the update.

【0043】データベースファイルアクセス手段45
は、データベースファイル48の種類に応じた参照、更
新操作を行う手段を提供する。従来のようなトランザク
ション同時実行制御手段46の呼び出しによる版の提供
や、更新操作後の整合性制約の検査は行わないので、実
装が簡略化され、維持が容易になる。
Database file access means 45
Provides means for performing reference and update operations according to the type of the database file 48. Since the version is not provided by calling the transaction simultaneous execution control means 46 and the consistency constraint is not checked after the update operation, the implementation is simplified and the maintenance is easy.

【0044】問合せ実行手段44は、問合せ最適化手段
43により生成されるアクセスプランによって指示され
たデータベースファイルに対する更新操作を、以下のよ
うに扱う。
The query execution unit 44 handles an update operation on the database file specified by the access plan generated by the query optimization unit 43 as follows.

【0045】(1)レコードの挿入: 新しいレコード
を識別するレコードID51、最終更新トランザクショ
ンID52に挿入を行うトランザクションのトランザク
ションID、フィールド53には挿入するデータ、更新
前フィールド54は空であるレコードを挿入する。 (2)レコードの削除: 削除するレコードのフィール
ド53を空にするようにレコードを修正する。 (3)レコードの修正: 修正するレコードの最終更新
トランザクションID52を、修正を行うトランザクシ
ョンのトランザクションIDに、更新前のフィールド5
4を修正前のフィールドに、フィールド53を修正後の
フィールドにそれぞれ変更する。
(1) Inserting a record: A record ID 51 for identifying a new record, a transaction ID of a transaction to be inserted in a last update transaction ID 52, data to be inserted in a field 53, and an empty record in a field 54 before update are inserted I do. (2) Deletion of a record: The record is modified so that the field 53 of the record to be deleted becomes empty. (3) Modification of Record: The last update transaction ID 52 of the record to be modified is set to the transaction ID of the transaction to be modified, and
4 is changed to the field before correction, and the field 53 is changed to the field after correction.

【0046】例えば、図4のIDが“4”のレコードは
IDが“11”のトランザクションにより、フィールド
53が空なので削除され、IDが“6”のレコードは、
フィールド53、更新前フィールド54の両方が空でな
いので、IDが“11”のトランザクションにより修正
され、IDが“7”のレコードは、更新前フィールド5
4が空のなのでIDが“12”のトランザクションによ
り挿入されたことがわかる。
For example, the record with the ID “4” in FIG. 4 is deleted by the transaction with the ID “11” because the field 53 is empty, and the record with the ID “6” is
Since both the field 53 and the pre-update field 54 are not empty, the record with the ID “11” is modified by the transaction with the ID “11”.
Since 4 is empty, it can be seen that it was inserted by the transaction whose ID is "12".

【0047】問合せ最適化手段43は、問合せ入出力手
段42から与えられた問合せを効率よく実行するアクセ
スプランを生成する。アクセスプラン生成時、可能であ
れば、従来のトランザクション同時実行制御手段46に
よりトランザクションの版を提供するのではなく、デー
タベースファイル48からレコードを取り出す以下のよ
うな集合演算により版を提供するアクセスプランを生成
する。
The query optimizing unit 43 generates an access plan for efficiently executing the query given from the query input / output unit 42. When the access plan is generated, if possible, an access plan that provides a version by the following set operation that retrieves a record from the database file 48 instead of providing a version of the transaction by the conventional transaction concurrent execution control means 46 is created. Generate.

【0048】(1)問合せを実行しているトランザクシ
ョンの版を参照する。最終更新トランザクションID5
2が、トランザクション表から得た現在実行中のトラン
ザクションのトランザクションIDのうち、アクセスプ
ランを実行するトランザクション以外のものと等しく、
かつフィールド53が空でないレコードを取り出す。 (2)すべてのトランザクションの版を参照する、すな
わちSQL規格のアイソレーションレベルのnonre
peatable readである。フィールド53が
空でないレコードを取り出す。 (3)整合性制約の検査のための特別な版を参照する。
最終更新トランザクションID52が、トランザクショ
ン表から得た現在実行中のトランザクションのトランザ
クションIDのうち、アクセスプランを実行するトラン
ザクション以外のものと等しい、またはフィールド53
が空でないレコードを取り出す。
(1) Referring to the version of the transaction executing the query. Last update transaction ID 5
2 is equal to the transaction ID of the currently executing transaction obtained from the transaction table other than the transaction executing the access plan,
A record whose field 53 is not empty is extracted. (2) Refer to the version of all transactions, that is, the nonrelation of the SQL-level isolation level
It is a petable read. Retrieve a record whose field 53 is not empty. (3) Refer to a special edition for checking integrity constraints.
Last updated transaction ID 52 is equal to the transaction ID of the currently executing transaction obtained from the transaction table other than the transaction executing the access plan, or field 53
Retrieves non-empty records.

【0049】また、これらの処理を新たに最適化の対象
にできるため、従来より効率のよいアクセスプランの生
成が可能になる。
Further, since these processes can be newly targeted for optimization, it is possible to generate an access plan with higher efficiency than before.

【0050】削除レコード破棄問合せ発行手段41は、
コミットされたトランザクションにより削除されたレコ
ードを実際に削除する問合せを、定期的に問合せ最適化
手段43に送る。問合せ最適化手段43は問合せ入出力
手段42からの問合せと同様にアクセスプランを生成す
る。ただし、削除レコードの削除が問合せ実行手段44
によってレコードの修正に扱われないように、アクセス
プランを生成する。
The deletion record discarding query issuing means 41
A query for actually deleting the record deleted by the committed transaction is periodically sent to the query optimizing unit 43. The query optimizing unit 43 generates an access plan in the same manner as the query from the query input / output unit 42. However, the deletion of the deleted record is performed by the query execution unit 44.
Generate an access plan so that it is not treated as a record modification by.

【0051】上述のごとき各種機能をもつ本発明の一実
施形態としての、データベース問合せ処理におけるトラ
ンザクションの版の提供方法及びシステムを説明する。
この方法及びシステムは、データベースへの問合せ要求
に応じた問合せ処理の過程において、前記データベース
に対して複数のトランザクション処理を行うとき、前記
データベースのファイル48のレコードに、レコードデ
ータ53に加えて、前記レコードを更新したトランザク
ションのID52及び更新前のレコードデータ54をそ
れぞれフィールド値として格納することにより、問合せ
を実行しているトランザクションに適応した版を提供す
るようにしている。
A method and a system for providing a version of a transaction in a database query process as one embodiment of the present invention having various functions as described above will be described.
The method and the system include, when performing a plurality of transaction processes on the database in the course of an inquiry process in response to an inquiry request to the database, in addition to record data 53 to the record of the file 48 of the database, By storing the ID 52 of the transaction that has updated the record and the record data 54 before the update as field values, a version adapted to the transaction executing the query is provided.

【0052】本発明の他の実施形態としての、データベ
ース問合せ処理方法及びシステムは、上述の版の提供方
法及びシステムにより提供された版を用いて、トランザ
クションにおける所望のアイソレーションレベルを実現
してデータベースの問合せ処理を行うようにしている。
According to another embodiment of the present invention, a database query processing method and system realizes a desired isolation level in a transaction by using the version provided by the above-described version providing method and system. Query processing is performed.

【0053】さらに、本発明の他の実施形態としての、
データベース問合せ処理方法及びシステムは、上述の版
の提供方法及びシステムにより提供された版を用いて、
データベースの整合性制約の検査を行い、該検査結果に
したがってデータベースの問合せ処理を行うようにして
いる。
Further, as another embodiment of the present invention,
The database query processing method and system uses the version provided by the above-described version providing method and system,
Inspection of database integrity constraints is performed, and a database inquiry process is performed according to the inspection result.

【0054】本発明の一実施形態としての、データベー
ス問合せ処理におけるトランザクションの版の提供装置
は、データベースのファイル48(ハードディスク33
内に格納されている)を有するサーバ1と、該データベ
ースに対して問合せ要求を行うためのクライアント端末
3と、前記サーバ1及びクライアント端末3を接続する
ネットワーク2とからなるトランザクションの版の提供
装置であって、前記クライアント端末3からの前記デー
タベースへの問合せ要求に応じた問合せ処理の過程にお
いて、前記データベースに対して複数のトランザクショ
ン処理を行うとき、前記データベースのファイル48の
レコードに、レコードデータ53に加えて、前記レコー
ドを更新したトランザクションのID52及び更新前の
レコードデータ54をそれぞれフィールド値として格納
することにより、問合せを実行しているトランザクショ
ンに適応した版を提供するようにしている。
An apparatus for providing a version of a transaction in a database inquiry process according to an embodiment of the present invention includes a database file 48 (the hard disk 33).
), A client terminal 3 for making an inquiry request to the database, and a network 2 connecting the server 1 and the client terminal 3. When performing a plurality of transaction processes on the database in the course of an inquiry process in response to an inquiry request to the database from the client terminal 3, the record of the file 48 of the database includes record data 53 In addition, by storing the ID 52 of the transaction that has updated the record and the record data 54 before the update as field values, a version suitable for the transaction executing the query is provided.

【0055】本発明の他の実施形態としての、データベ
ース問合せ処理装置は、上記の版の提供装置により提供
された版を用いて、トランザクションにおける所望のア
イソレーションレベルを実現してデータベースの問合せ
処理を行うようにしている。
According to another embodiment of the present invention, a database query processing device realizes a desired isolation level in a transaction by using a version provided by the above-described version providing device to perform a database query process. I'm trying to do it.

【0056】さらに、本発明の他の実施形態としての、
データベース問合せ処理装置は、上記の版の提供装置に
より提供された版を用いて、データベースの整合性制約
の検査を行い、該検査結果にしたがってデータベースの
問合せ処理を行うようにしている。
Further, as another embodiment of the present invention,
The database query processing device checks the consistency of the database using the version provided by the version providing device, and performs a database query process according to the check result.

【0057】最後に、本発明による版の提供及び問合せ
処理の機能を実現するためのプログラムやデータを記憶
した記録媒体の実施形態を説明する。記録媒体として
は、具体的には、CD−ROM,光磁気ディスク,DV
D−ROM,フロッピー(登録商標)ディスク,フラッ
シュメモリ,及びその他各種ROMやRAM等が想定で
き、これら記録媒体に上述した本発明の版の提供或いは
問合せ処理の機能を実現するためのプログラムを記録し
て流通させることにより、当該機能の実現を容易にす
る。そしてコンピュータ等の情報処理装置に上記のごと
くの記録媒体を装着して情報処理装置によりプログラム
を読み出すか、若しくは情報処理装置が備えている記憶
媒体に当該プログラムを記憶させておき、必要に応じて
読み出すことにより、本発明に関わる版の提供機能及び
問合せ処理機能を実行することができる。
Lastly, a description will be given of an embodiment of a recording medium storing a program and data for realizing functions of providing a version and inquiring processing according to the present invention. As a recording medium, specifically, a CD-ROM, a magneto-optical disk, a DV
A D-ROM, a floppy (registered trademark) disk, a flash memory, and various other ROMs and RAMs can be assumed, and a program for providing the above-described version of the present invention or realizing the inquiry processing function is recorded on these recording media. By distributing the information, the function can be easily realized. Then, the program is read by the information processing apparatus by attaching the recording medium as described above to an information processing apparatus such as a computer, or the program is stored in a storage medium provided in the information processing apparatus, and if necessary, By reading, the function of providing a version and the function of query processing according to the present invention can be executed.

【0058】本実施形態におけるデータベース問合せ処
理におけるトランザクションの版の提供を実行するため
のプログラムを記録したコンピュータ読み取り可能な記
録媒体は、データベースへの問合せ要求に応じた問合せ
処理の過程において、前記データベースに対して複数の
トランザクション処理を行うとき、前記データベースの
ファイル48のレコードに、レコードデータ53に加え
て、前記レコードを更新したトランザクションのID5
2及び更新前のレコードデータ54をそれぞれフィール
ド値として格納することにより、問合せを実行している
トランザクションに適応した版を提供するプログラムを
記録したものである。
The computer-readable recording medium storing the program for executing the provision of the transaction version in the database inquiry processing in this embodiment is stored in the database in the course of the inquiry processing in response to the inquiry request to the database. When a plurality of transaction processes are performed on the record, in addition to the record data 53, the ID of the transaction that updated the record is added to the record in the file 48 of the database.
2 is stored as a field value of the record data 54 before the update, and a program for providing a version adapted to the transaction executing the inquiry is recorded.

【0059】本発明の他の実施形態としての、データベ
ース問合せ処理を実行するためのプログラムを記録した
コンピュータ読み取り可能な記録媒体は、上記のトラン
ザクションに適応した版を提供するプログラムを実行す
ることにより提供された版を用いて、トランザクション
における所望のアイソレーションレベルを実現してデー
タベースの問合せ処理を行うプログラムを記録したもの
である。
As another embodiment of the present invention, a computer-readable recording medium on which a program for executing a database inquiry process is recorded is provided by executing a program for providing a version adapted to the above transaction. A program for realizing a desired isolation level in a transaction and performing a query process on a database by using the obtained version is recorded.

【0060】さらに、本発明の他の実施形態としての、
データベース問合せ処理を実行するためのプログラムを
記録したコンピュータ読み取り可能な記録媒体は、同様
に上記のトランザクションに適応した版を提供するプロ
グラムを実行することにより提供された版を用いて、デ
ータベースの整合性制約の検査を行い、該検査結果にし
たがってデータベースの問合せ処理を行うプログラムを
記録したものである。
Further, as another embodiment of the present invention,
A computer-readable recording medium on which a program for executing a database query process is recorded is also provided with a database provided by executing a program that provides a version adapted to the above-described transaction, and using the version provided by executing the program. The program records a program for checking constraints and performing query processing of a database according to the check results.

【0061】実際には、前述のごとく、メモリ31,C
PU32,ハードディスク33を備えた端末3では、問
合せを要求するための問合せ入出力手段42がプログラ
ムとして実行される。加えて、メモリ11,CPU1
2,ハードディスク13を備えたサーバ1では、端末3
からの問合せ要求に対し、上述の問合せ最適化手段4
3、問合せ実行手段44、データベースファイルアクセ
ス手段45、トランザクション同時実行制御手段46、
トランザクション制御手段47、及び削除レコード破棄
問合せ発行手段41がプログラムとして実行される。デ
ータベースファイル48は、ハードディスク13に記録
される。
Actually, as described above, the memories 31, C
In the terminal 3 including the PU 32 and the hard disk 33, an inquiry input / output unit 42 for requesting an inquiry is executed as a program. In addition, the memory 11, the CPU 1
2. In the server 1 having the hard disk 13, the terminal 3
In response to an inquiry request from
3. query execution means 44, database file access means 45, transaction simultaneous execution control means 46,
The transaction control means 47 and the deletion record discard inquiry issuing means 41 are executed as programs. The database file 48 is recorded on the hard disk 13.

【0062】[0062]

【発明の効果】本発明によれば、従来のデータベースフ
ァイルアクセス手段におけるトランザクション同時実行
制御手段の呼び出しによるトランザクションの版の提供
や、整合性制約の検査の省略が可能なので、実装が簡略
化され、維持が容易になる。
According to the present invention, it is possible to provide a version of a transaction by calling the transaction concurrent execution control means in the conventional database file access means and omit checking of integrity constraints, so that the implementation is simplified. Maintenance is easy.

【0063】本発明によれば、問合せ実行手段における
トランザクションの版の提供や整合性制約の検査を、最
終更新トランザクションIDや更新前データを表すフィ
ールドを使って、問合せ処理において従来使用されてい
る集合演算で処理できる。
According to the present invention, the provision of the version of the transaction and the check of the integrity constraint in the query execution means are performed by using the field indicating the last updated transaction ID and the data before the update by using a set which has been conventionally used in the query processing. Can be processed by arithmetic.

【0064】本発明によれば、問合せ最適化手段によ
り、従来は最適化の対象でなかったトランザクションの
版の提供や整合性制約の検査を含めたアクセスプランを
生成できるので、従来より効率的な問合せを実行でき
る。
According to the present invention, the query optimizing means can generate an access plan including provision of a version of a transaction which has not been conventionally targeted for optimization and inspection of integrity constraints, so that it is more efficient than in the past. Can execute queries.

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

【図1】 本発明によるトランザクション処理のために
構成されたサーバ−クライアントシステムの一例を示す
図である。
FIG. 1 is a diagram showing an example of a server-client system configured for transaction processing according to the present invention.

【図2】 図1を展開した図で、本発明によるトランザ
クション処理のために構成されたコンピュータシステム
のハードウェア構成の一例を示す図である。
FIG. 2 is an expanded view of FIG. 1, showing an example of a hardware configuration of a computer system configured for transaction processing according to the present invention.

【図3】 本発明によるトランザクション処理のための
機能構成或いはシステムのソフトウェア構成の一例を示
す図である。
FIG. 3 is a diagram showing an example of a functional configuration for transaction processing or a software configuration of a system according to the present invention.

【図4】 本発明による問合せ処理を実行するためのデ
ータベースファイル及びトランザクション表の一例を示
す図である。
FIG. 4 is a diagram showing an example of a database file and a transaction table for executing an inquiry process according to the present invention.

【図5】 各トランザクションからのデータベースの見
え方の違いを説明するための図である。
FIG. 5 is a diagram for explaining a difference in appearance of a database from each transaction.

【図6】 各トランザクションからのデータベースの見
え方の違いを説明するための図である。
FIG. 6 is a diagram for explaining a difference in the appearance of a database from each transaction.

【図7】 各トランザクションからのデータベースの見
え方の違いを説明するための図である。
FIG. 7 is a diagram for explaining a difference in appearance of a database from each transaction.

【図8】 従来技術によるトランザクション処理システ
ムのソフトウェア構成の一例を示す図である。
FIG. 8 is a diagram illustrating an example of a software configuration of a transaction processing system according to the related art.

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

1…サーバ、2…ネットワーク、3,3’…クライアン
ト端末、11,31,31’…メモリ、12,32,3
2’…CPU、13,33,33’…ハードディスク、
34,34’…モニタ、35,35’…マウス、36,
36’…キーボード、41…削除レコード破棄問合せ発
行手段、42,62…問合せ入出力手段、43,63…
問合せ最適化手段、44,64…問合せ実行手段、4
5,65…データベースファイルアクセス手段、46,
66…トランザクション同時実行制御手段、47,67
…トランザクション制御手段、48,68…データベー
スファイル、51…レコードID、52…最終更新トラ
ンザクションID、53…フィールド、54…更新前フ
ィールド、69…ログファイル。
DESCRIPTION OF SYMBOLS 1 ... Server, 2 ... Network, 3, 3 '... Client terminal, 11, 31, 31' ... Memory, 12, 32, 3
2 '... CPU, 13, 33, 33' ... hard disk,
34, 34 '... monitor, 35, 35' ... mouse, 36,
36 ': Keyboard, 41: Deleted record discarding query issuing means, 42, 62 ... Query input / output means, 43, 63 ...
Query optimizing means, 44, 64 ... Query executing means, 4
5, 65 ... database file access means, 46,
66 ... transaction simultaneous execution control means, 47, 67
... transaction control means, 48, 68 ... database file, 51 ... record ID, 52 ... last update transaction ID, 53 ... field, 54 ... field before update, 69 ... log file.

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 データベースへの問合せ要求に応じた問
合せ処理の過程において、前記データベースに対して複
数のトランザクション処理を行うとき、前記データベー
スのファイルのレコードに、レコードデータに加えて、
前記レコードを更新したトランザクションのID及び更
新前のレコードデータをそれぞれフィールド値として格
納することにより、問合せを実行しているトランザクシ
ョンに適応した版を提供することを特徴とするデータベ
ース問合せ処理におけるトランザクションの版の提供方
法。
In the process of query processing in response to a query request to a database, when performing a plurality of transaction processes on the database, in addition to the record data,
A transaction version in a database query process, wherein a version adapted to the transaction executing the query is provided by storing the ID of the transaction that updated the record and the record data before the update as field values, respectively. How to provide.
【請求項2】 請求項1に記載のデータベース問合せ処
理におけるトランザクションの版の提供方法により提供
された版を用いて、トランザクションにおける所望のア
イソレーションレベルを実現してデータベースの問合せ
処理を行うことを特徴とするデータベース問合せ処理方
法。
2. A database query process is implemented by using a version provided by the method for providing a version of a transaction in the database query process according to claim 1 to achieve a desired isolation level in the transaction. Database query processing method.
【請求項3】 請求項1に記載のデータベース問合せ処
理におけるトランザクションの版の提供方法により提供
された版を用いて、データベースの整合性制約の検査を
行い、該検査結果にしたがってデータベースの問合せ処
理を行うことを特徴とするデータベース問合せ処理方
法。
3. A database integrity constraint is checked using a version provided by the transaction version providing method in the database query process according to claim 1, and a database query process is performed according to the check result. A database query processing method characterized by performing:
【請求項4】 データベースへの問合せ要求に応じた問
合せ処理の過程において、前記データベースに対して複
数のトランザクション処理を行うとき、前記データベー
スのファイルのレコードに、レコードデータに加えて、
前記レコードを更新したトランザクションのID及び更
新前のレコードデータをそれぞれフィールド値として格
納することにより、問合せを実行しているトランザクシ
ョンに適応した版を提供することを特徴とするデータベ
ース問合せ処理におけるトランザクションの版の提供シ
ステム。
4. In the process of query processing in response to a query request to a database, when performing a plurality of transaction processes on the database, in addition to the record data in the record of the file of the database,
A transaction version in a database query process, wherein a version adapted to the transaction executing the query is provided by storing the ID of the transaction that updated the record and the record data before the update as field values, respectively. Offer system.
【請求項5】 請求項4に記載のデータベース問合せ処
理におけるトランザクションの版の提供システムにより
提供された版を用いて、トランザクションにおける所望
のアイソレーションレベルを実現してデータベースの問
合せ処理を行うことを特徴とするデータベース問合せ処
理システム。
5. A database query processing is realized by realizing a desired isolation level in a transaction by using a version provided by the transaction version providing system in the database query processing according to claim 4. Database query processing system.
【請求項6】 請求項4に記載のデータベース問合せ処
理におけるトランザクションの版の提供システムにより
提供された版を用いて、データベースの整合性制約の検
査を行い、該検査結果にしたがってデータベースの問合
せ処理を行うことを特徴とするデータベース問合せ処理
システム。
6. A database integrity constraint check is performed using a version provided by the transaction version providing system in the database query process according to claim 4, and a database query process is performed according to the check result. A database query processing system characterized by performing:
【請求項7】 データベースのファイルを有するサーバ
と、該データベースに対して問合せ要求を行うためのク
ライアント端末と、前記サーバ及びクライアント端末を
接続するネットワークとからなるトランザクションの版
の提供装置であって、前記クライアント端末からの前記
データベースへの問合せ要求に応じた問合せ処理の過程
において、前記データベースに対して複数のトランザク
ション処理を行うとき、前記データベースのファイルの
レコードに、レコードデータに加えて、前記レコードを
更新したトランザクションのID及び更新前のレコード
データをそれぞれフィールド値として格納することによ
り、問合せを実行しているトランザクションに適応した
版を提供することを特徴とするデータベース問合せ処理
におけるトランザクションの版の提供装置。
7. A transaction version providing apparatus comprising: a server having a database file; a client terminal for making an inquiry request to the database; and a network connecting the server and the client terminal. In the process of query processing in response to a query request to the database from the client terminal, when performing a plurality of transaction processing to the database, in the record of the file of the database, in addition to record data, the record A transaction in a database query process characterized in that an updated transaction ID and pre-update record data are stored as field values, respectively, to provide a version adapted to the transaction executing the query. Edition plate providing device.
【請求項8】 請求項7に記載のデータベース問合せ処
理におけるトランザクションの版の提供装置により提供
された版を用いて、トランザクションにおける所望のア
イソレーションレベルを実現してデータベースの問合せ
処理を行うことを特徴とするデータベース問合せ処理装
置。
8. A database query processing is realized by using a version provided by the transaction version providing apparatus in the database query processing according to claim 7 to realize a desired isolation level in the transaction. Database query processing device.
【請求項9】 請求項7に記載のデータベース問合せ処
理におけるトランザクションの版の提供装置により提供
された版を用いて、データベースの整合性制約の検査を
行い、該検査結果にしたがってデータベースの問合せ処
理を行うことを特徴とするデータベース問合せ処理装
置。
9. A database integrity constraint check is performed using a version provided by the transaction version providing apparatus in the database query process according to claim 7, and a database query process is performed according to the check result. A database query processing device characterized by performing:
【請求項10】 データベースへの問合せ要求に応じた
問合せ処理の過程において、前記データベースに対して
複数のトランザクション処理を行うとき、前記データベ
ースのファイルのレコードに、レコードデータに加え
て、前記レコードを更新したトランザクションのID及
び更新前のレコードデータをそれぞれフィールド値とし
て格納することにより、問合せを実行しているトランザ
クションに適応した版を提供することを特徴とするデー
タベース問合せ処理におけるトランザクションの版の提
供を実行するためのプログラムを記録したコンピュータ
読み取り可能な記録媒体。
10. In the process of query processing in response to a query request to a database, when a plurality of transaction processes are performed on the database, the record is updated in addition to record data in a record of a file in the database. Storing the transaction ID and the record data before update as field values, thereby providing a version adapted to the transaction in which the query is being executed. Computer-readable recording medium on which a program for executing the program is recorded.
【請求項11】 請求項10に記載のデータベース問合
せ処理におけるトランザクションの版の提供を実行する
ためのプログラムを実行することにより提供された版を
用いて、トランザクションにおける所望のアイソレーシ
ョンレベルを実現してデータベースの問合せ処理を行う
ことを特徴とするデータベース問合せ処理を実行するた
めのプログラムを記録したコンピュータ読み取り可能な
記録媒体。
11. A desired isolation level in a transaction is realized by using a version provided by executing a program for providing a version of a transaction in the database query processing according to claim 10. A computer-readable recording medium on which a program for executing a database inquiry process, which performs a database inquiry process, is recorded.
【請求項12】 請求項10に記載のデータベース問合
せ処理におけるトランザクションの版の提供を実行する
ためのプログラムを実行することにより提供された版を
用いて、データベースの整合性制約の検査を行い、該検
査結果にしたがってデータベースの問合せ処理を行うこ
とを特徴とするデータベース問合せ処理を実行するため
のプログラムを記録したコンピュータ読み取り可能な記
録媒体。
12. A database integrity constraint is checked using a version provided by executing a program for executing a version of a transaction in the database query processing according to claim 10, A computer-readable recording medium storing a program for executing a database query process, wherein the database query process is performed according to a test result.
JP2000218315A 2000-07-19 2000-07-19 Providing system of version of transaction in data base inquiry processing and data base inquiry processing system using version provided by the same system Pending JP2002032248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000218315A JP2002032248A (en) 2000-07-19 2000-07-19 Providing system of version of transaction in data base inquiry processing and data base inquiry processing system using version provided by the same system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000218315A JP2002032248A (en) 2000-07-19 2000-07-19 Providing system of version of transaction in data base inquiry processing and data base inquiry processing system using version provided by the same system

Publications (1)

Publication Number Publication Date
JP2002032248A true JP2002032248A (en) 2002-01-31

Family

ID=18713286

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000218315A Pending JP2002032248A (en) 2000-07-19 2000-07-19 Providing system of version of transaction in data base inquiry processing and data base inquiry processing system using version provided by the same system

Country Status (1)

Country Link
JP (1) JP2002032248A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004348744A (en) * 2003-05-22 2004-12-09 Microsoft Corp Identification method for identifying change carried out for table, and its system
WO2008149552A1 (en) * 2007-06-06 2008-12-11 Athena Telecom Lab, Inc. Database contradiction solution method
JP2009266243A (en) * 2002-09-03 2009-11-12 Sap Ag Dynamic access of data
US8171003B2 (en) 2007-06-06 2012-05-01 Kunio Kamimura Method and apparatus for changing reference of database

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009266243A (en) * 2002-09-03 2009-11-12 Sap Ag Dynamic access of data
JP4665042B2 (en) * 2002-09-03 2011-04-06 エスアーペー アーゲー Dynamic access of data
JP2004348744A (en) * 2003-05-22 2004-12-09 Microsoft Corp Identification method for identifying change carried out for table, and its system
WO2008149552A1 (en) * 2007-06-06 2008-12-11 Athena Telecom Lab, Inc. Database contradiction solution method
US8171003B2 (en) 2007-06-06 2012-05-01 Kunio Kamimura Method and apparatus for changing reference of database
US9678996B2 (en) 2007-06-06 2017-06-13 Kunio Kamimura Conflict resolution system for database parallel editing

Similar Documents

Publication Publication Date Title
US11216422B2 (en) Universal data management interface
JP3992263B2 (en) Database-file linkage method
US5832498A (en) Device for generating object-oriented interfaces for relational data bases and a process implemented by this device
US7653665B1 (en) Systems and methods for avoiding database anomalies when maintaining constraints and indexes in presence of snapshot isolation
US7895172B2 (en) System and method for writing data dependent upon multiple reads in a distributed database
US5553279A (en) Lossless distribution of time series data in a relational data base network
JP4842279B2 (en) Infrastructure for performing file operations by database server
US7769789B2 (en) High performant row-level data manipulation using a data layer interface
US7548918B2 (en) Techniques for maintaining consistency for different requestors of files in a database management system
US9852174B2 (en) Reducing update conflicts when maintaining views
US8626779B2 (en) Method and system for managing database
US7519620B2 (en) Replication system, method and program for replicating a plurality of databases into a replica database
JP2021028771A (en) Database server device, server system and request processing method
WO2020192663A1 (en) Data management method and related device
EP1349087A2 (en) Remote database access through a table entry
CN117421302A (en) Data processing method and related equipment
US11188228B1 (en) Graphing transaction operations for transaction compliance analysis
JP2002032248A (en) Providing system of version of transaction in data base inquiry processing and data base inquiry processing system using version provided by the same system
US10838947B2 (en) Consistency check for foreign key definition
US7716260B2 (en) Techniques for transaction semantics for a database server performing file operations
CN112286992B (en) Query method, distributed system, device and storage medium
US20030018653A1 (en) Database management method, system for practicing the method and medium recording process program
JP2004259066A (en) Data source integrating program, system and method
JP2000181777A (en) Method and device for linking database file
CN117931765A (en) Re-validating propagated fine-grained decisions

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080325

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080526

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080701

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20081111