JP2000259561A - System and method for data base access control - Google Patents

System and method for data base access control

Info

Publication number
JP2000259561A
JP2000259561A JP11061091A JP6109199A JP2000259561A JP 2000259561 A JP2000259561 A JP 2000259561A JP 11061091 A JP11061091 A JP 11061091A JP 6109199 A JP6109199 A JP 6109199A JP 2000259561 A JP2000259561 A JP 2000259561A
Authority
JP
Japan
Prior art keywords
database
access
driver
data base
connections
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
JP11061091A
Other languages
Japanese (ja)
Inventor
Kengo Shioda
賢吾 塩田
Masatoshi Yamamoto
正敏 山本
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.)
PFU Ltd
Original Assignee
PFU 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 PFU Ltd filed Critical PFU Ltd
Priority to JP11061091A priority Critical patent/JP2000259561A/en
Publication of JP2000259561A publication Critical patent/JP2000259561A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To attain efficient multi-thread data base access by managing and controlling the data base access from respective threads in access to a data base. SOLUTION: A smaller number between a maximum connection number determined by a data base dedicated driver 12 and a maximum connection number determined by the specifications of an entire system is set as the maximum connection number of data base access. Then, a DB access manager 15 unitarily manages and controls the data base access from respective threads in data base access processing and controls the number of data base access processing threads to be requested at the same time smaller than the above set maximum connection number.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データベースアクセス
制御システム及び方法に関し、特に、マルチスレッドに
よる効率のよいデータベースアクセスを可能にしたデー
タベースアクセス制御システム及び方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database access control system and method, and more particularly to a database access control system and method capable of efficient multi-thread database access.

【0002】[0002]

【従来の技術】一般的に、データベースには大量のデー
タが蓄積され、それらを多数の利用者が同時に利用する
ため、データベースシステムの運用にあたっては、利用
者や応用プログラムを支援するために、システム側で多
くの機能を提供する必要がある。そのため、データベー
ス管理システム(DBMS)が用いられて、主にデータ
ベースの運用時にデータベースを統合的に管理してい
る。このデータベース管理システムは、少なくとも、応
用プログラムにデータベースをアクセスさせるための基
本機能を有している。
2. Description of the Related Art In general, a large amount of data is stored in a database and used by many users at the same time. Therefore, in operating a database system, a system is used to support users and application programs. The side needs to provide a lot of functionality. For this reason, a database management system (DBMS) is used to manage the database in an integrated manner mainly when operating the database. This database management system has at least a basic function for making an application program access a database.

【0003】図3は、従来技術のデータベースアクセス
を示している。ここで、10はデータベース(DB)で
あり、データベース専用ドライバ12は、このデータベ
ース10に対するアクセス制御を行う専用のドライバで
ある。データベースドライバマネージャ14は、データ
ベース専用ドライバ12を管理して、データベース10
への接続を行うものである。
FIG. 3 shows a prior art database access. Here, reference numeral 10 denotes a database (DB), and the database-dedicated driver 12 is a dedicated driver for controlling access to the database 10. The database driver manager 14 manages the database-specific driver 12 and
The connection to is made.

【0004】データベース API(アプリケーション
プログラミングインターフェース)16は、データベー
スアクセス処理(スレッド)18と、データベースドラ
イバマネージャ14との接続インターフェースである。
これによって、プログラムからデータベースサーバへ接
続すること、SQL文を組み立て、データベースサーバ
で実行させること、データベースサーバが処理した結果
を取り出すこと、及びデータベースの情報、処理結果に
関する情報等を取り出すことが可能になる。
A database API (application programming interface) 16 is a connection interface between a database access process (thread) 18 and a database driver manager 14.
As a result, it is possible to connect the program to the database server, to assemble the SQL statement and execute it on the database server, to retrieve the result processed by the database server, and to retrieve information on the database, information on the processing result, and the like. Become.

【0005】しかし、従来データベースは、データベー
スへのアクセス処理を管理していなかったため、以下の
問題点を生じていた。
[0005] However, conventionally, the database has not managed access processing to the database, and thus has the following problems.

【0006】・ドライバによって決定される最大接続数
をオーバーして接続しようとした場合、データベースに
接続できずエラーとなる。
If an attempt is made to connect beyond the maximum number of connections determined by the driver, the database cannot be connected and an error occurs.

【0007】・ドライバがマルチスレッド対応でなく、
シングルスレッドでしか対応できない場合に、各スレッ
ドが複数同時にデータベースアクセスを行った場合、デ
ッドロックが発生する。
If the driver is not multi-thread compatible,
When each thread accesses the database at the same time when a single thread can cope, deadlock occurs.

【0008】・データベースへの接続数を制限できず、
要求を全て受け入れるため、システム全体のパフォーマ
ンスが下がる。また、データベースへの競合が発生しや
すくなる。
[0008] The number of connections to the database cannot be limited,
Accepting all requests reduces overall system performance. In addition, competition with the database is likely to occur.

【0009】[0009]

【発明が解決しようとする課題】それ故、本発明は、か
かる問題点を解決し、データベースへのアクセスにおい
て、各スレッドからのデータベースアクセスを管理、制
御して、マルチスレッドによる効率のよいデータベース
アクセスを可能にすることを目的としている。
SUMMARY OF THE INVENTION Therefore, the present invention solves such a problem, and manages and controls database access from each thread in accessing a database, thereby achieving efficient database access by multi-threading. It is intended to make it possible.

【0010】[0010]

【課題を解決するための手段】本発明のデータベースア
クセス制御システム及び方法は、データベース10と、
該データベース10に対してアクセス制御を行うデータ
ベース専用ドライバ12と、該データベース専用ドライ
バ12を管理してデータベース10への接続を行うため
のデータベースドライバマネージャ14と、データベー
スアクセス処理18とデータベースドライバマネージャ
14との接続インターフェースであるデータベース A
PI(アプリケーションプログラミングインターフェー
ス)16とを備えて、データベースへのアクセスを制御
する。データベース専用ドライバ12によって決定され
る最大接続数と、システム全体のスペックによって決定
される最大接続数との少ない方の数をデータベースアク
セスの最大接続数として設定する。そして、DBアクセ
ス管理15は、データベースアクセス処理の各スレッド
からのデータベースアクセスを一元的に管理かつ制御し
て、同時に要求されるデータベースアクセス処理スレッ
ドの数を前記設定された最大接続数以下に管理する。
SUMMARY OF THE INVENTION A database access control system and method of the present invention comprises a database 10;
A database driver 12 for controlling access to the database 10, a database driver manager 14 for managing the database driver 12 and connecting to the database 10, a database access process 18 and a database driver manager 14. Database A which is the connection interface of
A PI (application programming interface) 16 is provided to control access to the database. The smaller of the maximum number of connections determined by the database dedicated driver 12 and the maximum number of connections determined by the specifications of the entire system is set as the maximum number of database access connections. Then, the DB access management 15 centrally manages and controls database access from each thread of the database access processing, and manages the number of simultaneously required database access processing threads to be equal to or less than the set maximum number of connections. .

【0011】[0011]

【発明の実施の形態】図1は、本発明のデータベースア
クセス構成を例示するための図である。ここで、10は
データベース(DB)であり、データベース専用ドライ
バ12は、このデータベース10に対するアクセス制御
を行う専用のドライバである。データベースドライバマ
ネージャ14は、データベース専用ドライバ12を管理
して、データベース10への接続を行うものである。
FIG. 1 is a diagram for illustrating a database access configuration according to the present invention. Here, reference numeral 10 denotes a database (DB), and the database-dedicated driver 12 is a dedicated driver for controlling access to the database 10. The database driver manager 14 manages the dedicated database driver 12 and connects to the database 10.

【0012】データベース API(アプリケーション
プログラミングインターフェース)16は、データベー
スアクセス処理(スレッド)18と、データベースドラ
イバマネージャ14との接続インターフェースであり、
これによって、プログラムからデータベースサーバへ接
続すること、SQL文を組み立て、データベースサーバ
で実行させること、データベースサーバが処理した結果
を取り出すこと、及びデータベースの情報及び処理結果
に関する情報などを取り出すことが可能になる。
A database API (application programming interface) 16 is a connection interface between a database access process (thread) 18 and a database driver manager 14.
As a result, it is possible to connect a program to a database server, assemble an SQL statement and execute it on the database server, retrieve a result processed by the database server, and retrieve information on the database and information on the processing result. Become.

【0013】データベースアクセス管理15は、データ
ベースアクセス処理18の各スレッドからのデータベー
スアクセスを管理、制御して、複数あるかもしれないD
Bアクセス処理18を、このDBアクセス管理15で一
元管理する。データベースに対して同時に要求されるデ
ータベースアクセス処理スレッドの数は、データベース
専用ドライバ12によって決定される最大接続数と、シ
ステム全体のスペックによって決定される最大接続数と
の少ない方の数に設定された最大接続数以下に管理さ
れ、かつ制御される。この最大接続数を超える処理の要
求は、キュー管理されて、所定数以下となるまで待ち合
わされる。
The database access management 15 manages and controls database access from each thread of the database access processing 18, and there may be a plurality of Ds.
The B access processing 18 is centrally managed by the DB access management 15. The number of database access processing threads requested simultaneously for the database was set to the smaller of the maximum number of connections determined by the database dedicated driver 12 and the maximum number of connections determined by the specifications of the entire system. It is managed and controlled below the maximum number of connections. Requests for processing exceeding the maximum number of connections are queue-managed and waited until the number of requests falls below a predetermined number.

【0014】このデータベースアクセス管理15の詳細
は、その動作を示す図2のフロー図を参照してさらに詳
細に例示に基づき説明する。図2において、その左側の
DBアクセス管理、及び右側のDBアクセス処理は、そ
れぞれ図1のDBアクセス管理15及びDBアクセス処
理18に対応している。
The details of the database access management 15 will be described in further detail with reference to a flowchart of FIG. 2, the DB access management on the left side and the DB access processing on the right side correspond to the DB access management 15 and the DB access processing 18 in FIG. 1, respectively.

【0015】DBアクセス管理のフローを開始すると、
ステップST1 において、DB専用ドライバ12からデー
タベース10へのドライバの最大接続数を取得する。ス
テップST2 において、サーバ環境を管理するファイルで
あり、そして、例えば、システム全体のスペックに応じ
て、データベースへの同時最大接続数の定義がある「サ
ーバ環境ファイル」より、データベース10への最大接
続数を取得する。ステップST3 においては、ステップST
1 においてDB専用ドライバ12から取得したデータベ
ース10への最大接続数と、ステップST2 においてサー
バ環境ファイルより取得したデータベース10への最大
接続数より、管理する最大接続数を設定する。即ち、両
者の内の小さい方の最大接続数を設定する。
When the DB access management flow starts,
In step ST1, the maximum connection number of the driver from the DB dedicated driver 12 to the database 10 is obtained. In step ST2, the file is a file for managing the server environment. For example, according to the specifications of the entire system, the maximum number of connections to the database 10 can be obtained from a "server environment file" that defines the maximum number of simultaneous connections to the database. To get. In step ST3, step ST
The maximum number of connections to be managed is set based on the maximum number of connections to the database 10 obtained from the DB dedicated driver 12 in step 1 and the maximum number of connections to the database 10 obtained from the server environment file in step ST2. That is, the smaller maximum number of connections is set.

【0016】ステップST4 において、データ参照(取
得)、更新、削除等のDBアクセス処理スレッド側から
の依頼があれば、DBアクセスキューに登録する。ステ
ップST5 において、キュー登録されたデータベースアク
セス数が、ステップST3 で設定された最大接続数以下か
どうかのチェックを行い、ステップST6 において、最大
接続数をオーバーしているならば、待ち合わせに入るた
めにステップST5 に戻り、そうでなければ、ステップST
7 において、接続数をカウントアップする。即ち、DB
アクセス処理スレッドは、正常に受け付けられたことを
意味している。
At step ST4, if there is a request from the DB access processing thread side for data reference (acquisition), update, deletion, etc., it is registered in the DB access queue. In step ST5, it is checked whether or not the number of database accesses registered in the queue is less than the maximum number of connections set in step ST3. Return to step ST5, if not, step ST
In step 7, the number of connections is counted up. That is, DB
The access processing thread means that it has been accepted normally.

【0017】その後、ステップST8 において、DBアク
セス処理を実行する。即ち、データベースに接続して、
データベースアクセス言語であるSQLを実行する。そ
して、ステップST9 において、DBアクセス処理の終了
に伴い、接続数をカウントダウンし、また、ステップST
10において、DBアクセスキューを削除する。そして、
DBアクセス処理スレッドの内容に応じて、例えば、デ
ータ参照であったならば、その結果をDBアクセス処理
スレッドにデータ転送し、また、例えば、更新、削除で
あったならば、成功的に終了したという結果をデータ転
送する。
Thereafter, in step ST8, a DB access process is executed. That is, connect to the database,
Executes SQL which is a database access language. Then, in step ST9, with the end of the DB access processing, the number of connections is counted down.
At 10, the DB access queue is deleted. And
According to the contents of the DB access processing thread, for example, if the data is a data reference, the result is transferred to the DB access processing thread. Is transferred.

【0018】[0018]

【発明の効果】本発明は、データベースへの接続数を管
理しているため、各DB専用ドライバ毎のドライバに応
じた最大接続数まで制御できるという効果がある。
According to the present invention, since the number of connections to the database is managed, there is an effect that the maximum number of connections can be controlled according to the driver for each DB-dedicated driver.

【0019】また、本発明は、DB専用ドライバがマル
チスレッド対応でなく、シングルスレッド対応であって
も問題なく使用可能である。
Further, the present invention can be used without any problem even if the DB-dedicated driver is not multi-thread compatible but single-thread compatible.

【0020】さらに、本発明は、データベースへのアク
セスをキュー管理しているため、効率よく制御すること
ができ、全体のパフォーマンスが向上するという効果が
ある。
Further, according to the present invention, since the access to the database is queue-managed, it is possible to efficiently control the access and to improve the overall performance.

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

【図1】本発明のデータベースアクセス構成を例示する
ための図である。
FIG. 1 is a diagram for illustrating a database access configuration of the present invention.

【図2】図1に例示したデータベースアクセス管理の詳
細な動作を示すフロー図である。
FIG. 2 is a flowchart showing a detailed operation of the database access management illustrated in FIG. 1;

【図3】従来技術のデータベースアクセスを示す図であ
る。
FIG. 3 is a diagram showing database access according to the prior art.

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

10 データベース 12 データベース専用ドライバ 14 データベースドライバマネージャ 15 データベースアクセス管理 16 データベース API 18 データベースアクセス処理 10 Database 12 Database dedicated driver 14 Database driver manager 15 Database access management 16 Database API 18 Database access processing

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B075 KK02 KK42 5B085 AC03 BG06  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5B075 KK02 KK42 5B085 AC03 BG06

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】データベースと、該データベースに対して
アクセス制御を行うデータベースドライバと、該データ
ベースドライバを管理して前記データベースへの接続を
行うためのデータベースドライバマネージャと、データ
ベースアクセス処理と前記データベースドライバマネー
ジャとの接続インターフェースであるデータベースアプ
リケーションプログラミングインターフェースとから成
るデータベースアクセス制御システムにおいて、 前記データベースドライバ或いはシステム全体のスペッ
クによって決定される最大接続数を設定する手段と、 データベースアクセス処理の各スレッドからのデータベ
ースアクセスを一元的に管理かつ制御して、同時に要求
されるデータベースアクセス処理スレッドの数を前記設
定された最大接続数以下に管理するデータベースアクセ
ス管理手段とを、 備えたことを特徴とするデータベースアクセス制御シス
テム。
1. A database, a database driver for controlling access to the database, a database driver manager for managing the database driver and connecting to the database, a database access process, and the database driver manager A database access control system comprising: a database application programming interface that is a connection interface with the database driver; a means for setting a maximum number of connections determined by specifications of the database driver or the entire system; and database access from each thread of the database access processing. Centrally manages and controls the number of concurrently required database access processing threads to be less than the set maximum number of connections Database access control system characterized by the database access management means for managing, with the.
【請求項2】データベースと、該データベースに対して
アクセス制御を行うデータベースドライバと、該データ
ベースドライバを管理して前記データベースへの接続を
行うためのデータベースドライバマネージャと、データ
ベースアクセス処理と前記データベースドライバマネー
ジャとの接続インターフェースであるデータベースアプ
リケーションプログラミングインターフェースとを備え
て、データベースへのアクセスを制御するデータベース
アクセス制御方法において、 前記データベースドライバ或いはシステム全体のスペッ
クによって決定される最大接続数を設定し、 データベースアクセス処理の各スレッドからのデータベ
ースアクセスを一元的に管理かつ制御して、同時に要求
されるデータベースアクセス処理スレッドの数を前記設
定された最大接続数以下に管理する、 ことを特徴とするデータベースアクセス制御方法。
2. A database, a database driver for controlling access to the database, a database driver manager for managing the database driver and connecting to the database, a database access process, and the database driver manager A database application programming interface which is a connection interface with the database access control method for controlling access to a database, comprising: setting a maximum number of connections determined by specifications of the database driver or the entire system; Centrally manages and controls database access from each thread, and reduces the number of simultaneously required database access processing threads Manage below the maximum number of connections constant been, database access control method characterized by.
JP11061091A 1999-03-09 1999-03-09 System and method for data base access control Pending JP2000259561A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11061091A JP2000259561A (en) 1999-03-09 1999-03-09 System and method for data base access control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11061091A JP2000259561A (en) 1999-03-09 1999-03-09 System and method for data base access control

Publications (1)

Publication Number Publication Date
JP2000259561A true JP2000259561A (en) 2000-09-22

Family

ID=13161076

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11061091A Pending JP2000259561A (en) 1999-03-09 1999-03-09 System and method for data base access control

Country Status (1)

Country Link
JP (1) JP2000259561A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021038797A1 (en) * 2019-08-29 2021-03-04 三菱電機株式会社 Retrieval device, retrieval method, and retrieval program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021038797A1 (en) * 2019-08-29 2021-03-04 三菱電機株式会社 Retrieval device, retrieval method, and retrieval program

Similar Documents

Publication Publication Date Title
US7437725B1 (en) Processing techniques for servers handling client/server traffic and communications
US6385701B1 (en) Method, system and program products for sharing data between varied clients using token management
US7526479B2 (en) Configuration manager in enterprise computing system
JP2533266B2 (en) Locking method of data resource in shared data system and data lock management method between systems
US20040236726A1 (en) System and method for query result caching
US5953719A (en) Heterogeneous database system with dynamic commit procedure control
US7774319B2 (en) System and method for an optimistic database access
US20070294266A1 (en) Management of time-variant data schemas in data warehouses
US20050055351A1 (en) Apparatus and methods for transferring database objects into and out of database systems
US9699025B2 (en) System and method for managing multiple server node clusters using a hierarchical configuration data structure
JPH1063523A (en) Method and device for controlling activation of server in multithread environment
CN110532106B (en) Inter-process communication method, device, equipment and storage medium
JP7039765B2 (en) Version-based table lock
US10318520B2 (en) System and method for reducing communications overhead in a distributed transactions environment by modifying implementation of the transaction end function
US8036076B2 (en) Method of reducing storage power consumption by use of prefetch and computer system using the same
US7181491B2 (en) Intelligent data pool management engine
JP2000259561A (en) System and method for data base access control
CN111225007B (en) Database connection method, device and system
EP1492028B1 (en) Access to shared disk device on storage area network
JP4303828B2 (en) Print management system and method
JP2001075854A (en) Method and system for data management, and storage medium with data management program stored therein
CN112925807A (en) Database-oriented request batch processing method, device, equipment and storage medium
US7562361B2 (en) Thread-based limitation on computer application
JP3738701B2 (en) System setting method in transaction processing system
US20040117782A1 (en) Construction method of external links for software execution environment