JPH0981427A - Method for generating update difference data extraction program and device therefor - Google Patents

Method for generating update difference data extraction program and device therefor

Info

Publication number
JPH0981427A
JPH0981427A JP7238126A JP23812695A JPH0981427A JP H0981427 A JPH0981427 A JP H0981427A JP 7238126 A JP7238126 A JP 7238126A JP 23812695 A JP23812695 A JP 23812695A JP H0981427 A JPH0981427 A JP H0981427A
Authority
JP
Japan
Prior art keywords
data
update
update difference
difference data
program
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
JP7238126A
Other languages
Japanese (ja)
Inventor
Masakazu Okumura
昌和 奥村
Tetsuo Ikeda
哲夫 池田
Giichi Kishimoto
義一 岸本
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP7238126A priority Critical patent/JPH0981427A/en
Publication of JPH0981427A publication Critical patent/JPH0981427A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a method for generating update difference data extraction program by which an update difference data extraction program can be generated in short time without manual aid and the device therefor. SOLUTION: By reading the table name and the data item definition defined on a data base 401 to be an update object from the data base and visually editing the table name and data item definition information by a selection execution part 405, a selectable menu is prepared, the menu is displayed on a display device 402 and the table name and the data item definitions selected from the menu by an input device 403 are performed. By an automatic program generation execution part 406, the definitions are incorporated as parameters in templates 407 to 409 for extraction of update difference data which are preliminarily prepared, an update difference data extraction procedure update difference data extraction program is generated in accordance with the templates and difference data is extracted by using a procedure.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、データベースにおける
更新差分データ抽出プログラム作成方法および更新差分
データ抽出プログラム作成装置に関し、さらに具体的に
は、データベース間のデータ流通(データベース間で一
方のデータベースのデータを他方のデータベースへ自動
的に反映することによってデータの入力にかかる手間を
削減する手法)を実現する上で必要となる差分データ抽
出プログラムを短時間に、かつ、あまり人手をかけずに
作成するようにした更新差分データ抽出プログラム作成
方法および更新差分データ抽出プログラム作成装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an update difference data extraction program creation method and an update difference data extraction program creation apparatus in a database, and more specifically, data distribution between databases (data of one database between databases). Method to reduce the time and effort required to input data by automatically reflecting the data in the other database), and create the difference data extraction program required in a short time and without much human intervention. The present invention relates to the update difference data extraction program creation method and the update difference data extraction program creation device.

【0002】[0002]

【従来の技術】近年、企業内における多くの業務がコン
ピュータによって処理されるようになり、取り扱われる
データもデータベース化されて管理されるようになっ
た。その場合のデータベースは業務ごとに個別に設計さ
れ運用されるため、異なる業務に対応する複数のデータ
ベースが同じ意味を表すデータを重複して持つことが多
い。従って、本来一度の投入で済むはずのデータをデー
タベース毎に何度も手作業で入れ直すことが必要となっ
ている。この問題の解決のための従来の方法として、デ
ータベース内のデータを自動的に他のデータベースへ反
映し、同じデータの投入を一度で済ます「データ流通」
という方法がある。
2. Description of the Related Art In recent years, many jobs in companies have been processed by computers, and the data to be handled have also been managed as a database. Since the database in that case is designed and operated individually for each business, a plurality of databases corresponding to different business often have duplicate data having the same meaning. Therefore, it is necessary to manually re-input the data, which should be input only once, into each database many times. As a conventional method for solving this problem, the data in the database is automatically reflected in other databases and the same data can be input only once.
There is a method.

【0003】この「データ流通」という方法を、流通す
るデータの範囲によって分類すると、データベース内の
全データを抽出し、他のデータベースへ反映する「全デ
ータ反映法」と、データベース内で更新されたデータの
みを抽出して他のデータベースへ反映する「更新差分デ
ータ反映法」がある。データを抽出する対象となるデー
タベース中に含まれるデータが多い場合には、全データ
反映法を用いると処理性能が低下してしまうため、通
常、更新差分データ反映法が用いられている。
When the method of "data distribution" is classified according to the range of data to be distributed, "all data reflection method" for extracting all data in a database and reflecting it in another database, and "data distribution" are updated in the database. There is an "update difference data reflection method" that extracts only data and reflects it in other databases. When a large amount of data is included in the database from which data is extracted, the update data differential reflection method is usually used because the processing performance deteriorates when the full data reflection method is used.

【0004】上記更新差分データ反映法を実施するため
にはデータベース上で更新されたデータを抽出する機能
が必要である。この機能を実現するプログラムを更新差
分データ抽出プログラムと呼ぶ。図1は更新差分データ
抽出プログラムの機能を説明するための図である。同図
において、101はアプリケーションプログラム、10
2は更新差分データ抽出部、103は更新対象テーブ
ル、104は更新差分テーブル、105は更新差分デー
タ作成部、106は更新差分データ抽出プログラムであ
る。
In order to carry out the above-mentioned update difference data reflection method, it is necessary to have a function of extracting the updated data on the database. A program that realizes this function is called an update difference data extraction program. FIG. 1 is a diagram for explaining the function of the update difference data extraction program. In the figure, 101 is an application program and 10
Reference numeral 2 is an update difference data extraction unit, 103 is an update target table, 104 is an update difference table, 105 is an update difference data creation unit, and 106 is an update difference data extraction program.

【0005】アプリケーションプログラム101が更新
対象テーブル103上のデータを更新すると、その更新
をDBMS(データベース管理システム)の機能の一つ
であるデータベーストリガ機能により検出し、該データ
ベーストリガ機能によって起動される処理手続き(更新
差分データ抽出プログラム106の更新差分データ作成
部105に相当)により、更新を検出したデータを更新
対象テーブル103から読み出し、対応する更新差分デ
ータを作成し、上記更新されたデータを格納するために
作成された更新差分テーブル104へ保存する。そして
更新差分データ抽出プログラム106の更新差分データ
抽出部102によって更新差分テーブル104から更新
差分データを抽出する。
When the application program 101 updates the data on the update target table 103, the update is detected by the database trigger function which is one of the functions of the DBMS (database management system), and the process started by the database trigger function. By the procedure (corresponding to the update difference data creation unit 105 of the update difference data extraction program 106), the data for which an update is detected is read from the update target table 103, the corresponding update difference data is created, and the updated data is stored. It is stored in the update difference table 104 created for this purpose. Then, the update difference data extracting unit 102 of the update difference data extracting program 106 extracts the update difference data from the update difference table 104.

【0006】更新差分データ作成部105によって作成
されるデータは、図2に示すように、アプリケーション
プログラム101によって更新されたデータを示す更新
後データ201に加え、どのデータが更新されたかを示
す更新前データ202、どのような更新(データの追
加,更新,削除)が行われたかを示す更新種別203、
および更新が誤った順序で反映されてデータベース間で
データの矛盾が生じてしまうのを防ぐための更新順序2
04が付与される。同図の例では、データ「BBB10
0」がデータ「AAA100」に「1番目」に「変更」
されたことを示している。更新後データ201,更新前
データ202,更新種別203,更新順序204から構
成される一連のデータを以後「更新差分データ」と呼
び、それを図2のようにテーブル化したものが更新差分
テーブル104である。
As shown in FIG. 2, the data created by the update difference data creating unit 105 includes post-update data 201 indicating the data updated by the application program 101, and pre-update data indicating which data has been updated. Data 202, update type 203 indicating what kind of update (addition, update, deletion of data) has been performed,
And update order 2 to prevent data inconsistency between databases due to update and update being reflected in the wrong order 2
04 is given. In the example of the figure, the data “BBB10
"0" is changed to data "AAA100", "first" is changed
It has been done. A series of data composed of the post-update data 201, the pre-update data 202, the update type 203, and the update order 204 is hereinafter referred to as “update difference data”, and the table as shown in FIG. Is.

【0007】上記更新差分データ作成部105および更
新差分データ抽出部102からなる更新差分データ抽出
プログラム106は、DBMS(データベース管理シス
テム)の提供するユーティリティ機能(アンロード機
能,データベース移行機能)の単純な組み合わせでは実
現できず、そのためにデータベースの持つデータベース
上のデータの更新を検出するDBMS(データベース管
理システム)の機能の一つであるデータベーストリガ機
能や汎用プログラミング言語を用いてプログラムを作成
する必要があるため、その作成のために多大な時間と人
手を必要としていた。
The update difference data extraction program 106 including the update difference data creation unit 105 and the update difference data extraction unit 102 has a simple utility function (unload function, database migration function) provided by a DBMS (database management system). It cannot be realized by a combination, and therefore it is necessary to create a program by using a database trigger function which is one of the functions of a DBMS (database management system) that detects an update of data in a database of a database and a general-purpose programming language. Therefore, it took a lot of time and manpower to create it.

【0008】[0008]

【発明が解決しようとする課題】上述したように、従来
の技術は差分データ抽出のための更新差分データ抽出プ
ログラムの作成に多大な時間と人手を必要とするという
問題点を有していた。本発明の目的は、上述した従来技
術の問題点を解決し、更新差分データ抽出プログラムを
短時間にかつあまり人手をかけずに作成することが可能
な更新差分データ抽出プログラム作成方法およびそのた
めの装置を提供することにある。
As described above, the conventional technique has a problem that it takes a lot of time and labor to create an updated differential data extraction program for extracting differential data. An object of the present invention is to solve the above-mentioned problems of the prior art, and to create an update difference data extraction program and an update difference data extraction program creation method capable of creating the update difference data extraction program in a short time and without much human intervention. To provide.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に、本発明の更新差分データ抽出プログラム作成方法
は、データベーストリガ機能を有するデータベース管理
システムで管理されたデータベースにおいて、差分デー
タ抽出手順(差分データ抽出プログラム)をデータベー
ス上に定義されているテーブル名およびデータ項目定義
を用いて対話的に完成することを特徴としている。
In order to achieve the above object, an update differential data extraction program creating method according to the present invention uses a differential data extraction procedure (difference) in a database managed by a database management system having a database trigger function. The data extraction program) is interactively completed using the table names and data item definitions defined on the database.

【0010】さらに詳しくは、更新差分データを抽出す
るための機能の骨子であるテンプレートを予め作成して
おき、更新対象となるデータベース上に定義されている
テーブル名およびデータ項目定義を該データベースから
読み出し(図5のステップ501,505)、該テーブ
ル名およびデータ項目定義情報を視覚的に編集すること
で、選択可能なメニューを作成して表示し(同ステップ
502〜503,506〜507)、該表示されたメニ
ューから必要なテーブル名とデータ項目定義を選択し
(同ステップ504,508)、該選択したテーブル名
とデータ項目定義を、上記テンプレートにパラメタとし
て組み込み、該テンプレートに従って更新差分データ抽
出手順(差分データ抽出プログラム)を作成するもので
ある。
More specifically, a template, which is a skeleton of the function for extracting update difference data, is created in advance, and the table name and data item definition defined in the database to be updated are read from the database. (Steps 501 and 505 in FIG. 5), by visually editing the table name and the data item definition information, a selectable menu is created and displayed (Steps 502 to 503 and 506 to 507). A required table name and data item definition are selected from the displayed menu (steps 504 and 508), the selected table name and data item definition are incorporated into the template as parameters, and the update difference data extraction procedure is performed according to the template. (Differential data extraction program) is created.

【0011】また、本発明の更新差分データ抽出プログ
ラム作成装置は、更新対象であるデータベース手段(図
4の401)と、選択可能なテーブル名およびデータ項
目定義のメニューを表示する表示手段(同402)と、
該表示手段(同402)に表示されたメニューから必要
なテーブル名とデータ項目定義を選択させる入力手段
(同403)と、未定義のテーブル名またはデータ項目
名を含む未完成の更新差分データ抽出手順を記述する複
数のテンプレート手段(同407〜409)と、該入力
手段(同403)による選択の結果得られたテーブル名
とデータ項目定義によって前記複数のテンプレート手段
(同407〜409)を完成し更新差分データ抽出手順
を生成し、該更新差分データ抽出手順をデータベースに
対して実行し、登録する手段(プログラム自動作成実行
部406)とを具備したことを特徴としている。
Further, the update difference data extraction program creating apparatus of the present invention comprises a database means (401 in FIG. 4) to be updated and a display means (402 of the same table) for displaying a menu of selectable table names and data item definitions. )When,
Input means (403) for selecting a required table name and data item definition from the menu displayed on the display means (402), and unfinished update difference data extraction including an undefined table name or data item name Completing the plurality of template means (407 to 409) by a plurality of template means (407 to 409) describing the procedure and the table name and data item definition obtained as a result of selection by the input means (403). Then, a means (a program automatic creation execution unit 406) for generating an update difference data extraction procedure, executing the update difference data extraction procedure for the database, and registering the update difference data extraction procedure is provided.

【0012】要するに、本発明の最も特徴とする点は次
(1)〜(3)の点である。 (1)更新差分データを保存するための更新差分テーブ
ル104のテーブル定義を行うプログラムのテンプレー
ト407と、データの更新を検出し、更新差分データを
作成し、更新差分テーブル104へ保存するデータベー
ストリガの定義を行うプログラムのテンプレート408
と、更新差分テーブル104から更新差分データを抽出
し、その後抽出済みの更新差分データを削除するプログ
ラムのテンプレート409を予め用意すること。 (2)更新差分データ抽出の対象となるデータベースか
らテーブルおよびデータ項目定義(データ項目名および
データ型から構成される)を読み出し、メニューとして
表示し、更新差分データ抽出の必要なテーブルおよびデ
ータ項目を利用者が選択可能とする選択実行部405を
設けること。
In short, the most characteristic point of the present invention is the following points (1) to (3). (1) A template 407 of a program that performs table definition of the update difference table 104 for storing update difference data, and a database trigger that detects update of data, creates update difference data, and saves it in the update difference table 104. Template 408 of the defining program
Then, prepare a template 409 of a program for extracting the update difference data from the update difference table 104 and thereafter deleting the extracted update difference data. (2) Read the table and data item definition (composed of data item name and data type) from the database that is the target of update difference data extraction, display it as a menu, and display the tables and data items that need update difference data extraction. Providing a selection execution unit 405 that allows the user to select.

【0013】(3)上記(1)の予め用意されているテ
ンプレートに、上記(2)により利用者が選択したテー
ブルおよびデータ項目を展開して更新差分データ抽出プ
ログラムを作成し、それを実行するプログラム自動作成
実行部406を設けること。なお、本願明細書でいうテ
ンプレートとは、図3に示すように、タグ301(%T
AG)で示される未定義部分を含む未完成のプログラム
のことをいう。テンプレートは未定義のタグ301の部
分を実パラメータ(TABLE NAME)で展開する
ことによって完成したプログラムとなる。
(3) The table and data items selected by the user in (2) above are expanded in the template prepared in (1) above to create an update difference data extraction program and execute it. Providing a program automatic creation execution unit 406. Note that the template referred to in the specification of the present application is, as shown in FIG. 3, a tag 301 (% T
AG) refers to an unfinished program containing undefined parts. The template becomes a completed program by expanding the portion of the undefined tag 301 with an actual parameter (TABLE NAME).

【0014】[0014]

【発明の実施の形態】本発明では、予め用意されている
テンプレート407および408中のタグで示される未
定義部分を、入力手段で表示メニューから選択したテー
ブル名およびデータ項目定義で展開(組み込む)してプ
ログラムを完成させ、これらのプログラムを対象となる
データベースに対して実行することにより、アプリケー
ションプログラム101によるデータの更新を検出し、
更新差分データを更新差分テーブル104へ保存するこ
とが可能となる。すなわち、更新差分データ作成部10
5が実現できる。
BEST MODE FOR CARRYING OUT THE INVENTION In the present invention, an undefined portion indicated by a tag in a template 407 or 408 prepared in advance is expanded (incorporated) with a table name and a data item definition selected from a display menu by an input means. To complete the programs and execute these programs against the target database to detect data updates by the application program 101,
The update difference data can be stored in the update difference table 104. That is, the update difference data creation unit 10
5 can be realized.

【0015】上記更新差分データ作成部105の実行後
は、テンプレート409をタグで示される未定義部分を
入力手段で表示メニューから選択したテーブル名で展開
(組み込み)してプログラムを完成させ、このプログラ
ムを対象となるデータベースに実行することによって、
更新差分データの抽出および更新済みデータの削除が行
われる。すなわち、更新差分データ抽出部102が実現
できる。
After the execution of the update difference data creation unit 105, the template 409 is expanded (embedded) with the table name selected from the display menu by the undefined portion indicated by the tag by the input means to complete the program. To the target database,
Extraction of update difference data and deletion of updated data are performed. That is, the update difference data extraction unit 102 can be realized.

【0016】以上のように、テンプレート407,40
8および409をタグで示される未定義部分を表示メニ
ューから選択したテーブル名およびデータ項目定義で展
開して完成させたプログラムを組み合わせることによっ
て更新差分データ抽出プログラム106(更新差分デー
タ作成部105と更新差分データ抽出部102から構成
される)の作成が可能である。以上のようにして作成し
た更新差分データ抽出プログラム106を実行させるこ
とによって更新差分データを抽出し、抽出済み更新差分
データを削除することができる。
As described above, the templates 407, 40
Update difference data extraction program 106 (update difference data creation unit 105 and update by combining the programs completed by expanding the undefined parts indicated by tags 8 and 409 with the table name and data item definition selected from the display menu) (Consisting of the difference data extraction unit 102) can be created. By executing the update difference data extraction program 106 created as described above, the update difference data can be extracted and the extracted update difference data can be deleted.

【0017】本発明においては、更新差分データ抽出プ
ログラムの作成において必要な利用者の作業は、選択実
行部405によりメニューとして表示されるテーブル名
およびデータ項目を選択するだけであり、従来の方法で
必要であった差分データ抽出の手順を記述する更新差分
データ抽出プログラムの作成に要する多大な時間と人手
の負荷を大幅に削減することが可能になる。
In the present invention, the user's work required to create the update difference data extraction program is only to select the table name and data item displayed as a menu by the selection executing unit 405, and the conventional method is used. It is possible to significantly reduce the enormous amount of time and labor required to create the updated differential data extraction program that describes the necessary differential data extraction procedure.

【0018】[0018]

【実施例】以下、図面を用いて本発明の一実施例を説明
する。なお、以下で説明する実施例はISO(Interna
tional Organization forStandardization)で標準化
が進められているSQL3をサポートするデータベース
管理システムを対象とするものである。図4は本発明の
基本構成例を示す図である。同図において、401は更
新差分データ抽出の対象となるデータベース、402は
メニューを表示するための表示装置、403はメニュー
を選択するために用いるマウスなどの入力装置、404
は一時的なデータを記憶するための一時記憶装置、40
5はメニューからテーブル名およびデータ項目を選択す
る選択実行部、406は選択されたテーブル名およびデ
ータ項目からプログラムを作成するプログラム自動作成
実行部、407〜409は予め作成し用意されている未
完成プログラムであるテンプレートである。図5は選択
実行部405で行われる処理の流れを示すフローチャー
トであり、図6はプログラム自動作成実行部406で行
われる処理の流れを示すフローチャートである。
An embodiment of the present invention will be described below with reference to the drawings. The embodiment described below is based on ISO (Interterna).
It is intended for database management systems that support SQL3, which is being standardized by the National Organization for Standardization). FIG. 4 is a diagram showing a basic configuration example of the present invention. In the figure, 401 is a database from which update difference data is to be extracted, 402 is a display device for displaying a menu, 403 is an input device such as a mouse used for selecting a menu, 404
Is a temporary storage device for storing temporary data, 40
Reference numeral 5 is a selection execution unit that selects a table name and data item from the menu, 406 is an automatic program creation execution unit that creates a program from the selected table name and data item, and 407 to 409 are unprepared and prepared in advance. It is a template that is a program. FIG. 5 is a flowchart showing the flow of processing performed by the selection execution unit 405, and FIG. 6 is a flowchart showing the flow of processing performed by the program automatic creation execution unit 406.

【0019】図7〜図10は本発明の動作例を説明する
ための図である。図7は、テーブル名メニュー(一覧)
およびデータ項目メニュー(一覧)からそれぞれテーブ
ル名およびデータ項目を選択する動作を説明する図であ
る。図7において、701は選択実行部405により表
示装置402に表示されたテーブル名のメニュー(テー
ブル名一覧)の例、702はメニュー701より利用者
が選択したテーブル名の例、703は選択実行部405
により表示装置402に表示されたデータ項目のメニュ
ーの例、704はメニュー703より利用者が選択した
データ項目の例である。
7 to 10 are diagrams for explaining an operation example of the present invention. Figure 7 shows the table name menu (list)
FIG. 10 is a diagram illustrating an operation of selecting a table name and a data item from a data item menu (list) and a data item menu. In FIG. 7, 701 is an example of a menu (table name list) of table names displayed on the display device 402 by the selection execution unit 405, 702 is an example of table names selected by the user from the menu 701, and 703 is a selection execution unit. 405
An example of a menu of data items displayed on the display device 402 by 704 is an example of a data item selected by the user from the menu 703.

【0020】図8は、更新差分テーブル104を作成す
るプログラムのテンプレートとそのテンプレートを完成
させたプログラムを示す図である。図8において、80
1は更新差分テーブル104の定義を行うプログラムの
テンプレート407のSQL3を用いる場合の記述例、
802はプログラム自動作成実行部406によってタグ
を展開され、完成したプログラムの例である。
FIG. 8 is a diagram showing a template of a program that creates the update difference table 104 and a program that completes the template. In FIG. 8, 80
1 is a description example when SQL3 of the template 407 of the program that defines the update difference table 104 is used,
802 is an example of a completed program in which tags are expanded by the program automatic creation execution unit 406.

【0021】図9は、データベーストリガ機能が更新対
象テーブル103上のデータの更新を検出した場合に行
う処理のプログラムを示す図である。図9において、9
01はデータの更新を検出し、更新差分データを作成
し、更新差分テーブルへ保存するデータベーストリガの
定義を行うプログラムのテンプレート408のSQL3
を用いる場合の記述例の一部分、902はプログラム自
動作成実行部406によってタグを展開し、完成したプ
ログラム例の一部分である。
FIG. 9 is a diagram showing a program of processing executed when the database trigger function detects an update of data on the update target table 103. In FIG. 9, 9
01 is SQL3 of the template 408 of the program that detects the update of the data, creates the update difference data, and defines the database trigger to be stored in the update difference table.
902 is a part of a description example, and 902 is a part of a completed program example in which tags are expanded by the program automatic creation execution unit 406.

【0022】図10は、更新差分テーブル104に保存
された更新差分データを読み出し、一度読み出されたデ
ータが次回以降に読み出されないように削除するプログ
ラムのテンプレートとそのテンプレートを完成させたプ
ログラムを示す図である。図10において、1001は
更新差分テーブルから更新差分データを抽出し、その後
抽出済みの更新差分データを削除するプログラムのテン
プレート409のSQL3による記述例、1002はプ
ログラム自動作成実行部406によってタグを展開さ
れ、完成したプログラムの例である。
FIG. 10 shows a template of a program for reading the update difference data stored in the update difference table 104 and deleting the read-out data so that the read-out data will not be read next time and the program that completes the template. FIG. In FIG. 10, reference numeral 1001 is an example of the description in SQL3 of the template 409 of the program that extracts the update difference data from the update difference table and then deletes the extracted update difference data, and 1002 has the tags expanded by the program automatic creation execution unit 406. , Is an example of a completed program.

【0023】次に、本実施例の動作を説明する。まず、
選択実行部405が行なう処理を、図7を参照して、図
5のフローチャートに沿って説明する。選択実行部40
5は、データベース401に定義されているテーブル名
を抽出し(テーブル名抽出ステップ501)、そのテー
ブル名を一時記憶装置404へ記憶する。一時記憶装置
404に記憶されたテーブル名を表すデータを編集して
一覧メニューを生成し(テーブル名メニュー生成ステッ
プ502)、そのテーブル名一覧メニューをCRTなど
の表示装置402に表示する(テーブル名メニュー表示
ステップ503)。図7の701はその表示例であり、
テーブル名として「shop」と「employee」
が表示される場合を示している。
Next, the operation of this embodiment will be described. First,
The processing performed by the selection execution unit 405 will be described with reference to FIG. 7 and according to the flowchart of FIG. Selection execution unit 40
5 extracts the table name defined in the database 401 (table name extraction step 501) and stores the table name in the temporary storage device 404. The data representing the table name stored in the temporary storage device 404 is edited to generate a list menu (table name menu generation step 502), and the table name list menu is displayed on the display device 402 such as a CRT (table name menu). Display step 503). 701 in FIG. 7 is an example of the display,
"Shop" and "employee" as table names
Is displayed.

【0024】次に、マウスなどの入力装置403を用
い、利用者に更新差分データ抽出の必要なテーブル名を
選択させ(テーブル名メニュー選択ステップ504)、
その結果を一時記憶装置404へ記憶する。図7の70
2は一時記憶装置へ記憶された、上記メニューによって
選択されたテーブル名を表すデータの例であり、表示さ
れている「shop」と「employee」の内、
「employee」を選択した場合を示している。上
記テーブル名選択ステップ504で選択されたテーブル
名によりデータベース401から該選択したテーブルの
データ項目定義を抽出し、そのデータを一時記憶装置4
04へ記憶する(データ項目定義抽出ステップ50
5)。
Next, using the input device 403 such as a mouse, the user is made to select the table name required to extract the update difference data (table name menu selection step 504),
The result is stored in the temporary storage device 404. 70 of FIG.
2 is an example of data that is stored in the temporary storage device and represents the table name selected by the above menu. Of the displayed “shop” and “employee”,
This shows a case where "employee" is selected. The data item definition of the selected table is extracted from the database 401 by the table name selected in the table name selection step 504, and the data is stored in the temporary storage device 4.
04 (data item definition extraction step 50)
5).

【0025】上記のデータを編集してデータ項目メニュ
ーを生成し(データ項目メニュー生成ステップ50
6)、そのデータ項目メニューをCRTなどの表示装置
402に表示する(データ項目メニュー表示ステップ5
07)。図7の703はその場合のデータ項目メニュー
の表示例であり、テーブル名が「employee」
で、データ項目として「name char(2
0)」、「address char(50)」、「t
elephone char(12)」がある場合を示
している。
The above data is edited to generate a data item menu (data item menu generation step 50).
6), the data item menu is displayed on the display device 402 such as a CRT (data item menu display step 5).
07). Reference numeral 703 in FIG. 7 is a display example of the data item menu in that case, and the table name is “employee”.
Then, as a data item, "name char (2
0) ”,“ address char (50) ”,“ t ”
elephone char (12) ”is shown.

【0026】次に、マウスなどの入力装置403を用
い、利用者に表示されたデータ項目メニューの中から更
新差分データ抽出の必要なデータ項目を選択させ、その
結果を一時記憶装置404へ記憶する(データ項目メニ
ュー選択ステップ508)。図7の704は一時記憶装
置へ記憶された、上記データ項目メニューから選択され
たデータ項目を表すデータの例であり、「name c
har(20)」と「address char(5
0)」が選択された場合を示している。なお、図7に示
されたテーブル名メニュー701,選択されたテーブル
名702,テーブル項目メニュー703,選択されたデ
ータ項目名704は単に一つの実施例であり、これらに
限定されないことはいうまでもない。
Next, using the input device 403 such as a mouse, the user selects a data item that needs to be updated difference data extracted from the data item menu displayed to the user, and stores the result in the temporary storage device 404. (Data item menu selection step 508). Reference numeral 704 in FIG. 7 is an example of data stored in the temporary storage device and representing the data item selected from the data item menu.
har (20) ”and“ address char (5
0) ”is selected. The table name menu 701, the selected table name 702, the table item menu 703, and the selected data item name 704 shown in FIG. 7 are merely examples, and needless to say, they are not limited to these. Absent.

【0027】次に、プログラム自動作成実行部406の
処理を、図6のフローチャートに沿って説明する。図5
のフローチャートに示した選択実行部405の処理によ
ってデータ項目の選択が終了すると、一時記憶装置40
4上に記憶されている選択されたテーブル名を表すデー
タ702「employee」およびデータ項目704
「namechar(20)」および「address
char(50)」を用い、テンプレート中の未定義
のタグを展開してテンプレートを完成させることにより
プログラムを作成する(タグ展開ステップ601)。
Next, the processing of the automatic program creation execution unit 406 will be described with reference to the flowchart of FIG. FIG.
When the selection of the data item is completed by the processing of the selection execution unit 405 shown in the flowchart of FIG.
Data 702 “employee” and data item 704 representing the selected table name stored on
"Namechar (20)" and "address
char (50) "is used to develop an undefined tag in the template and complete the template to create a program (tag expansion step 601).

【0028】次に、テンプレート中の未定義タグを展開
してテンプレートに組み込むことによりプログラムを完
成させる手順を図8〜図10を用いて具体的に説明す
る。図8に示したテンプレート801は更新差分テーブ
ル104の定義を行うプログラムのテンプレートのSQ
L3を用いた場合の記述例であり、更新されたレコード
を特定するために必要な更新前データ202、更新後デ
ータ201、例えば更新発生日時など更新の発生順序を
特定し、抽出された更新差分データを更新の発生順に他
のデータベースへ反映することを可能とする更新順序2
04、発生した更新の種別(追加,変更,削除)を示す
更新種別203の定義から構成されている。
Next, a procedure for expanding the undefined tag in the template and incorporating it in the template to complete the program will be specifically described with reference to FIGS. The template 801 shown in FIG. 8 is the SQ of the template of the program that defines the update difference table 104.
This is a description example when L3 is used, in which the pre-update data 202 and the post-update data 201 required for specifying the updated record, for example, the update occurrence order such as the update occurrence date and time is specified, and the extracted update difference Update order 2 that enables data to be reflected in other databases in the order of update occurrence
04, update type 203 definition indicating the type of update that has occurred (addition, change, deletion).

【0029】図8をさらに具体的に説明すると、「cr
eate table ext・・・」は作成するテー
ブル名を指定する文であり、「before ・・・」
は更新前のデータを、「after ・・・」は更新後
のデータを、「extorder・・・」は更新順序
を、「ext type・・・」は更新種別を定義する
文である。また、テンプレート801中の「%TABL
E」および「%ITEMDEF」の部分はそれぞれ更新
差分データ抽出を行うテーブルおよびデータ項目が決定
するまで未定義の部分を表すタグである。
More specifically explaining FIG. 8, "cr
"eate table ext ..." is a statement that specifies the name of the table to be created, and "before ..."
Is data before update, “after ...” Is data after update, “extender ...” Is update order, and “ext type ...” Is update sentence. Also, in the template 801, “% TABL
The parts "E" and "% ITEMDEF" are tags that represent undefined parts until the table and the data item for which the update difference data is extracted are determined.

【0030】タグ展開ステップ601では、上記テーブ
ル名が決定するまで未定義の「%TABLE」タグの示
す部分を702に記憶されたテーブル名「employ
ee]を用いて、上記データ項目が決定するまで未定義
の「%ITEMDEF」タグの示す部分を704に記憶
されたデータ項目定義「name char(2
0)」,「address char(50)」を用い
て、それぞれ展開することでテンプレート801を完成
させて802に示すプログラム例を自動的に作成する。
In the tag expansion step 601, the portion indicated by the undefined "% TABLE" tag is stored in the table name "employed" 702 until the table name is determined.
ee], the part indicated by the undefined “% ITEMDEF” tag is stored in 704 until the data item is determined, and the data item definition “name char (2
0) ”and“ address char (50) ”are used to complete the template 801 and automatically create the program example 802.

【0031】図9に示したテンプレート901はデータ
の更新を検出し、更新差分データを作成し、更新差分テ
ーブルへ保存するデータベーストリガの定義を行うプロ
グラムのテンプレートのSQL3を用いる場合の記述例
のうちデータの追加が生じた場合の処理を行う部分であ
る。テンプレート901をさらに具体的に説明すると、
「create trigger insert ・・
・」はトリガ名の指定文である。「after ins
ert on ・・・」はトリガの起動タイミングの指
定文であり、この場合は・・・というテーブル上にデー
タが追加(insert)された後に起動するというこ
とを意味している。「referencing」以降の
3行で更新前を表す識別子(old as old v
alue)と更新後を表す識別子(new as ne
w value)を指定している。「for each
row」は更新を検出する範囲を示す文であり、この
場合は全ての範囲を指定することを意味している。
The template 901 shown in FIG. 9 is one of the description examples in the case of using the SQL3 of the template of the program for detecting the update of data, creating the update difference data, and defining the database trigger to be stored in the update difference table. This is a part for performing processing when data is added. More specifically explaining the template 901,
"Create trigger insert ...
・ "Is the designated sentence of the trigger name. "After ins
.. is a designation statement of the trigger activation timing, and in this case means that it is activated after data is added to the table called ... An identifier (old as old v) that indicates before update in the three lines after "referencing"
value) and an identifier (new as ne) that represents the post-update
w value) is specified. "For each
"row" is a statement indicating the range in which the update is detected, and in this case, it means to specify the entire range.

【0032】「begin」は処理定義の開始を意味
し、「insert into ext ・・・」は更
新差分テーブル104へデータを追加(保存)する指定
文であり、次の「value(・・)」以降で追加する
値を指定している。「oldvalue.・・・」は更
新対象テーブル103上に更新が発生する前のデータを
更新差分テーブル104へ保存することを意味し、「n
ew value.・・・」は更新対象テーブル103
上に更新が発生した後のデータを更新差分テーブル10
4へ保存することを意味している。「current
timestamp,」は更新順序を識別するために更
新の発生した時間を追加することを意味している。「’
I’」は更新種別を表す値を追加することを意味してい
る。更新種別としては、追加(insert)の場合は
「I」、変更(update)の場合は「U」、削除
(delete)の場合は「D]を用いる。また、テン
プレート901中の「%TABLE」および「%ITE
M」の部分はそれぞれ更新差分データ抽出を行うテーブ
ルおよびデータ項目が決定するまで記述することのでき
ない未定義部分を示すタグである。
“Begin” means the start of the process definition, and “insert into ext ...” is a designation statement for adding (saving) data to the update difference table 104, and the next “value (...)”. The value to be added later is specified. “Oldvalue ...” means that the data before the update occurs in the update target table 103 is stored in the update difference table 104, and “n
ew value. ... "is the update target table 103
The data after the update occurs on the update difference table 10
It means saving to 4. "Current
"timestamp," means that the time when the update occurs is added to identify the update order. "'
"I '" means to add a value indicating the update type. As the update type, “I” is used for addition (insert), “U” is used for change (update), and “D” is used for deletion (delete), and “% TABLE” in the template 901 is used. And "% ITE
The "M" portion is a tag indicating an undefined portion that cannot be described until the table and the data item for which the update difference data extraction is performed are determined.

【0033】タグ展開ステップ601が、上記テーブル
名が決定するまで未定義の「%TABLE」タグの示す
部分を702に記憶されたテーブル名「employe
e」を用いて、上記データ項目が決定するまで未定義の
「%ITEM」タグの示す部分を704に記憶されたデ
ータ項目定義「name」,「address」を用い
て、それぞれ展開することによってテンプレート901
を完成させて902に示すプログラム例を自動的に作成
する。テンプレート901はデータの追加が生じた場合
の処理を行う部分であるが、データの変更(updat
e)や削除(delete)が発生した場合の処理を行
うプログラムも同様の手順で作成する。
In the tag expansion step 601, the portion indicated by the undefined "% TABLE" tag is stored in 702 until the table name is determined, and the table name "employe" is stored.
The template is created by expanding the part indicated by the undefined “% ITEM” tag using the data item definitions “name” and “address” stored in 704 until the above data item is determined using “e”. 901
Is completed and the example program shown in 902 is automatically created. The template 901 is a part that performs processing when data is added, but data modification (updat
A program for performing processing when e) or deletion occurs is created in the same procedure.

【0034】テンプレート1001は更新差分テーブル
104から更新差分データを抽出し、その後抽出済みの
更新差分データを削除するプログラムのテンプレートの
SQL3による記述例である。また、テンプレート10
01中の「select *from ext ・・
・」は更新差分テーブル104から更新差分データを読
み出すことを示しており、「delete ext %
TABLE」は更新差分テーブル104上の更新差分デ
ータを削除することを示している。「%TABLE」は
更新差分データ抽出を行うテーブルが決定するまで未定
義の部分を示すタグである。タグ展開ステップ601に
よって上記テーブル名が決定するまで未定義の「%TA
BLE」タグの示す部分を702に記憶されたテーブル
名「employee」を用いて展開することによりテ
ンプレート1001を完成させて1002に示すプログ
ラム例を自動的に作成する。
The template 1001 is an example of description in SQL3 of a template of a program for extracting update difference data from the update difference table 104 and then deleting the extracted update difference data. Also, the template 10
“Select * from ext ...
"" Indicates that the update difference data is read from the update difference table 104, and "delete ext%"
“TABLE” indicates that the update difference data on the update difference table 104 is deleted. “% TABLE” is a tag indicating an undefined portion until the table for extracting the update difference data is determined. Until the table name is determined by the tag expansion step 601, the undefined "% TA
The template 1001 is completed by expanding the portion indicated by the “BLE” tag using the table name “employee” stored in 702, and the program example shown in 1002 is automatically created.

【0035】タグ展開ステップ601によってプログラ
ム1002が作成されると、データベース上で実行する
必要のあるプログラム802,902についてはデータ
ベース401上で実行され、登録される(プログラム実
行ステップ602)。プログラム802,902をデー
タベース401上で実行した後、例えばデータベースに
付属するアプリケーションプログラムを用い、更新差分
データ抽出を行うプログラム1002を実行し更新差分
データ抽出を行う。なお、上記のテンプレートは単に一
例であり、これらに限定されるものではない。
When the program 1002 is created by the tag expansion step 601, the programs 802 and 902 that need to be executed on the database are executed on the database 401 and registered (program execution step 602). After executing the programs 802 and 902 on the database 401, for example, an application program attached to the database is used to execute the program 1002 for extracting the update difference data to extract the update difference data. Note that the above template is merely an example, and the present invention is not limited to these.

【0036】[0036]

【発明の効果】本発明によると、差分データ抽出手順を
記述する更新差分データ抽出プログラムの作成のために
必要な利用者の作業は、選択実行部405によりメニュ
ーとして表示されるテーブル名およびデータ項目を選択
するだけであり、従来の方法で必要であったデータベー
スの持つデータベーストリガ機能や汎用プログラミング
言語を用いプログラムを作成するために要していた多大
な時間と人手の負荷を大幅に削減できるという顕著な効
果がある。
According to the present invention, the user's work required for creating the updated differential data extraction program that describes the differential data extraction procedure is the table name and data items displayed as a menu by the selection execution unit 405. By simply selecting, it is possible to greatly reduce the enormous amount of time and labor required to create a program using the database trigger function and general-purpose programming language of the database required by the conventional method. It has a remarkable effect.

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

【図1】従来の技術を説明するための図である。FIG. 1 is a diagram for explaining a conventional technique.

【図2】更新差分データについて説明するための図であ
る。
FIG. 2 is a diagram for explaining update difference data.

【図3】プログラムのテンプレートについて説明するた
めの図である。
FIG. 3 is a diagram for explaining a template of a program.

【図4】実施例を示す構成図である。FIG. 4 is a configuration diagram showing an embodiment.

【図5】選択実行部における処理フローチャートであ
る。
FIG. 5 is a processing flowchart in a selection execution unit.

【図6】プログラム自動作成実行部における処理フロー
チャートである。
FIG. 6 is a process flowchart in a program automatic creation execution unit.

【図7】テーブル名メニュー(一覧)およびデータ項目
メニュー(一覧)からそれぞれテーブル名およびデータ
項目を選択する動作を説明する図である。
FIG. 7 is a diagram illustrating an operation of selecting a table name and a data item from a table name menu (list) and a data item menu (list), respectively.

【図8】更新差分テーブル104を作成するプログラム
のテンプレートとそのテンプレートを完成させたプログ
ラムを示す図である。
FIG. 8 is a diagram showing a template of a program that creates an update difference table 104 and a program that completes the template.

【図9】データベーストリガ機能が更新対象テーブル1
03上のデータの更新を検出した場合に行う処理のプロ
グラムを示す図である。
FIG. 9 is a table 1 for updating the database trigger function.
It is a figure which shows the program of the process performed when the update of the data on 03 is detected.

【図10】更新差分テーブル104に保存された更新差
分データを読み出し、一度読み出されたデータが次回以
降に読み出されないように削除するプログラムのテンプ
レートとそのテンプレートを完成させたプログラムを示
す図である。
FIG. 10 is a diagram showing a template of a program for reading the update difference data stored in the update difference table 104, and deleting the read-out data so that the read-out data will not be read next time and the program that completes the template. is there.

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

101:アプリケーションプログラム、102:更新差
分データ抽出部、103:更新対象テーブル、104:
更新差分テーブル、105:更新差分データ作成部、1
06:更新差分データ抽出プログラム、401:データ
ベース、402:表示装置、403:入力装置、40
4:一時記憶装置、405:選択実行部、406:プロ
グラム自動作成実行部、407〜409:テンプレー
ト。
101: application program, 102: update difference data extraction unit, 103: update target table, 104:
Update difference table, 105: Update difference data creation unit, 1
06: update difference data extraction program, 401: database, 402: display device, 403: input device, 40
4: Temporary storage device, 405: Selection execution unit, 406: Program automatic creation execution unit, 407 to 409: Template.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 データベーストリガ機能を有するデータ
ベース管理システムで管理されたデータベースにおい
て、 差分データ抽出手順(差分データ抽出プログラム)をデ
ータベース上に定義されているテーブル名およびデータ
項目定義を用いて対話的に完成することを特徴とする更
新差分データ抽出プログラム作成方法。
1. In a database managed by a database management system having a database trigger function, a differential data extraction procedure (differential data extraction program) is interactively used by using a table name and data item definition defined on the database. A method for creating an update difference data extraction program characterized by being completed.
【請求項2】 更新差分データを抽出するための機能の
骨子であるテンプレートを予め作成し、 更新対象となるデータベース上に定義されているテーブ
ル名およびデータ項目定義を該データベースから読み出
し、 該テーブル名およびデータ項目定義情報を視覚的に編集
することで、選択可能なメニューを作成して表示し、 該表示されたメニューから必要なテーブル名とデータ項
目定義を選択し、 該選択したテーブル名とデータ項目定義を、上記テンプ
レートにパラメタとして組み込み、 該テンプレートに従って更新差分データ抽出手順(差分
データ抽出プログラム)を作成することを特徴とする更
新差分データ抽出プログラム作成方法。
2. A template, which is a skeleton of a function for extracting update difference data, is created in advance, and a table name and a data item definition defined on the database to be updated are read from the database, and the table name And by visually editing the data item definition information, a selectable menu is created and displayed, and the required table name and data item definition are selected from the displayed menu, and the selected table name and data are selected. A method for creating an update difference data extraction program, characterized in that the item definition is incorporated into the template as a parameter and an update difference data extraction procedure (difference data extraction program) is created according to the template.
【請求項3】 更新対象であるデータベース手段(40
1)と、 選択可能なテーブル名およびデータ項目定義のメニュー
を表示する表示手段(402)と、 該表示手段(402)に表示されたメニューから必要な
テーブル名とデータ項目定義を選択させる入力手段(4
03)と、 未定義のテーブル名またはデータ項目名を含む未完成の
更新差分データ抽出手順を記述する複数のテンプレート
手段(407〜409)と、 該入力手段(403)による選択の結果得られたテーブ
ル名とデータ項目定義によって前記複数のテンプレート
手段(407〜409)を完成し更新差分データ抽出手
順を生成し、該更新差分データ抽出手順を前記データベ
ース手段(401)に対して実行し、登録する手段(プ
ログラム自動作成実行部406)と、を具備することを
特徴とする差分データ抽出プログラム作成装置。
3. Database means (40) to be updated
1), a display means (402) for displaying a menu of selectable table names and data item definitions, and an input means for selecting a necessary table name and data item definition from the menu displayed on the display means (402). (4
03), a plurality of template means (407 to 409) describing the unfinished update difference data extraction procedure including the undefined table name or data item name, and the selection result by the input means (403). The plurality of template means (407 to 409) are completed by the table name and the data item definition, an update difference data extraction procedure is generated, and the update difference data extraction procedure is executed and registered in the database means (401). Means (program automatic creation execution unit 406), and a difference data extraction program creation device characterized by the above-mentioned.
JP7238126A 1995-09-18 1995-09-18 Method for generating update difference data extraction program and device therefor Pending JPH0981427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7238126A JPH0981427A (en) 1995-09-18 1995-09-18 Method for generating update difference data extraction program and device therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7238126A JPH0981427A (en) 1995-09-18 1995-09-18 Method for generating update difference data extraction program and device therefor

Publications (1)

Publication Number Publication Date
JPH0981427A true JPH0981427A (en) 1997-03-28

Family

ID=17025572

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7238126A Pending JPH0981427A (en) 1995-09-18 1995-09-18 Method for generating update difference data extraction program and device therefor

Country Status (1)

Country Link
JP (1) JPH0981427A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6033777A (en) * 1996-11-20 2000-03-07 Thomas Josef Heimbach Gmbh Melt-extruded monofilament
JP2012234563A (en) * 2004-11-08 2012-11-29 Innopath Software Inc Static file system differencing and updating
CN104021219A (en) * 2014-06-23 2014-09-03 东莞市西奥计算机智能科技有限公司 Method and device for generating data template

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6033777A (en) * 1996-11-20 2000-03-07 Thomas Josef Heimbach Gmbh Melt-extruded monofilament
JP2012234563A (en) * 2004-11-08 2012-11-29 Innopath Software Inc Static file system differencing and updating
CN104021219A (en) * 2014-06-23 2014-09-03 东莞市西奥计算机智能科技有限公司 Method and device for generating data template
CN104021219B (en) * 2014-06-23 2017-07-21 广东西奥物联网科技股份有限公司 The generation method and device of a kind of data template

Similar Documents

Publication Publication Date Title
US7219104B2 (en) Data cleansing
US6407753B1 (en) System and method for integrating entities via user-interactive rule-based matching and difference reconciliation
US5799193A (en) Scenario based iterative method for development of an object oriented system model
US20080288242A1 (en) System And Method Of Presentation of Multilingual Metadata
JPH0855019A (en) Visual programming method
US8423564B1 (en) Methods and apparatus for managing and updating stored information
EP2043013A1 (en) Data mapping document design system
US20090228794A1 (en) Business specification comprehension assistance system and method
JPH0981427A (en) Method for generating update difference data extraction program and device therefor
JP3484440B2 (en) Distributed database update method
CN114969085A (en) Method and system for algorithm modeling based on visualization technology
JP2001265760A (en) Device and method for managing document history
CN111752927A (en) Clone-based data form generation method, device, terminal equipment and medium
JP3245047B2 (en) Version control apparatus and method
JPH05257765A (en) Database management system
JPH056291A (en) Method for preparing and managing test resources
JPH0668183A (en) Design supporting device
JPH01280831A (en) Assisting method for standardization of intra-program data name
JPH10232773A (en) Job model preparing method utilizing reverse information
JP2924932B2 (en) Tree structure editing method
CN111930416A (en) Method for modifying local configuration based on database storage technology
JP2000181691A (en) Program structure analysis system
JPH08221264A (en) Supporting system for preparing program
CN111767286A (en) Data mirror image backup method, test method and system based on order
JP2003337726A (en) Database access program forming method