JP2001005704A - System and method for database access and storage medium - Google Patents

System and method for database access and storage medium

Info

Publication number
JP2001005704A
JP2001005704A JP11172028A JP17202899A JP2001005704A JP 2001005704 A JP2001005704 A JP 2001005704A JP 11172028 A JP11172028 A JP 11172028A JP 17202899 A JP17202899 A JP 17202899A JP 2001005704 A JP2001005704 A JP 2001005704A
Authority
JP
Japan
Prior art keywords
stored procedure
database
application
virtual table
management system
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.)
Granted
Application number
JP11172028A
Other languages
Japanese (ja)
Other versions
JP3626632B2 (en
Inventor
Sunao Kodera
直 小寺
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.)
NEC Solution Innovators Ltd
Original Assignee
NEC Software Chubu 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 NEC Software Chubu Ltd filed Critical NEC Software Chubu Ltd
Priority to JP17202899A priority Critical patent/JP3626632B2/en
Publication of JP2001005704A publication Critical patent/JP2001005704A/en
Application granted granted Critical
Publication of JP3626632B2 publication Critical patent/JP3626632B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To increase the efficiency of data access and to simplify a program by generating a data table of unique keys permitting direct access to data that an application requires on a database. SOLUTION: A database management system 5 controls and accesses the database 4 stored with data. A stored procedure executing means 6 executes a stored procedure registered in the database management system 5 and generates the data table of unique keys defined in the stored procedure. A database access request means 7 requests the database management system 5 to access the database 4 by using the data table of unique keys as the execution result of the stored procedure executing means 6 and receives the request result from the database management system 5.

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 method, method, and storage medium for accessing a database using a database management system, and more particularly to accessing a database using a stored procedure registered in the database management system. The present invention relates to a database access method, a method, and a storage medium.

【0002】[0002]

【従来の技術】データーベース管理システムの一つであ
る関係データベース管理システム(以下、RDBMSと
略称する)では、関係データベース(以下、RDBと略
称する)を表形式で管理している。表には、実際にデー
タが格納されている実表とデータは保存されず実行時に
元になる実表のデータから生成される仮想表(ビューと
も称す)がある。アプリケーションは表を参照するSQ
L言語を用いてRDBMSを介してRDB上の必要なデ
ータを取得する。
2. Description of the Related Art In a relational database management system (hereinafter abbreviated as RDBMS), which is one of database management systems, a relational database (hereinafter abbreviated as RDB) is managed in a table format. The table includes a base table in which data is actually stored and a virtual table (also called a view) generated from data of the base table which is not stored but is executed at the time of execution. Application refers to table SQ
The required data on the RDB is acquired via the RDBMS using the L language.

【0003】クライアント/サーバシステム(以下、C
/Sシステムと略称する)においては、サーバにRDB
を接続してRDBMSを備え、クライアント側に存在す
るアプリケーションがSQL言語を用いてRDBMSに
対してRDBアクセス要求を行い、RDBMSからアク
セス結果を貰う形態になっている。
A client / server system (hereinafter C)
/ S system), the server has an RDB
Is connected, and an RDBMS is provided, and an application existing on the client side makes an RDB access request to the RDBMS using the SQL language, and receives an access result from the RDBMS.

【0004】すなわち、クライアントのアプリケーショ
ンが必要なデータを検索する場合、アプリケーションは
SQL言語の書式にあわせた検索条件式をサーバのRD
BMSに発行し、RDBMSがRDBのデータを検索し
て与えられた検索条件に合致するデータを選択し、クラ
イアントのアプリケーションに検索結果を返す。このと
き、RDBMSにおいて、検索用インデックスの作成な
どの高速アクセス技法が使用される。
That is, when a client application searches for necessary data, the application uses a search condition expression conforming to the SQL language format to the RD of the server.
The data is issued to the BMS, the RDBMS searches the data in the RDB, selects data that matches the given search condition, and returns the search result to the client application. At this time, in the RDBMS, a high-speed access technique such as creation of a search index is used.

【0005】しかし、RDBMSで作成されるインデッ
クスがアプリケーションに最適な形で作成されるとは限
らない。
However, an index created by an RDBMS is not always created in a form that is optimal for an application.

【0006】例えば、図10(a),(b)に示すよう
な実表Aと実表Bから成るRDBにおいて、商品ごとに
最新の値段を求めるアプリケーションについて考えてみ
る。
For example, in an RDB composed of a base table A and a base table B as shown in FIGS. 10A and 10B, consider an application for finding the latest price for each product.

【0007】アプリケーションは、以下の処理を行う。 (1)実表Bにおいて、同一商品番号の中で日付時刻が
最新のものを含む行を選択する。 (2)実表Aと上記(1)の結果を、それぞれの商品番
号で関係づける。 (3)上記(2)の関係づけにより、商品番号と商品名
称と値段から成る表を生成する。 (4)上記(3)の結果である表にアクセスして、商品
番号と商品名称と値段のデータを取得する。
The application performs the following processing. (1) In the base table B, a row including the latest product with the latest date and time among the same product numbers is selected. (2) The base table A and the result of the above (1) are related by respective product numbers. (3) A table including a product number, a product name, and a price is generated based on the association in (2). (4) Accessing the table resulting from the above (3), and acquiring data of the product number, the product name, and the price.

【0008】この場合、RDBMSにおいて日付時刻の
インデックスは作成されるが、同一商品番号の中で日付
時刻が最新のものに対するインデックスは作成されな
い。このため、アプリケーションは同一商品番号の中で
日付時刻が最新のものを選択するための処理手続を、上
記(1)において記述しなければならない。このよう
に、RDBMSが作成するインデックスは個々のアプリ
ケーションに最適なものではない。
[0008] In this case, an index of the date and time is created in the RDBMS, but an index for the latest product with the same date and time is not created. For this reason, the application must describe in (1) the processing procedure for selecting the latest product with the latest date and time among the same product numbers. Thus, the indexes created by the RDBMS are not optimal for individual applications.

【0009】また、上記のアプリケーション処理は各ク
ライアントで実行されるので、各クライアントからの要
求情報とサーバからの結果情報が、ネットワークを介し
てサーバとクライアント間で頻繁に行き交うことにな
る。
Further, since the above-described application processing is executed by each client, request information from each client and result information from the server frequently flow between the server and the client via the network.

【0010】[0010]

【発明が解決しようとする課題】上述した従来の技術で
は、RDBMSで作成されるインデックスはデータ項目
の単純なインデックスであり、アプリケーション側で特
に必要とするデータがインデックス形式にならずアプリ
ケーションの作成が煩雑になるという問題点がある。ま
た、そのために、RDBMSとアプリケーションとの間
のトラフィックが高まるという問題点もある。
In the conventional technique described above, the index created by the RDBMS is a simple index of a data item, and the data particularly required on the application side is not in the index format, and the creation of the application is difficult. There is a problem that it becomes complicated. In addition, there is also a problem that traffic between the RDBMS and the application increases.

【0011】本発明の目的は、RDBMSに登録された
ストアドプロシージャを用いて、アプリケーションごと
に必要なインデックスを作成し、アプリケーション作成
を簡易化し、システム全体の性能を向上させる手段を提
供することにある。
An object of the present invention is to provide means for creating a necessary index for each application by using a stored procedure registered in an RDBMS, simplifying application creation, and improving the performance of the entire system. .

【0012】[0012]

【課題を解決するための手段】本願第1の発明のデータ
ーベースアクセス方式は、データを記憶蓄積するデータ
ベースと、データベースアクセス要求手段からの要求を
受け付け前記データベースにアクセスしアクセス結果を
前記データベースアクセス要求手段に返すデータベース
管理システムと、前記データベース管理システムに含ま
れストアドプロシージャを実行しストアドプロシージャ
に定義された一意キーの表を作成するストアドプロシー
ジャ実行手段と、前記ストアドプロシージャ実行手段が
作成した一意キーの表を参照して前記データベースにア
クセスする要求を前記データベース管理システムに行う
データベースアクセス要求手段と、を備える。
According to a first aspect of the present invention, there is provided a database access system which stores a database for storing data, receives a request from a database access requesting unit, accesses the database, and sends an access result to the database access request. Means for executing a stored procedure included in the database management system, creating a table of unique keys defined in the stored procedure, and a unique key created by the stored procedure execution means. A database access request unit for making a request to the database management system to access the database with reference to a table.

【0013】本願第2の発明のデーターベースアクセス
方式は、サーバとクライアントがネットワークを介して
接続されるクライアントサーバシステムにおいて、前記
サーバは、データを記憶蓄積し1つ以上の実表から成る
関係データベースと、アプリケーションから要求された
処理に基づき前記関係データベースをアクセスし処理結
果を前記アプリケーションに返す関係データベース管理
システムと、前記実表と関係づけた仮想表を定義し一意
キーの表を作成するストアドプロシージャと、前記スト
アドプロシージャを起動するストアドプロシージャ起動
手段とを備え、前記クライアントは、前記ストアドプロ
シージャが定義する仮想表を指定して前記関係データベ
ースにアクセスする要求を前記関係データベース管理シ
ステムに発行し要求結果を前記関係データベース管理シ
ステムから受け取るアプリケーションを備える。
According to a second aspect of the present invention, there is provided a database access method in a client server system in which a server and a client are connected via a network, wherein the server stores and accumulates data and comprises one or more base tables. A relational database management system that accesses the relational database based on processing requested by an application and returns a processing result to the application; and a stored procedure that defines a virtual table associated with the base table and creates a table of a unique key. And a stored procedure starting means for starting the stored procedure, wherein the client issues a request for accessing the relational database by designating a virtual table defined by the stored procedure to the relational database management system. The results comprises an application received from the relational database management system.

【0014】本願第3の発明のデーターベースアクセス
方式は、第2の発明において前記ストアドプロシージャ
起動手段は、前記ストアドプロシージャが既に起動実行
され且つその後に前記関係データベースの更新がなされ
ていない場合には前記ストアドプロシージャを起動しな
いことを特徴とする。
The database access method according to a third aspect of the present invention is the database access method according to the second aspect, wherein the stored procedure starting means is configured to execute the stored procedure when the stored procedure has already been started and thereafter the relational database has not been updated. The stored procedure is not started.

【0015】本願第4の発明のデーターベースアクセス
方式は、第2の発明において前記ストアドプロシージャ
が定義する仮想表は、アプリケーションが前記関係デー
タベースをアクセスするときにインデックスの役目をす
ることを特徴とする。
The database access method according to a fourth aspect of the present invention is characterized in that, in the second aspect, the virtual table defined by the stored procedure functions as an index when an application accesses the relational database. .

【0016】本願第5の発明のデーターベースアクセス
方法は、サーバとクライアントがネットワークを介して
接続されるクライアントサーバシステムにおいてデータ
ーベースにアクセスする方法であって、アプリケーショ
ンは実表とストアドプロシージャで定義されている仮想
表とを関係づけた表を定義して関係データベースに対す
るアクセス要求を関係データベース管理システムに行
い、前記関係データベース管理システムは前記アプリケ
ーションからのアクセス要求を分析し、前記ストアドプ
ロシージャが定義生成する仮想表が指定されているとき
はストアドプロシージャを起動実行してストアドプロシ
ージャに定義された仮想表を生成し、前記仮想表を使用
したアプリケーションのアクセス要求を処理してアプリ
ケーションに処理結果を返し、アプリケーションは関係
データベース管理システムから処理結果を受け取ること
を特徴とする。
A database access method according to a fifth aspect of the present invention is a method for accessing a database in a client server system in which a server and a client are connected via a network, wherein an application is defined by a base table and a stored procedure. A relation table with the virtual table being defined, and make an access request to the relation database to the relation database management system. The relation database management system analyzes the access request from the application, and the stored procedure generates the definition. When a virtual table is specified, the stored procedure is started and executed to generate a virtual table defined in the stored procedure, and an access request of an application using the virtual table is processed and processed by the application. The return, the application is characterized by receiving a processing result from the relational database management system.

【0017】本願第6の発明のデーターベースアクセス
方法は、第5の発明において前記ストアドプロシージャ
は基本データの実表とその履歴を保持する2つ以上の実
表とから最新の履歴の一意キーから成る仮想表を生成す
る処理であることを特徴とする。
According to a sixth aspect of the present invention, in the database access method according to the fifth aspect, the stored procedure uses a latest history unique key from a base table of basic data and two or more base tables holding its history. This is a process for generating a virtual table consisting of:

【0018】本願第7の発明の記録媒体は、アプリケー
ションが実表とストアドプロシージャで定義されている
仮想表とを関係づけた表を定義して関係データベースに
対するアクセス要求を関係データベース管理システムに
行うアクセス要求処理と、前記関係データベース管理シ
ステムが前記アプリケーションからのアクセス要求を分
析し、前記ストアドプロシージャが定義生成する仮想表
が指定されているときは前記ストアドプロシージャを起
動するストアドプロシージャ起動処理と、前記ストアド
プロシージャを実行してストアドプロシージャに定義さ
れた仮想表を生成する仮想表生成処理と、前記仮想表を
使用したアプリケーションのアクセス要求を処理してア
プリケーションに処理結果を返すアクセス処理と、アプ
リケーションが前記関係データベース管理システムから
処理結果を受け取るデータ受取処理と、をコンピュータ
に実行させるためのプログラムを記録したことを特徴と
する。
According to a seventh aspect of the present invention, there is provided a recording medium in which an application defines a table in which a base table and a virtual table defined by a stored procedure are associated with each other and issues an access request to a relational database to a relational database management system. Request processing, the relational database management system analyzes an access request from the application, and a stored procedure start processing for starting the stored procedure when a virtual table defined and generated by the stored procedure is specified; A virtual table generation process for executing a procedure to generate a virtual table defined in a stored procedure; an access process for processing an application access request using the virtual table and returning a processing result to the application; And characterized by recording a program for executing a data receiving processing of receiving a processing result from the relational database management system, to a computer.

【0019】[0019]

【発明の実施の形態】本発明のデータベースアクセス方
式について、図1を参照して説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A database access method according to the present invention will be described with reference to FIG.

【0020】図1を参照すると、本発明のデータベース
アクセス方式は、データベース4とデータベース管理シ
ステム5とストアドプロシージャ実行手段6とデータベ
ースアクセス要求手段7から構成されている。
Referring to FIG. 1, the database access method of the present invention comprises a database 4, a database management system 5, a stored procedure execution means 6, and a database access request means 7.

【0021】データベース4は、データを記憶蓄積する
データベースである。
The database 4 is a database for storing data.

【0022】データベース管理システム5は、データベ
ース4を管理し、データベースアクセス要求手段7から
の要求に基づきデータベース4にアクセスしてアクセス
結果をデータベースアクセス要求手段7に返す。
The database management system 5 manages the database 4, accesses the database 4 based on a request from the database access request unit 7, and returns an access result to the database access request unit 7.

【0023】ストアドプロシージャ実行手段6は、デー
タベース管理システム5に登録されたストアドプロシー
ジャを実行する。ストアドプロシージャは、データベー
スアクセス要求手段7が使用する一意キーの表(インデ
ックス)を作成する処理を含んでいる。
The stored procedure execution means 6 executes a stored procedure registered in the database management system 5. The stored procedure includes a process of creating a table (index) of a unique key used by the database access request unit 7.

【0024】データベースアクセス要求手段7は、スト
アドプロシージャ実行手段6を実行させ実行結果を利用
してデータベース4にアクセスすることをデータベース
管理システム5に要求し要求結果をデータベース管理シ
ステム5から受け取る。
The database access request unit 7 requests the database management system 5 to execute the stored procedure execution unit 6 and access the database 4 using the execution result, and receives the request result from the database management system 5.

【0025】本発明の動作について説明する。なお、デ
ータベースアクセス要求手段7が利用するストアドプロ
シージャは、あらかじめ公知の方法で、データベース管
理システム5に登録されているものとする。
The operation of the present invention will be described. The stored procedure used by the database access request unit 7 is assumed to be registered in the database management system 5 in a known manner in advance.

【0026】まず、データベースアクセス要求手段7は
ストアドプロシージャが作成する一意キーの表(インデ
ックス)を指定してデータベース4に対するアクセス要
求をデータベース管理システム5に送る。
First, the database access request means 7 sends an access request to the database 4 to the database management system 5 by specifying a table (index) of a unique key created by the stored procedure.

【0027】データベース管理システム5はストアドプ
ロシージャ実行手段6を用いて指定されたストアドプロ
シージャを実行してデータベースアクセス要求手段7が
使用する一意キーの表(インデックス)を作成した後に
指定されたアクセス要求処理を行い、処理結果をデータ
ベースアクセス要求手段7に返す。
The database management system 5 executes the specified stored procedure by using the stored procedure execution means 6 to create a unique key table (index) used by the database access request means 7 and then executes the specified access request processing. And returns a processing result to the database access requesting means 7.

【0028】データベースアクセス要求手段7はデータ
ベース管理システム5から処理結果を受け取る。
The database access request means 7 receives the processing result from the database management system 5.

【0029】このように、データベース管理システム5
に登録されたストアドプロシージャにおいてデータベー
スアクセス要求手段7が使用する一意キーの表(インデ
ックス)を作成することにより、データベースアクセス
要求手段7は求めるデータを高速にデータベース4から
取得することができる。
As described above, the database management system 5
By creating a table (index) of the unique key used by the database access requesting means 7 in the stored procedure registered in the database 4, the database access requesting means 7 can obtain the required data from the database 4 at high speed.

【0030】本発明のデータベースアクセス方式を適用
した本発明の実施の形態について説明する。
An embodiment of the present invention to which the database access method of the present invention is applied will be described.

【0031】本発明の第1の実施の形態について、図面
を参照して詳細に説明する。第1の実施の形態は、2つ
の実表から成る商品の最新値段を管理しているRDBを
検索して商品の最新値段を取得して処理するシステムに
関するものである。
The first embodiment of the present invention will be described in detail with reference to the drawings. The first embodiment relates to a system that searches an RDB that manages the latest price of a product composed of two base tables to acquire and process the latest price of the product.

【0032】図2は、第1の実施の形態の構成を示す図
である。
FIG. 2 is a diagram showing the configuration of the first embodiment.

【0033】図2を参照すると、第1の実施の形態は、
サーバ1とクライアント2がネットワーク3で接続され
ている。サーバ1は、RDB11を接続し、RDBMS
12を備えている。RDBMS12はストアドプロシー
ジャ13とストアドプロシージャ起動手段14とを含
む。クライアント2は、アプリケーション21を含む。
Referring to FIG. 2, the first embodiment is similar to the first embodiment.
A server 1 and a client 2 are connected by a network 3. The server 1 connects the RDB 11 and the RDBMS
12 are provided. The RDBMS 12 includes a stored procedure 13 and a stored procedure starting unit 14. The client 2 includes an application 21.

【0034】RDB11は、データを記憶蓄積する関係
データベースで、実表A111と実表B112とから成
っている。実表A111は基本データであり、実表B1
12は基本データの履歴を保持するものである。
The RDB 11 is a relational database for storing data and is composed of a base table A111 and a base table B112. Base table A111 is the basic data and base table B1
Numeral 12 holds the history of the basic data.

【0035】実表A111は、RDB11を構成してい
る表の一つである。実表A111の構成を図3(a)に
示す。実表A111は商品番号と商品名称とから成り、
各行は主キーである商品番号により一意に区別される。
The real table A111 is one of the tables constituting the RDB 11. FIG. 3A shows the configuration of the base table A111. The base table A111 includes a product number and a product name,
Each line is uniquely distinguished by the product number which is the primary key.

【0036】実表B112は、RDB11を構成してい
る表の一つである。実表B112の構成を図3(b)に
示す。実表B112は商品番号と日付時刻と値段とから
成り、商品の最新の値段を示している。商品の値段が変
更される度に、変更した日付時刻と新しい値段を示す行
が登録される。商品番号は実表A111の商品番号と対
応しており、これにより実表A111と実表B112が
関係づけられる。日付時刻は値段が登録される日付と時
刻であり、同一商品番号内での値段の登録順番を示すも
のである。日付時刻に替えて一連番号でもよい。商品番
号と日付時刻を連結したもの(以下、「商品番号+日付
時刻」と記す)で各行を一意に区別する。
The real table B 112 is one of the tables constituting the RDB 11. FIG. 3B shows the configuration of the base table B112. The base table B112 includes a product number, a date and time, and a price, and indicates the latest price of the product. Each time the price of a product is changed, a line indicating the changed date and time and a new price is registered. The product number corresponds to the product number in the base table A111, whereby the base table A111 and the base table B112 are associated with each other. The date and time is the date and time when the price is registered, and indicates the order of registration of the price within the same product number. A serial number may be used instead of the date and time. Each line is uniquely identified by a concatenation of a product number and a date and time (hereinafter, referred to as “product number + date time”).

【0037】RDBMS12は、RDB11を管理しア
クセスする。アプリケーション21から発行された要求
を処理し、発行された要求に対応する処理結果をアプリ
ケーション21に返す。
The RDBMS 12 manages and accesses the RDB 11. The request issued from the application 21 is processed, and a processing result corresponding to the issued request is returned to the application 21.

【0038】ストアドプロシージャ13は、実表A11
1と実表B112を基に仮想表A131を定義生成して
データセットを選択作成する処理を行う。ストアドプロ
シージャ13は、ストアドプロシージャ起動手段14に
より起動される。仮想表A131の名前は、ストアドプ
ロシージャ13をRDBMS12に登録するときに決定
される。アプリケーション21はこの名前を指定するこ
とで、ストアドプロシージャ13が生成した仮想表A1
31を参照することができる。なお、ストアドプロシー
ジャ13をRDBMS12に登録する方法については、
公知の方法による。
The stored procedure 13 has a base table A11
A virtual table A131 is defined and generated based on the base table 1 and the real table B112, and a data set is selected and created. The stored procedure 13 is started by the stored procedure starting means 14. The name of the virtual table A131 is determined when the stored procedure 13 is registered in the RDBMS 12. By specifying this name, the application 21 specifies the virtual table A1 generated by the stored procedure 13.
31 can be referred to. The method for registering the stored procedure 13 in the RDBMS 12 is as follows.
According to a known method.

【0039】仮想表A131は、最新の履歴の一意キー
から成る仮想表である。実表A111と実表B112を
基にストアドプロシージャ13が定義生成し、実表A1
11の商品番号とそれに対応する実表B112の商品番
号内で最新(最大)の日付時刻とを組み合わせる選択条
件が指定してある。仮想表A131の構成を図3(c)
に示す。仮想表A131は商品番号と日付時刻とから成
り、商品番号は実表A111のは商品番号に、日付時刻
は実表B112の同一商品番号内の最新(最大)の日付
時刻に、それぞれ対応している。仮想表A131は、ア
プリケーション21から見れば、常にRDB11の最新
状態を反映したインデックスの役目をしており、アプリ
ケーション21から参照される。
The virtual table A 131 is a virtual table including the latest history unique key. The stored procedure 13 generates a definition based on the base table A111 and the base table B112, and generates the base table A1.
A selection condition for combining the product number of No. 11 with the latest (maximum) date and time in the product number of the base table B112 corresponding thereto is specified. FIG. 3C shows the configuration of the virtual table A131.
Shown in The virtual table A131 includes a product number and a date and time. The product number corresponds to the product number in the real table A111, and the date and time correspond to the latest (maximum) date and time in the same product number in the real table B112. I have. The virtual table A 131 always serves as an index reflecting the latest state of the RDB 11 from the viewpoint of the application 21, and is referred to by the application 21.

【0040】ストアドプロシージャ起動手段14は、ア
プリケーション21がストアドプロシージャ13が生成
する仮想表A131を使用する要求をRDBMS12に
行った場合に、ストアドプロシージャ13を起動する。
指定されたストアドプロシージャ13が既に起動実行さ
れていて且つその後にRDB11の更新がなされていな
い場合には、ストアドプロシージャ13を起動しない。
この場合、既に実行されたストアドプロシージャ13の
処理結果が使用される。
The stored procedure activating means 14 activates the stored procedure 13 when the application 21 requests the RDBMS 12 to use the virtual table A 131 generated by the stored procedure 13.
If the specified stored procedure 13 has already been started and executed and the RDB 11 has not been updated thereafter, the stored procedure 13 is not started.
In this case, the processing result of the stored procedure 13 already executed is used.

【0041】アプリケーション21は、RDB11の最
新データを取得するために、ストアドプロシージャ13
が定義生成する仮想表A131と関係づけを行った仮想
表B211を定義してアクセス要求をRDBMS12に
発行する。発行した要求に対応する処理結果がRDBM
S12から返され、取得したデータを基にデータ処理を
行う。
The application 21 executes the stored procedure 13 to obtain the latest data of the RDB 11.
Defines the virtual table B211 associated with the virtual table A131 defined and generated, and issues an access request to the RDBMS 12. The processing result corresponding to the issued request is RDBM
Data processing is performed based on the data returned from S12.

【0042】仮想表B211は、仮想表A131と実表
A111と実表B112を基にアプリケーション21が
定義生成する仮想表であり、アプリケーション21が必
要とするデータから成る。仮想表B211の構成を図3
(d)に示す。仮想表B211は商品番号と商品名称と
値段とから成り、商品番号は仮想表A131の商品番号
に対応する実表A111の商品番号に、商品名称は仮想
表A131の商品番号に対応する実表A111の商品名
称に、値段は仮想表A131の「商品番号+日付時刻」
に対応する実表B112の値段に、それぞれ対応してい
る。
The virtual table B211 is a virtual table defined and generated by the application 21 based on the virtual table A131, the real table A111, and the real table B112, and includes data required by the application 21. FIG. 3 shows the configuration of virtual table B211.
(D). The virtual table B211 includes a product number, a product name, and a price. The product number is the product number of the real table A111 corresponding to the product number of the virtual table A131, and the product name is the real table A111 corresponding to the product number of the virtual table A131. And the price is "Product number + date time" in virtual table A131.
Respectively correspond to the prices of the base table B112 corresponding to.

【0043】本発明の第1の実施の形態の動作につい
て、図1〜図5を参照して詳細に説明する。
The operation of the first embodiment of the present invention will be described in detail with reference to FIGS.

【0044】図4は第1の実施の形態の動作を説明する
図で、(a)は実表A111の具体例を、(b)は実表
B112の具体例を、(c)は仮想表A131の具体例
を、(d)は仮想表B211の具体例を、示したもので
ある。(a)と(b)から、商品名称”あああ”の最新
の値段は日付時刻”05261800”に設定された”
190”であることがわかる。図5は第1の実施の形態
の動作の流れを示す図である。
4A and 4B are diagrams for explaining the operation of the first embodiment. FIG. 4A shows a specific example of the real table A111, FIG. 4B shows a specific example of the real table B112, and FIG. (D) shows a specific example of the virtual table B211. From (a) and (b), the latest price of the product name "Oh" is set to the date and time "05261800".
190 ". FIG. 5 is a diagram showing a flow of the operation of the first embodiment.

【0045】図5を参照すると、アプリケーション21
は、実表A111の商品番号と仮想表A131の商品番
号とを関係づけ、実表B112の「商品番号+日付時
刻」と仮想表A131の「商品番号+日付時刻」とを関
係づけ、商品番号と商品名称と値段とから成る仮想表B
211を定義して、RDB11に対するアクセスをRD
BMS12に要求する(ステップA11〜A12)。
Referring to FIG. 5, the application 21
Relates the product number of the real table A111 to the product number of the virtual table A131, correlates the “product number + date time” of the real table B112 with the “product number + date time” of the virtual table A131, Virtual table B consisting of a product name and a price
Define 211 and set access to RDB11 to RD
A request is made to the BMS 12 (steps A11 to A12).

【0046】RDBMS12は、アプリケーション21
からのRDB11に対するアクセス要求を分析し(ステ
ップM11)、ストアドプロシージャ13が定義生成す
る仮想表A131が指定されているときは、ストアドプ
ロシージャ13の起動実行が必要であるか否かを判断
し、ストアドプロシージャ13の起動実行が必要である
ことを認識したときにストアドプロシージャ13を起動
する(ステップM12〜M14)。指定されたストアド
プロシージャ13が既に起動実行されていて且つその後
にRDB11の更新がなされていない場合には、ストア
ドプロシージャ13を起動しない。この場合、既に実行
されたストアドプロシージャ13の処理結果が使用され
る。
The RDBMS 12 is an application 21
Is analyzed (step M11), and when the virtual table A131 defined and generated by the stored procedure 13 is designated, it is determined whether or not the stored procedure 13 needs to be started and executed. When it is recognized that the procedure 13 needs to be activated, the stored procedure 13 is activated (steps M12 to M14). If the specified stored procedure 13 has already been started and executed and the RDB 11 has not been updated thereafter, the stored procedure 13 is not started. In this case, the processing result of the stored procedure 13 already executed is used.

【0047】起動されたストアドプロシージャ13は以
下の処理を実行する。 (1)実表B112の商品番号ごとに、同一商品番号内
で日付時刻が最新のものを含む行を選択する(ステップ
S11)。 (2)実表A111の商品番号と上記(1)の結果の商
品番号とを関係づける(ステップS12)。 (3)実表A111の商品番号と上記(1)の結果の日
付時刻から成る仮想表A131のデータセットを作成す
る(ステップS13)。ストアドプロシージャ13の出
力結果を図4(c)に示す。
The started stored procedure 13 executes the following processing. (1) For each product number in the base table B112, select a row including the latest date and time within the same product number (step S11). (2) The merchandise number in the base table A111 is associated with the merchandise number as a result of the above (1) (step S12). (3) A data set of the virtual table A131 including the product number of the real table A111 and the date and time of the result of the above (1) is created (step S13). The output result of the stored procedure 13 is shown in FIG.

【0048】続いて、RDBMS12は仮想表B211
に基づく処理を行う(ステップM15)。RDBMS1
2の処理結果を図4(d)に示す。
Subsequently, the RDBMS 12 stores the virtual table B 211
(Step M15). RDBMS1
The processing result of No. 2 is shown in FIG.

【0049】その後、RDBMS12は処理結果をアプ
リケーション21に返す(ステップM16)。
After that, the RDBMS 12 returns a processing result to the application 21 (Step M16).

【0050】アプリケーション21は、RDBMS12
から処理結果を受け取り、アプリケーション処理を行う
(ステップA13)。
The application 21 is provided by the RDBMS 12
And performs application processing (step A13).

【0051】このようにして、アプリケーション21
は、ストアドプロシージャ13の出力結果である仮想表
A131をインデックス代わりに使用することにより、
求めているRDB11の最新のデータを高速に得ること
ができる。
In this way, the application 21
By using the virtual table A131, which is the output result of the stored procedure 13, instead of an index,
The latest data of the required RDB 11 can be obtained at high speed.

【0052】次に、本発明の第2の実施の形態 につい
て、図面を参照して詳細に説明する。第2の実施の形態
は、3つの実表から成る製品の障害内容を管理している
RDBを検索して製品の最新の障害内容を取得して処理
するシステムに関するものである。
Next, a second embodiment of the present invention will be described in detail with reference to the drawings. The second embodiment relates to a system that retrieves an RDB that manages the contents of a failure of a product composed of three base tables to acquire and process the latest failure contents of the product.

【0053】図6は、第2の実施の形態の構成を示す図
である。
FIG. 6 is a diagram showing the configuration of the second embodiment.

【0054】図6を参照すると、第2の実施の形態は、
サーバ1とクライアント2がネットワーク3で接続さ
れ、サーバ1はRDB15を接続しストアドプロシージ
ャ17とストアドプロシージャ起動手段14とを含むR
DBMS16を備え、クライアント2はアプリケーショ
ン22を備えて構成され、第1の実施の形態のRDB1
1とRDBMS12とストアドプロシージャ13とアプ
リケーション21とが、RDB15とRDBMS16と
ストアドプロシージャ17とアプリケーション22とに
置換されたものである。
Referring to FIG. 6, the second embodiment is similar to the first embodiment.
The server 1 is connected to the client 2 via the network 3, and the server 1 connects to the RDB 15 and includes a stored procedure 17 and a stored procedure starting unit 14.
The client 2 is provided with the application 16 and the RDB 1 of the first embodiment.
1, RDBMS 12, stored procedure 13, and application 21 are replaced with RDB 15, RDBMS 16, stored procedure 17, and application 22.

【0055】ここでは、第1の実施の形態と異なるRD
B15とRDBMS16とストアドプロシージャ17と
アプリケーション22とについて説明する。
Here, RD different from that of the first embodiment is used.
The B15, the RDBMS 16, the stored procedure 17, and the application 22 will be described.

【0056】RDB15は、データを記憶蓄積する関係
データベースで、実表A151と実表B152と実表C
153とから成っている。実表A151は基本データで
あり、実表B152と実表C153は基本データの履歴
を保持するものである。
The RDB 15 is a relational database for storing and accumulating data, and includes a base table A 151, a base table B 152, and a base table C.
153. The base table A151 is the basic data, and the base table B152 and the base table C153 hold the history of the base data.

【0057】実表A151は、RDB15を構成してい
る表の一つである。実表A151の構成を図7(a)に
示す。実表A151は製品番号と製品名称とから成り、
各行は主キーである製品番号により一意に区別される。
The real table A 151 is one of the tables constituting the RDB 15. FIG. 7A shows the configuration of the base table A151. Base table A151 includes a product number and a product name,
Each row is uniquely identified by the product number which is the primary key.

【0058】実表B152は、RDB15を構成してい
る表の一つである。実表B152の構成を図7(b)に
示す。実表B152は製品番号と枝番Aと受付番号と削
除とから成る。製品番号は実表A151の製品番号と対
応しており、これにより実表B152と実表A151が
関係づけられる。枝番Aは同一製品番号内での受付番号
の順番を示すもので、一連番号でも日付時刻でもよい。
「製品番号+枝番A」で各行を一意に区別する。受付番
号は製品を通して採番される一連番号であり、製品の障
害が受け付けられるごとに受付番号が登録される。障害
の内容は実表C153に登録される。同一製品に対して
新たな障害受付が有った場合には、枝番Aを上げて新た
な受付番号を登録する。削除は、受付番号が一旦受け付
けられた後に削除されたか否かを示すもので、受付番号
が削除された場合に”DEL”と示される。
The real table B 152 is one of the tables constituting the RDB 15. FIG. 7B shows the configuration of the base table B152. The base table 152 includes a product number, a branch number A, a reception number, and a deletion. The product number corresponds to the product number of the base table A151, and thereby the base table 152 and the base table A151 are related. The branch number A indicates the order of the reception number within the same product number, and may be a serial number or a date and time.
Each line is uniquely identified by “product number + branch number A”. The reception number is a serial number assigned throughout the product, and the reception number is registered each time a failure of the product is received. The content of the failure is registered in the base table C153. If there is a new fault reception for the same product, the branch number A is increased and a new reception number is registered. The deletion indicates whether or not the reception number has been once received and then deleted. When the reception number has been deleted, “DEL” is indicated.

【0059】実表C153は、RDB15を構成してい
る表の一つである。実表C153の構成を図7(c)に
示す。実表C153は製品番号と枝番Aと枝番Bと障害
内容とから成る。「製品番号+枝番A」は実表B152
の「製品番号+枝番A」と対応しており、これにより実
表C153と実表B152が関係づけられる。枝番Bは
同一「製品番号+枝番A」内での障害内容の順番を示す
もので、一連番号でも日付時刻でもよい。「製品番号+
枝番A+枝番B」で各行を一意に区別する。障害内容に
は、受付番号に対応した障害内容が登録される。受け付
けた受付番号についての障害内容が更新される場合に
は、枝番Bを上げて更新された障害内容を登録し別のデ
ータとして履歴管理を行う。
The real table C 153 is one of the tables constituting the RDB 15. FIG. 7C shows the configuration of the base table C153. The base table C153 includes a product number, a branch number A, a branch number B, and a failure content. "Product number + branch number A" is base table B152
"Product number + branch number A", thereby associating the base table C153 with the base table B152. The branch number B indicates the order of the failure contents within the same “product number + branch number A”, and may be a serial number or a date and time. "Product number +
Each row is uniquely distinguished by “branch number A + branch number B”. In the trouble content, the trouble content corresponding to the reception number is registered. When the failure content for the received receipt number is updated, the updated failure content is registered by increasing the branch number B, and history management is performed as separate data.

【0060】RDBMS16は、RDB15を管理しア
クセスする。アプリケーション22から発行された要求
を処理し、発行された要求に対応する処理結果をアプリ
ケーション22に返す。
The RDBMS 16 manages and accesses the RDB 15. A request issued from the application 22 is processed, and a processing result corresponding to the issued request is returned to the application 22.

【0061】ストアドプロシージャ17は、実表A15
1と実表B152と実表C153とを基に仮想表A17
1を定義生成してデータセットを選択作成する処理を行
う。ストアドプロシージャ17は、ストアドプロシージ
ャ起動手段14により起動される。仮想表A171の名
前は、ストアドプロシージャ17をRDBMS16に登
録するときに決定される。アプリケーション22はこの
名前を指定することで、ストアドプロシージャ17が生
成した仮想表A171を参照することができる。なお、
ストアドプロシージャ17をRDBMS16に登録する
方法については、公知の方法による。
The stored procedure 17 has a base table A15
1, a virtual table A17 based on the real table B152 and the real table C153.
1 is defined and a data set is selected and created. The stored procedure 17 is activated by the stored procedure activation means 14. The name of the virtual table A 171 is determined when the stored procedure 17 is registered in the RDBMS 16. By specifying this name, the application 22 can refer to the virtual table A 171 generated by the stored procedure 17. In addition,
A method for registering the stored procedure 17 in the RDBMS 16 is based on a known method.

【0062】仮想表A171は、最新の履歴の一意キー
から成る仮想表である。実表A151と実表B152と
実表C153とを基にストアドプロシージャ17が定義
生成し、実表A151の製品番号,実表B152の同一
製品番号内で最大の枝番Aおよび実表C153の同一
「製品番号+枝番A」内で最大の枝番Bとを組み合わせ
る選択条件を指定してある。仮想表A171の構成を図
7(c)に示す。仮想表A171は製品番号と枝番Aと
枝番Bとから成り、製品番号は実表A151の製品番号
に,枝番Aは実表B152の同一製品番号内で最大の枝
番Aに、枝番Bは実表C153の同一「製品番号+枝番
A」内で最大の枝番Bに、それぞれ対応している。仮想
表A171は、アプリケーション22から見れば、常に
RDB15の最新状態を反映したインデックスの役目を
しており、アプリケーション22から参照される。
The virtual table A 171 is a virtual table including the latest history unique key. The stored procedure 17 generates a definition based on the base table A151, the base table B152, and the base table C153, and generates the largest branch number A and the same base table C153 in the product number of the base table A151 and the same product number of the base table B152. The selection condition for combining with the largest branch number B in “product number + branch number A” is specified. FIG. 7C shows the configuration of the virtual table A171. The virtual table A171 includes a product number, a branch number A, and a branch number B. The product number corresponds to the product number of the base table A151, the branch number A corresponds to the largest branch number A in the same product number of the base table B152, and the branch number. The number B corresponds to the largest branch number B in the same “product number + branch number A” of the base table C153. The virtual table A 171 always serves as an index reflecting the latest state of the RDB 15 from the viewpoint of the application 22, and is referred to by the application 22.

【0063】アプリケーション22は、RDB15の最
新データを取得するために、ストアドプロシージャ17
が定義生成する仮想表A171と関係づけを行った仮想
表B221を定義してアクセス要求をRDBMS16に
発行する。発行した要求に対応する処理結果がRDBM
S16から返され、取得したデータを基にデータ処理を
行う。
The application 22 executes the stored procedure 17 to obtain the latest data of the RDB 15.
Defines a virtual table B 221 associated with the virtual table A 171 defined and generated, and issues an access request to the RDBMS 16. The processing result corresponding to the issued request is RDBM
Data processing is performed based on the data returned from S16 and acquired.

【0064】仮想表B221は、仮想表A171と実表
A151と実表B152と実表C153を基にアプリケ
ーション22が定義生成する仮想表であり、アプリケー
ション22が必要とするデータから成る。仮想表B22
1の構成を図7(d)に示す。仮想表B221は製品番
号と製品名称と受付番号と障害内容とから成り、製品番
号は仮想表A171の製品番号に対応する実表A151
の製品番号に、製品名称は仮想表A171の製品番号に
対応する実表A151の製品名称に、受付番号は仮想表
A171の「製品番号+枝番A」に対応する実表B15
2の受付番号に、障害内容は仮想表A171の「製品番
号+枝番A+枝番B」に対応する実表C153の障害内
容に、それぞれ対応している。
The virtual table B 221 is a virtual table defined and generated by the application 22 based on the virtual table A 171, the real table A 151, the real table B 152 and the real table C 153, and includes data required by the application 22. Virtual table B22
7 is shown in FIG. 7 (d). The virtual table B 221 includes a product number, a product name, a reception number, and a failure content, and the product number is a real table A 151 corresponding to the product number of the virtual table A 171.
, The product name is the product name of the base table A151 corresponding to the product number of the virtual table A171, and the reception number is the base table B15 corresponding to “product number + branch number A” of the virtual table A171.
2, and the failure content corresponds to the failure content of the real table C153 corresponding to "product number + branch number A + branch number B" of the virtual table A171.

【0065】本発明の第2の実施の形態の動作につい
て、図6〜図9を参照して詳細に説明する。
The operation of the second embodiment of the present invention will be described in detail with reference to FIGS.

【0066】図8は第2の実施の形態の動作を説明する
図で、(a)は実表A151の具体例を、(b)は実表
B152の具体例を、(c)は実表C153の具体例
を、(d)は仮想表A171の具体例を、(e)は仮想
表B221の具体例を、示したものである。(b)にお
いて、受付番号”002”および”003”は、一旦受
け付けられたがその後削除されたので、削除に”DE
L”と示されている。図9は第2の実施の形態の動作の
流れを示す図である。
FIGS. 8A and 8B are diagrams for explaining the operation of the second embodiment. FIG. 8A shows a specific example of the base table A151, FIG. 8B shows a specific example of the base table B152, and FIG. C153 shows a specific example, (d) shows a specific example of the virtual table A171, and (e) shows a specific example of the virtual table B221. In (b), the reception numbers “002” and “003” were once received but were subsequently deleted, so “DE” was deleted.
L ". FIG. 9 is a diagram showing the flow of the operation of the second embodiment.

【0067】図9を参照すると、アプリケーション22
は、実表A151の製品番号と仮想表A171の製品番
号とを関係づけ、実表B152の「製品番号+枝番A」
と仮想表A171の「製品番号+枝番A」とを関係づ
け、実表C153の「製品番号+枝番A+枝番B」と仮
想表A171の「製品番号+枝番A+枝番B」とを関係
づけ、製品番号と製品名称と受付番号と障害内容とから
成る仮想表B221を定義して、RDB15に対するア
クセスをRDBMS16に要求する(ステップA21〜
A22)。
Referring to FIG. 9, the application 22
Associates the product number of the real table A151 with the product number of the virtual table A171, and “product number + branch number A” of the real table B152.
And the “product number + branch number A” of the virtual table A171, and the “product number + branch number A + branch number B” of the real table C153 and the “product number + branch number A + branch number B” of the virtual table A171. Are defined, a virtual table B221 including a product number, a product name, a reception number, and a failure content is defined, and an access to the RDB 15 is requested to the RDBMS 16 (steps A21 to A21).
A22).

【0068】RDBMS16は、アプリケーション22
からのRDB15に対するアクセス要求を分析し(ステ
ップM21)、ストアドプロシージャ17が定義生成す
る仮想表A171が指定されているときは、ストアドプ
ロシージャ17の起動実行が必要であるか否かを判断
し、ストアドプロシージャ17の起動実行が必要である
ことを認識したときにストアドプロシージャ17を起動
する(ステップM22〜M24)。指定されたストアド
プロシージャ17が既に起動実行されていて且つその後
にRDB15の更新がなされていない場合には、ストア
ドプロシージャ17を起動しない。この場合、既に実行
されたストアドプロシージャ17の処理結果が使用され
る。
The RDBMS 16 is used by the application 22
Is analyzed (step M21), and when the virtual table A 171 defined and generated by the stored procedure 17 is specified, it is determined whether or not the stored procedure 17 needs to be started and executed. When it is recognized that the procedure 17 needs to be activated, the stored procedure 17 is activated (steps M22 to M24). If the specified stored procedure 17 has already been started and executed and the RDB 15 has not been updated thereafter, the stored procedure 17 is not started. In this case, the processing result of the stored procedure 17 already executed is used.

【0069】起動されたストアドプロシージャ17は以
下の処理を実行する。 (1)実表C153の「製品番号+枝番A」ごとに、同
一「製品番号+枝番A」内で枝番Bが最大のものを含む
行を選択する(ステップS21)。この例では、図8
(c)の右端に○印が付いている行が選択される。 (2)実表B152の「製品番号+枝番A」と上記
(1)の結果の「製品番号+枝番A」とを関係づける
(ステップS22)。このとき、実表B152の削除
に”DEL”が設定されている実表B152の「製品番
号+枝番A」は除く。この例では、受付番号”002”
および”003”の行は削除に”DEL”が設定されて
いるので除かれ、関係づけられるのは、図8(b)およ
び(c)の右端に◎印が付いている行である。 (3)実表A151の製品番号と上記(2)の結果の枝
番Aと上記(2)の結果の枝番Bとから成る仮想表A1
71のデータセットを作成する(ステップS23)。ス
トアドプロシージャ17の出力結果を図8(d)に示
す。
The started stored procedure 17 executes the following processing. (1) For each “product number + branch number A” in the base table C153, a row including the largest branch number B in the same “product number + branch number A” is selected (step S21). In this example, FIG.
The line with a circle at the right end of (c) is selected. (2) The “product number + branch number A” of the base table 152 is associated with the “product number + branch number A” of the result (1) (step S22). At this time, “product number + branch number A” of the base table B152 in which “DEL” is set to delete the base table B152 is excluded. In this example, the reception number “002”
The lines “003” and “003” are excluded because “DEL” is set for deletion, and are related to the lines marked with “◎” at the right end in FIGS. 8B and 8C. (3) A virtual table A1 including the product number of the real table A151, the branch number A of the result of the above (2), and the branch number B of the result of the above (2).
A 71 data set is created (step S23). FIG. 8D shows the output result of the stored procedure 17.

【0070】続いて、RDBMS16は仮想表B221
に基づく処理を行う(ステップM25)。RDBMS1
6の処理結果を図8(e)に示す。
Subsequently, the RDBMS 16 stores the virtual table B 221
(Step M25). RDBMS1
The processing result of No. 6 is shown in FIG.

【0071】その後、RDBMS16は処理結果をアプ
リケーション22に返す(ステップM26)。
Thereafter, the RDBMS 16 returns a processing result to the application 22 (Step M26).

【0072】アプリケーション22は、RDBMS16
から処理結果を受け取り、アプリケーション処理を行う
(ステップA23)。
The application 22 executes the RDBMS 16
And performs application processing (step A23).

【0073】このようにして、アプリケーション22
は、ストアドプロシージャ17の出力結果である仮想表
A171をインデックス代わりに使用することにより、
求めているRDB15の最新のデータを高速に得ること
ができる。すなわち、アプリケーション22は複雑な処
理をすることなく、製品番号に対する最新の受付番号と
障害内容とを取得して、処理を行うことができる。
In this way, the application 22
By using the virtual table A171, which is the output result of the stored procedure 17, instead of an index,
The latest data of the required RDB 15 can be obtained at high speed. That is, the application 22 can perform the processing by acquiring the latest reception number and the failure content for the product number without performing complicated processing.

【0074】本発明による上述した実施の形態におい
て、データベースアクセス方式の処理動作を実行するた
めのプログラム等を、データとして磁気ディスクや光デ
ィスク等の記憶装置(図示せず)に記憶するようにし、
記憶されたデータを読み出してデータベースアクセス方
式を動作させるために用いる。このように、本発明によ
るデータベースアクセス方式を動作させるデータを記憶
媒体に記憶させ、この記憶媒体をインストールすること
によりデータベースアクセス方式の機能が実現できるよ
うになる。
In the above-described embodiment of the present invention, a program for executing a processing operation of the database access method is stored as data in a storage device (not shown) such as a magnetic disk or an optical disk.
It is used to read out the stored data and operate the database access method. As described above, the data for operating the database access method according to the present invention is stored in the storage medium, and the function of the database access method can be realized by installing the storage medium.

【0075】[0075]

【発明の効果】第1の効果は、必要なストアドプロシー
ジャを参照するだけで、アプリケーションから常に最新
のデータを高速に参照することができることである。そ
の理由は、アプリケーション用のインデックスを生成す
る機能をストアドプロシージャの中に構成するような手
段を設けたためである。
The first effect is that the latest data can always be referred to at a high speed from the application simply by referring to the necessary stored procedure. The reason is that a means is provided for configuring the function of generating an index for an application in a stored procedure.

【0076】第2の効果は、クライアントの負荷が軽減
され且つネットワークのトラフィックも減少することで
ある。その理由は、ストアドプロシージャがサーバー側
で実行されるので、アプリケーションから複雑なSQL
を発行する必要がなく、アプリケーションも一意キーの
表を基にしたデータ操作処理を記述するだけで処理が構
築でき、クライアントのアプリケーションとサーバのR
DBMSとの間に発生するやりとりも少なくて済むため
である。
The second effect is that the load on the client is reduced and the traffic on the network is also reduced. The reason is that the stored procedure is executed on the server side, so complicated SQL
Need not be issued, the application can construct the process simply by describing the data operation process based on the unique key table.
This is because the number of exchanges with the DBMS can be reduced.

【0077】第3の効果は、データベースの障害時、ア
プリケーション用のインデックスのために物理的なイン
デックステーブルの再作成といった特別の復旧処置が要
らないことである。その理由は、アプリケーション用の
インデックスが仮想的なテーブルとしてストアドプロシ
ージャを利用しているためである。
The third effect is that when a database failure occurs, no special recovery processing such as re-creation of a physical index table for an application index is required. The reason is that the application index uses stored procedures as virtual tables.

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

【図1】本発明を説明する図FIG. 1 illustrates the present invention.

【図2】第1の実施の形態の構成を示す図FIG. 2 is a diagram showing a configuration of a first embodiment.

【図3】第1の実施の形態における(a)実表A(b)
実表B(c)仮想表A(d)仮想表Bの構成を示す図
FIG. 3A shows a base table A (b) according to the first embodiment;
Diagram showing the structure of the real table B (c), the virtual table A (d) and the virtual table B

【図4】第1の実施の形態の動作を説明する(a)実表
A(b)実表B(c)仮想表A(d)仮想表Bの図
FIG. 4 is a diagram illustrating an operation of the first embodiment (a) a real table A (b) a real table B (c) a virtual table A (d) a virtual table B

【図5】第1の実施の形態の動作の流れを示す図FIG. 5 is a diagram showing a flow of an operation according to the first embodiment;

【図6】第2の実施の形態の構成を示す図FIG. 6 is a diagram illustrating a configuration according to a second embodiment;

【図7】第2の実施の形態における(a)実表A(b)
実表B(c)実表C(d)仮想表A(e)仮想表Bの構
成を示す図
FIG. 7A shows a base table A (b) according to the second embodiment;
Diagram showing configuration of base table B (c) base table C (d) virtual table A (e) virtual table B

【図8】第2の実施の形態の動作を説明する(a)実表
A(b)実表B(c)実表C(d)仮想表A(e)仮想
表Bの図
FIG. 8 is a view for explaining the operation of the second embodiment (a) a base table A (b) a base table B (c) a base table C (d) a virtual table A (e) a virtual table B

【図9】第2の実施の形態の動作の流れを示す図FIG. 9 is a diagram showing a flow of an operation according to the second embodiment;

【図10】従来の動作を説明する(a)実表A(b)実
表B(c)結果の図
FIG. 10 is a diagram illustrating a result of (a) a base table A (b) and a base table B (c) illustrating a conventional operation;

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

1 サーバ 2 クライアント 3 ネットワーク 4 データベース 5 データベース管理システム 6 ストアドプロシージャ実行手段 7 データベースアクセス要求手段 11 RDB 12 RDBMS 13 ストアドプロシージャ 14 ストアドプロシージャ起動手段 15 RDB 16 RDBMS 17 ストアドプロシージャ 21 アプリケーション 22 アプリケーション 111 実表A 112 実表B 131 仮想表A 151 実表A 152 実表B 153 実表C 171 仮想表A 211 仮想表B 221 仮想表B Reference Signs List 1 server 2 client 3 network 4 database 5 database management system 6 stored procedure execution means 7 database access request means 11 RDB 12 RDBMS 13 stored procedure 14 stored procedure activation means 15 RDB 16 RDBMS 17 stored procedure 21 application 22 application 111 base table A 112 Base table 131 Virtual table A 151 Base table A 152 Base table B 153 Base table C 171 Virtual table A 211 Virtual table B 221 Virtual table B

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 データを記憶蓄積するデータベースと、
データベースアクセス要求手段からの要求を受け付け前
記データベースにアクセスしアクセス結果を前記データ
ベースアクセス要求手段に返すデータベース管理システ
ムと、前記データベース管理システムに含まれストアド
プロシージャを実行しストアドプロシージャに定義され
た一意キーの表を作成するストアドプロシージャ実行手
段と、前記ストアドプロシージャ実行手段が作成した一
意キーの表を参照して前記データベースにアクセスする
要求を前記データベース管理システムに行うデータベー
スアクセス要求手段と、を備えることを特徴とするデー
ターベースアクセス方式。
A database for storing and storing data;
A database management system that receives a request from a database access requesting unit, accesses the database and returns an access result to the database access requesting unit, executes a stored procedure included in the database management system, and stores a unique key defined in the stored procedure. Stored procedure execution means for creating a table, and database access request means for requesting the database management system to access the database with reference to the unique key table created by the stored procedure execution means. Database access method.
【請求項2】 サーバとクライアントがネットワークを
介して接続されるクライアントサーバシステムにおい
て、前記サーバは、データを記憶蓄積し1つ以上の実表
から成る関係データベースと、アプリケーションから要
求された処理に基づき前記関係データベースをアクセス
し処理結果を前記アプリケーションに返す関係データベ
ース管理システムと、前記実表と関係づけた仮想表を定
義し一意キーの表を作成するストアドプロシージャと、
前記ストアドプロシージャを起動するストアドプロシー
ジャ起動手段とを備え、前記クライアントは、前記スト
アドプロシージャが定義する仮想表を指定して前記関係
データベースにアクセスする要求を前記関係データベー
ス管理システムに発行し要求結果を前記関係データベー
ス管理システムから受け取るアプリケーションを備える
ことを特徴とするデーターベースアクセス方式。
2. In a client-server system in which a server and a client are connected via a network, the server stores and accumulates data based on a relational database composed of one or more base tables and a process requested by an application. A relational database management system that accesses the relational database and returns a processing result to the application, a stored procedure that defines a virtual table associated with the base table and creates a unique key table,
And a stored procedure starting means for starting the stored procedure, wherein the client issues a request for accessing the relational database by specifying a virtual table defined by the stored procedure to the relational database management system, and A database access method comprising an application received from a relational database management system.
【請求項3】 前記ストアドプロシージャ起動手段は、
前記ストアドプロシージャが既に起動実行され且つその
後に前記関係データベースの更新がなされていない場合
には前記ストアドプロシージャを起動しないことを特徴
とする請求項2記載のデーターベースアクセス方式。
3. The stored procedure starting means,
3. The database access method according to claim 2, wherein the stored procedure is not started if the stored procedure has already been started and executed and the relational database has not been updated thereafter.
【請求項4】 前記ストアドプロシージャが定義する仮
想表は、アプリケーションが前記関係データベースをア
クセスするときにインデックスの役目をすることを特徴
とする請求項2記載のデーターベースアクセス方式。
4. The database access method according to claim 2, wherein the virtual table defined by the stored procedure serves as an index when an application accesses the relational database.
【請求項5】 サーバとクライアントがネットワークを
介して接続されるクライアントサーバシステムにおいて
データーベースにアクセスする方法であって、アプリケ
ーションは実表とストアドプロシージャで定義されてい
る仮想表とを関係づけた表を定義して関係データベース
に対するアクセス要求を関係データベース管理システム
に行い、前記関係データベース管理システムは前記アプ
リケーションからのアクセス要求を分析し、前記ストア
ドプロシージャが定義生成する仮想表が指定されている
ときはストアドプロシージャを起動実行してストアドプ
ロシージャに定義された仮想表を生成し、前記仮想表を
使用したアプリケーションのアクセス要求を処理してア
プリケーションに処理結果を返し、アプリケーションは
関係データベース管理システムから処理結果を受け取る
ことを特徴とするデーターベースアクセス方法。
5. A method for accessing a database in a client server system in which a server and a client are connected via a network, wherein an application associates a base table with a virtual table defined by a stored procedure. And making an access request to the relational database to the relational database management system.The relational database management system analyzes the access request from the application, and stores a virtual table defined by the stored procedure when the virtual table defined and generated is specified. Invoking and executing a procedure to generate a virtual table defined in a stored procedure, process an access request of an application using the virtual table, and return a processing result to the application; A database access method characterized by receiving a processing result from a physical system.
【請求項6】 前記ストアドプロシージャは基本データ
の実表とその履歴を保持する2つ以上の実表とから最新
の履歴の一意キーから成る仮想表を生成する処理である
ことを特徴とする請求項5記載のデーターベースアクセ
ス方法。
6. The stored procedure according to claim 1, wherein the stored procedure is a process for generating a virtual table including a latest history unique key from a base table of basic data and two or more base tables holding its history. Item 6. The database access method according to Item 5.
【請求項7】 アプリケーションが実表とストアドプロ
シージャで定義されている仮想表とを関係づけた表を定
義して関係データベースに対するアクセス要求を関係デ
ータベース管理システムに行うアクセス要求処理と、前
記関係データベース管理システムが前記アプリケーショ
ンからのアクセス要求を分析し、前記ストアドプロシー
ジャが定義生成する仮想表が指定されているときは前記
ストアドプロシージャを起動するストアドプロシージャ
起動処理と、前記ストアドプロシージャを実行してスト
アドプロシージャに定義された仮想表を生成する仮想表
生成処理と、前記仮想表を使用したアプリケーションの
アクセス要求を処理してアプリケーションに処理結果を
返すアクセス処理と、アプリケーションが前記関係デー
タベース管理システムから処理結果を受け取るデータ受
取処理と、をコンピュータに実行させるためのプログラ
ムを記録したことを特徴とする記録媒体。
7. An access request process in which an application defines a table associating a base table with a virtual table defined by a stored procedure and issues an access request to a relational database to a relational database management system, and said relational database management. The system analyzes an access request from the application, and executes a stored procedure start process for starting the stored procedure when a virtual table defined and generated by the stored procedure is specified. A virtual table generating process for generating a defined virtual table; an access process for processing an access request of an application using the virtual table and returning a processing result to the application; A recording medium on which a program for causing a computer to execute a data receiving process of receiving a processing result from a computer is recorded.
JP17202899A 1999-06-18 1999-06-18 Database access method, method and storage medium Expired - Fee Related JP3626632B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17202899A JP3626632B2 (en) 1999-06-18 1999-06-18 Database access method, method and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17202899A JP3626632B2 (en) 1999-06-18 1999-06-18 Database access method, method and storage medium

Publications (2)

Publication Number Publication Date
JP2001005704A true JP2001005704A (en) 2001-01-12
JP3626632B2 JP3626632B2 (en) 2005-03-09

Family

ID=15934198

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17202899A Expired - Fee Related JP3626632B2 (en) 1999-06-18 1999-06-18 Database access method, method and storage medium

Country Status (1)

Country Link
JP (1) JP3626632B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7228322B1 (en) * 1999-11-17 2007-06-05 Fujitsu Limited Data management apparatus of switching system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0567159A (en) * 1991-09-10 1993-03-19 Nec Software Kansai Ltd Table form data processing device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0567159A (en) * 1991-09-10 1993-03-19 Nec Software Kansai Ltd Table form data processing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7228322B1 (en) * 1999-11-17 2007-06-05 Fujitsu Limited Data management apparatus of switching system

Also Published As

Publication number Publication date
JP3626632B2 (en) 2005-03-09

Similar Documents

Publication Publication Date Title
CN109299102B (en) HBase secondary index system and method based on Elastcissearch
US11062042B1 (en) Authenticating data associated with a data intake and query system using a distributed ledger system
US10838935B2 (en) Automating the logging of table changes in a database
JP5171932B2 (en) Systems and methods for integrating, managing, and coordinating customer activities
JP5199317B2 (en) Database processing method, database processing system, and database server
WO2010098034A1 (en) Distributed database management system and distributed database management method
JP2012503256A (en) Hash join using collaborative parallel filtering in intelligent storage with offloaded Bloom filters
JPH07506443A (en) Open Office Directory Database View
JP2001056810A (en) Database access system
WO2018095299A1 (en) Time sequence data management method, device and apparatus
CN103034735A (en) Big data distributed file export method
US11494395B2 (en) Creating dashboards for viewing data in a data storage system based on natural language requests
US20220035786A1 (en) Distributed database management system with dynamically split b-tree indexes
JP2004110219A (en) Data processing system and join processing method
US20190034247A1 (en) Creating alerts associated with a data storage system based on natural language requests
CN111046041A (en) Data processing method and device, storage medium and processor
CN116069778A (en) Metadata management method, related device, equipment and storage medium
CN110941641B (en) Method for searching data across multiple databases
WO2015094195A1 (en) Transaction query engine
CN108984626B (en) Data processing method and device and server
US11599396B2 (en) Resegmenting chunks of data based on source type to facilitate load balancing
JP5464017B2 (en) Distributed memory database system, database server, data processing method and program thereof
US8005844B2 (en) On-line organization of data sets
JP2001005704A (en) System and method for database access and storage medium
JP2000222430A (en) Virtual database management system

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20041124

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041203

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S633 Written request for registration of reclamation of name

Free format text: JAPANESE INTERMEDIATE CODE: R313633

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071210

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081210

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091210

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091210

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101210

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101210

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111210

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111210

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121210

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121210

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131210

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees