JP4152107B2 - Database update information reflection system and program therefor - Google Patents

Database update information reflection system and program therefor Download PDF

Info

Publication number
JP4152107B2
JP4152107B2 JP2002007803A JP2002007803A JP4152107B2 JP 4152107 B2 JP4152107 B2 JP 4152107B2 JP 2002007803 A JP2002007803 A JP 2002007803A JP 2002007803 A JP2002007803 A JP 2002007803A JP 4152107 B2 JP4152107 B2 JP 4152107B2
Authority
JP
Japan
Prior art keywords
record
update
update information
updated
name
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.)
Expired - Lifetime
Application number
JP2002007803A
Other languages
Japanese (ja)
Other versions
JP2003208346A (en
Inventor
和英 佐藤
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2002007803A priority Critical patent/JP4152107B2/en
Publication of JP2003208346A publication Critical patent/JP2003208346A/en
Application granted granted Critical
Publication of JP4152107B2 publication Critical patent/JP4152107B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明はネットワークデータベース(NDB)のデータ更新内容をリレーショナルデータベース(RDB)へ反映するデータベース更新情報の反映システムそのためのプログラムに関する。
【0002】
【従来の技術】
ビジネスにおいて通常の取引により発生するデータは、日毎等にまとめて基幹系のデータベースへ登録されることが一般的に行われている。基幹系のホストコンピュータで利用されるDBは、一般的にはネットワークデータベース(NDB)である。
【0003】
しかし、このようなデータを利用して何らかの分析を行なう場合には、情報系のデータベースであるリレーショナルデータベース(RDB)の形式で格納されたデータの方が効率良く処理を行なえるため、NDBのデータをRDBのデータとして扱えるように反映処理を行っている。ここで、NDBとRDBの特徴を以下に記す。
【0004】
ネットワークデータベース(NDB):
レコードを階層関係を基にポインタを利用してレコード間に1対nの親子関係(網構造)を設けて管理する。階層間のレコードの親子関係をセットという仕組みで保持している。プログラム/データの論理関係/データの物理的構造を独立して定義できる。階層関係に沿って処理するため階層関係にあるレコードに対して検索、更新スピードが速く、レスポンス重視の基幹系業務向きである。
【0005】
リレーショナルデータベース(RDB):
レコードを二次元の表(テーブル)を用いて管理する。データ間の親子関係をキーでのみ表現する。各データに設けたキーを利用することにより、異なるテーブル間のデータを連携できるため、すなわちNDBと異なりレコード間の関係付けが無いため、目的に応じた柔軟な検索が可能であり、情報系業務向きである。
【0006】
このようなNDBの更新データをRDBへ反映させるとき、NDBの更新データの内容だけを見てもどのRDBテーブルと対応しているか判定できない。このため、このような階層構造であるNDBから表構造であるRDBへデータを反映させる方式として、従来、下記の3つの方式の何れかがとられていた。
【0007】
従来方式1:NDBの静態をRDBへコピーする。コピーするための専用処理プログラム、すなわちNDB側の各レコードにキーを付けて対応するRDB側のテーブル内のデータを更新するプログラムを必要とする。
【0008】
従来方式2:NDBの取引ログ(取引履歴)を利用してRDBの更新時にNDBの更新時の内容を再現してRDBへ反映する。
【0009】
従来方式3:NDBのデータがRDB内のどのアドレスに格納されているかを示す対応表(アドレステーブル)を用意し、NDBの更新ログにRDBのアドレスを付加し、RDBの反映の際にこのアドレスに従ってRDBを更新する(特開平7−244605参照)。
【0010】
【発明が解決しようとする課題】
上記従来方式によるNDBからRDBへのデータの反映処理は、次のような問題がある。従来方式1では、NDBのレコードを全て読み込んで、複写しなければならず高負荷のため1日に1度程度しか反映処理を実施できない。従来方式2では、RDBを更新する段階でNDBの更新と同様な処理を再度行わねばならず処理時間と負荷が2倍になる。従来方式3では、アドレステーブルを常に最新化し、管理しておく負担が発生する。このように、従来方式1〜3は何れもNDBからRDBへのデータの反映処理が高負荷となりもしくは長時間を要するという問題がある。
【0011】
それゆえ、本発明は上記問題を解決し、NDBにおけるデータの更新を迅速かつ効率良くRDBにおけるデータに反映させるデータベース更新情報の反映システムおよびそのためのプログラムを提供することを目的とする。
【0012】
【課題を解決するための手段】
上記問題を解決する本発明によるデータベース更新情報の反映システムは、ネットワークデータベースにおけるレコードの更新をリレーショナルデータベースに反映させるデータベース更新情報の反映システムであって、リレーショナルデータベースに更新を反映させるネットワークデータベースのレコード名を格納する反映対象テーブルと、ネットワークデータベースのレコードのレコード名と、該レコードの最上位階層から当該レコードの階層までの各識別子と、追加、変更、削除、および、出力なしの何れかの更新区分と、該レコードの更新データの情報を含む該レコードの更新情報を蓄積格納する更新情報蓄積部と、前記ネットワークデータベースに格納される各レコードの更新時に、前記反映対象テーブルに、該更新対象のレコードのレコード名に一致するものがあった場合に、前記更新情報蓄積部内に該更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在するか検索する検索手段と、前記検索手段による検索の結果、前記更新情報蓄積部に前記更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在しない場合に、該更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子を含む該レコードの更新情報を前記更新情報蓄積部に蓄積格納する更新情報蓄積手段と、前記検索手段による検索の結果、前記更新情報蓄積部に前記更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在する場合に、該更新情報蓄積部に格納された該合致するレコードの更新情報に含まれた更新区分と該更新対象のレコードの更新区分について、前者が追加または変更で後者が変更である場合には、前者の更新データを後者の更新データに更新し、前者が追加で後者が削除である場合には、前者の更新区分を出力なしに更新し、前者が変更で後者が削除である場合には、前者の更新区分を削除に更新し、前者が削除で後者が追加である場合には、前者の更新区分を変更に更新し、前者の更新データを後者の更新データに更新する、塗替処理手段と、前記蓄積手段に蓄積された前記レコードの更新情報に含まれたレコード名と前記連結識別子とから前記リレーショナルデータベース内のテーブルを特定し、該テーブルを前記レコードの更新情報で更新する更新手段と、を備えたことを特徴とする。
【0014】
上記問題を解決する本発明によるデータベース更新情報の反映プログラムは、ネットワークデータベースにおけるレコードの更新をリレーショナルデータベースに反映させるデータベース更新情報の反映システムをコンピュータによって機能させるプログラムであって、前記データベース更新情報の反映システムは、リレーショナルデータベースに更新を反映させるネットワークデータベースのレコード名を格納する反映対象テーブルと、ネットワークデータベースのレコードのレコード名と、該レコードの最上位階層から当該レコードの階層までの各識別子と、追加、変更、削除、および、出力なしの何れかの更新区分と、該レコードの更新データの情報を含む該レコードの更新情報を蓄積格納する更新情報蓄積部と、を備え、前記プログラムは、コンピュータを、前記ネットワークデータベースに格納される各レコードの更新時に、前記反映対象テーブルに、該更新対象のレコードのレコード名に一致するものがあった場合に、前記更新情報蓄積部内に該更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在するか検索する検索手段と、前記検索手段による検索の結果、前記更新情報蓄積部に前記更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在しない場合に、該更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子を含む該レコードの更新情報を前記更新情報蓄積部に蓄積格納する更新情報蓄積手段と、前記検索手段による検索の結果、前記更新情報蓄積部に前記更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在する場合に、該更新情報蓄積部に格納された該合致するレコードの更新情報に含まれた更新区分と該更新対象のレコードの更新区分について、前者が追加または変更で後者が変更である場合には、前者の更新データを後者の更新データに更新し、前者が追加で後者が削除である場合には、前者の更新区分を出力なしに更新し、前者が変更で後者が削除である場合には、前者の更新区分を削除に更新し、前者が削除で後者が追加である場合には、前者の更新区分を変更に更新し、前者の更新データを後者の更新データに更新する、塗替処理手段と、前記蓄積手段に蓄積された前記レコードの更新情報に含まれたレコード名と前記連結識別子とから前記リレーショナルデータベース内のテーブルを特定し、該テーブルを前記レコードの更新情報で更新する更新手段と、して機能させることを特徴とする
【0015】
【発明の実施の形態】
図1は本発明によるデータベース更新情報の反映システムの一実施形態の概略構成図である。図1全体に示す本発明のデータベース更新情報反映システム10は、大型のコンピュータシステム(例えば、銀行の事務センタに設置されたコンピュータ)で構成され、演算や制御を行うCPU1、キーボードやマウスやフレキシブルディスク等の入力部2、CRTやプリンタやフレキシブルディスク等の出力部3、CPU1が実行するプログラムやデータの一時記憶エリアおよびCPU1のワークエリアに用いられる内部記憶部4、必要に応じて内部記憶部4に書込まれるプログラムやデータを格納する外部記憶部5および他のコンピュータシステムに通信可能に接続され該システムとの間でプログラムやデータを送受信する通信部6を有する。
【0016】
例えば主としてRAMからなる内部記憶部4には、NDB更新処理部41、NDB更新情報蓄積部42、RDB更新処理部43等が設けられており、例えば主として磁気ディスクからなる外部記憶部5には、ネットワークデータベース(NDB)51、リレーショナルデータベース(RDB)52、RDB反映対象テーブル53、取引ログ54の各情報が格納されている。本実施形態では1つの外部記憶部5に上記4つの情報を格納するが、これらの情報はそれぞれ独立の磁気ディスク等の外部記憶装置で構成してもよい。また、本実施形態では1つの大型のコンピュータシステムで構成したが、RDB52を他のコンピュータシステムに組込み、これらのコンピュータ間を通信可能に接続した構成にしてもよい。
【0017】
NDB更新処理部41はNDB51のレコードを更新する機能を有する。NDB更新情報蓄積部42はNDB51のレコードが更新される度に最新となったレコードに関する情報、すなわちNDB更新情報を一時的に蓄積するための記憶エリアである。NDB更新情報は、通信部6を介して本発明のデータベース更新情報反映システム10に接続された他のコンピュータ(例えば、銀行の支店に設置された端末装置)から入力され、一時的にNDB更新情報蓄積部42に格納され、塗替処理(後述)等をされた後、取引ログ54へ格納される。RDB更新処理部43はNDB51のレコードの更新処理を反映してRDB52のテーブルを更新する機能を有する。
【0018】
図2は図1に示すNDB更新情報蓄積部42に蓄積されるデータであるNDB更新情報の具体例を示す図である。NDB更新情報はRDBのテーブル名、RDBのキー番号(連結識別子)、NDBの更新区分およびデータ内容を含む。ここで、NDBの更新処理は、データすなわちレコードの変更、追加または削除の何れかの処理に区分される。
【0019】
図3は図1に示すNDB51の具体例を示す図である。図3に示すNDBは、7つのレコードを3階層構造で構成されており、各レコード30、31、32、311、312および321にはレコード名およびキー番号(識別子)が付加されており、このキー番号は同一親レコードの配下の子レコード間で互いを識別可能に設定されている。
【0020】
図4の(A)はRDBのキー設定の基本形を示す図であり、図4の(B)は図3に示すNDBのレコード311に対応するRDBのキー設定を具体的に示す図である。図4の(A)に示すように、NDB内の第n階層の1つのレコードに対応するRDB内のテーブルのキー番号は、NDBの第1〜第n階層の各レコードのキー番号をひとつながりにしたもので設定される。ここで、n(整数)は当該レコードのNDBの最上位階層からの階層の深さを表す。
【0021】
図4の(B)に示すように、NDB内のレコード311に対応するRDB内のテーブルのキー番号は、NDBのレコード311の最上位階層であるレコード30からレコード311の第3階層までの各レコードのキー番号(識別子)、すなわち第1階層キー番号である001、第2階層キー番号である987、第3階層キー番号である111をひとつながりにした連結識別子001,987,111で設定される。
【0022】
図5は図1に示すRDB52から抽出されるテーブルの具体例を示す図である。図5に示す行列構成のテーブルは、テーブル名が流動性口座で、テーブルの列には口座名義、口座番号、残高、口座開設日、最終入金日等の項目(データ内容)が格納されており、各行には各列に記された項目に対応するデータが格納されていることを示す。
【0023】
図6は図1に示すRDB反映対象テーブル53の具体例を示す図である。RDB反映対象テーブルはNDB更新処理においてRDBの更新対象となるテーブル名を予めリストした表であり、このテーブル53に予めリストしたテーブル名に対応するNDB内のレコードが更新されるときにのみNDB更新情報蓄積部42にNDB更新情報が蓄積される。換言すれば、NDBに存在するレコードの中でRDBのテーブルに必要ないものは更新情報として取得しないように、このテーブルにRDB反映対象レコードを予め定義しておく。
【0024】
なお、NDBのレコード名とRDBのテーブル名は、テーブルの特定を容易にするため同一名称を使用する。
【0025】
図1に示す取引ログ54はコンピュータのシステム状態を示すデータを記録したデータリカバリ用のHLF(Historical Log File)に付加して記録される取引の履歴を示すデータである。このデータ、すなわち図2に示すNDB更新情報は、取引毎に内部記憶部4のNDB更新情報蓄積部42から外部記憶部5内の取引ログ54に書出され、例えば数10分から1時間毎の周期でRDB更新処理のため外部記憶部5内の他の磁気ディスクに転送される。
【0026】
RDB52の更新では、所定の周期、例えば数10分から1時間毎に、RDB更新処理部43を介して取引ログ54内の更新情報のRDBのテーブル名、RDBのキー番号(連結識別子)をそのまま検索キーとして該当RDBテーブルを判定し、NDBの更新区分(変更/追加/削除)に沿ったNDBのデータ内容のRDB52への反映処理を行う。
【0027】
次に、本発明によるNDBのデータ更新をRDBへ反映させる反映処理について以下に詳細に説明する。
【0028】
図7は本発明によるNDB更新処理のフローチャートである。前述したようにNDB更新情報は、RDBのテーブル名、RDBのキー番号(連結識別子)、NDBの更新区分およびデータ内容を含み、NDBのレコードの更新時に図示しないワークエリアに一時的に蓄積されている。
【0029】
NDBのレコードの更新時に、図6に示すようなRDB反映対象テーブル53を検索して(ステップS1)、ワークエリアに一時的に格納されている今回更新するレコードがテーブル内のレコードに一致したときにのみ、今回更新するレコードのNDB更新情報を蓄積対象として、NDB更新情報蓄積部42に格納する(ステップS2)。
【0030】
次に、1取引内(1つの取引ログ)で、NDB更新情報蓄積部42に格納した今回のNDB更新情報がすでに蓄積されている情報か否か、すなわち同一レコードが複数回更新されたか否かを判定し(ステップS3)、YESと判定された場合には、塗替対象の情報と判定して塗替処理を実行し(ステップS4)、塗替後の情報を取引ログ54へ書出す(ステップS5)。一方NOと判定された場合には、今回のNDB更新情報を蓄積情報として取引ログ54の最後に書込む(ステップS6)。このように、1取引内で同一レコードが複数回更新された場合には最後の更新情報のみを有効とする。次に、塗替処理を以下に説明する。
【0031】
図8は本発明による塗替パターンを説明するための図である。NDB更新情報蓄積部42内のNDB更新情報を塗替処理する時に、今回蓄積するNDB更新情報であるRDBのテーブル名およびキー番号(連結識別子)が、既にNDB更新情報蓄積部42に蓄積されているNDB更新情報であるRDBのテーブル名、キー番号(連結識別子)に合致するか否かを、最新の蓄積情報から古い方へと順に検索して調べ、同一のテーブル名、キー番号(連結識別子)をもつNDB更新情報がNDB更新情報蓄積部42内に存在していれば、今回蓄積するNDB更新情報を合致更新情報と判定し、塗替対象とする。この処理は図7のステップS3に相当する。この判定結果がYESのとき塗替処理を行い、判定結果がNOのとき塗替処理を行わずNDB更新情報蓄積部42内にすでに蓄積されているNDB更新情報の後に今回蓄積するNDB更新情報、すなわちRDBのテーブル名、RDBのキー番号(連結識別子)、NDBの更新区分およびデータ内容を書込む。以下、図8を参照して本発明による塗替処理を説明する。
【0032】
図8に示すパターンを説明するための図において、最も左側の列には塗替パターンの番号が、その右側の列には、順に前回更新情報、今回更新情報および塗替後更新情報が示されている。前回更新情報、今回更新情報および塗替後更新情報の各々には、更新区分およびデータが示されている。前回更新情報および今回更新情報は、共に前述の塗替対象と判定された合致更新情報である。塗替後更新情報は、後にRDB反映処理を要する情報であり、この情報のみが図1に示すNDB更新情報蓄積部42から取引ログ54へ転送される。前回更新情報、今回更新情報および塗替後更新情報は、取引ログ54への書出し後にオールクリアされる。
【0033】
NDB更新情報の塗替処理(最終更新情報のみを残す手法)は、順序性を意識して下記の具体的塗替パターン1〜5に示す要領で行う。
【0034】
塗替パターン1:前回更新情報の更新区分が追加で、今回更新情報の更新区分が変更の場合、塗替後更新情報の更新区分は追加とする。これは、取引ログ54の書出し後にオールクリアされたNDB更新情報蓄積部42に、レコードが追加された後に同一レコードのデータを今回変更する場合を示している。それゆえ塗替後更新情報は、次回のRDB反映処理では追加の更新処理を行い、レコードの最新データが前回更新情報のXXXXXXでなく今回更新情報のYYYYYYであることを示す。
【0035】
塗替パターン2:前回更新情報の更新区分が追加で、今回更新情報の更新区分が削除の場合、塗替後更新情報は出力なしとする。これは、取引ログ54の書出し後にオールクリアされたNDB更新情報蓄積部42に、レコードが追加された後に同一レコードのデータを今回削除する場合を示している。それゆえ塗替後更新情報は、次回のRDB反映処理では何も実行する必要がないことを示し、更新区分およびレコードのデータは共に出力されない。
【0036】
塗替パターン3:前回更新情報の更新区分が変更で、今回更新情報の更新区分が変更の場合、塗替後更新情報は変更とする。これは、取引ログ54の書出し後にオールクリアされたNDB更新情報蓄積部42に、レコードが変更された後に同一レコードのデータを今回更に変更する場合を示している。それゆえ塗替後更新情報は、次回のRDB反映処理でも変更の更新処理を行い、レコードの最新データが前回更新情報のXXXXXXでなく今回更新情報のYYYYYYであることを示す。
【0037】
塗替パターン4:前回更新情報の更新区分が変更で、今回更新情報の更新区分が削除の場合、塗替後更新情報は削除とする。これは、取引ログ54の書出し後にオールクリアされたNDB更新情報蓄積部42に、レコードが変更された後に同一レコードのデータを今回削除する場合を示している。それゆえ塗替後更新情報は、次回のRDB反映処理では削除の更新処理を行い、レコードの最新データが前回更新情報および今回更新情報共にXXXXXXであることを示している。次回のRDB反映処理時に当該レコードに対応するRDBのテーブルおよびそのデータXXXXXXは共に削除される。
【0038】
塗替パターン5:前回更新情報の更新区分が削除で、今回更新情報の更新区分が追加の場合、塗替後更新情報は変更とする。これは、取引ログ54の書出し後にオールクリアされたNDB更新情報蓄積部42に、レコードが削除された後に同一レコードのデータを今回追加する場合を示している。それゆえ塗替後更新情報は、次回のRDB反映処理では変更の更新処理を行い、レコードの最新データが前回更新情報のXXXXXXでなく今回更新情報のYYYYYYであることを示す。
【0039】
以上、図8を用いて1つの取引で2回のNDB更新処理を行った場合を例に挙げて塗替処理を説明したが、1つの取引で複数回のNDB更新処理を行った場合も同様に、塗替処理が行われる。
【0040】
このように、図8に示した塗替パターンに従って塗替処理を行うことにより、RDB反映時に不必要なデータの更新をなくすことができ、処理時間を短縮できる。なお、図8に示した説明図に準ずるような判定テーブルを内部記憶部4に保持しておいてもよいし、プログラムに図8のような判定をさせるための処理を記述しておいても構わない。
【0041】
最後にRDBの更新処理を説明する。
【0042】
図9は本発明によるRDB更新処理のフローチャートである。RDBの更新処理では、取引ログ54内に格納されたNDB更新情報であるRDBのテーブル名およびキー番号(連結識別子)をそのまま検索キーとして該当RDBテーブルを検索し(ステップS11)、検索したRDBテーブルに対してNDB更新情報の更新区分(変更/追加/削除)を判定し(ステップS12)、その判定に沿った反映処理、すなわちRDBのデータの更新処理(ステップS13)を行う。
【0043】
次に、図10〜12を参照して図1に示す本発明によるデータベース更新情報の反映システムを用いてNDBのデータ更新内容をRDBへ反映する具体例を以下に説明する。
【0044】
図10はオンライン上のNDBの具体例を示す図である。図10に示されるNDB151は銀行の預金通帳に関し、3段の階層構造を有する。最上位の第1階層に顧客情報のレコードが、第2階層に流動性(普通)口座および定期性口座のレコードが、第3階層に流動性口座の取引明細のレコードが示されている。各レコードには、レコード名および識別子が設定されている。顧客情報のレコードの識別子には顧客番号が、流動性(普通)口座および定期性口座のレコードの識別子には口座番号が、流動性口座または定期性口座の取引明細のレコードの識別子には明細番号が、それぞれ同一親レコードの配下で一意に登録されている。各レコードはそれぞれ最新のデータ内容(図示せず)を有する。
【0045】
次に、1取引で、流動性口座の取引明細のレコード81を変更し、破線で囲んで示す定期性口座のレコード82を新たに追加するNDB更新処理を行う場合を想定し、この更新をRDBに反映する具体例を以下に説明する。なお、定期性口座のレコード82が破線で示されているのは、NDB更新処理前には存在していなかったからである。
【0046】
図11は取引ログ154の具体例を示す図である。図11に示すように、図10に示すNDB151の1取引の取引ログには、第1番目(上段)に、流動性口座の取引明細のレコード81の更新情報として、状態の欄に更新の区分が変更であることが示され、レコード名にTORIMEISが示され、第1階層に顧客情報レコードの識別子である識別子0000000001、第2階層に流動性口座レコードの識別子である識別子0000000010、第3階層にレコード81の識別子である識別子00001が示されており、第2番目(下段)に、定期性口座のレコード82の更新情報として、状態の欄に更新の区分が追加であることが示され、レコード名にTEIKIKOZが示され、第1番目の取引ログと同様に第1階層に識別子0000000001、第2階層に識別子0000000010が示されている。
【0047】
この取引ログに示されたNDB更新をRDBに反映するには、取引ログにおける第1番目の更新レコード81の更新区分が変更であるので、流動性口座の取引明細のレコード81のレコード名であるTORIMEISと同一名称のテーブル名を有し、連結識別子が0000000001,0000000010,00001であるテーブルをRDB内で検索し、検索されたテーブルのデータをレコード81のデータで変更する。次に、取引ログにおける第2番目の更新レコード82の更新区分が追加であるので、定期性口座のレコード82のレコード名であるTEIKIKOZと同一名称のテーブル名を有し、連結識別子が0000000001,0000000010であるテーブルをRDB内に新たに生成し、生成したテーブルのデータにレコード82のデータを書込む。
【0048】
図12は図11に示す取引ログがRDBに反映されるときの図10に示すNDBに対応するRDBの状態を示す図であり、(A)は反映前のRDBの状態を示す図であり、(B)は反映後のRDBの状態を示す図である。図12の(A)および(B)に示されているように、RDBにはSQLにより抽出可能なテーブル名がKOKYAKUJ、RYUDOKOZ、TORIMEISおよびTEIKIKOZの4つのテーブルが格納されている。各テーブルには、キー番号の欄に、NDB内で同一レコード名を有するレコードの最上位階層のレコードの識別子から当該レコードの識別子までをひとつながりにしたキー番号(連結識別子)が格納され、データ内容の欄に、当該レコードのデータ内容が格納されている。
【0049】
図12の(A)に示されるように、反映前のRDBには、テーブル名がKOKYAKUJのテーブル、テーブル名がRYUDOKOZのテーブルおよびテーブル名がTORIMEISのテーブルに、それぞれ2つのキー番号(連結識別子)とそれらのデータ内容が格納されており、テーブル名がTEIKIKOZのテーブルに1つのキー番号(連結識別子)とそのデータ内容が格納されている。テーブル名がRYUDOKOZおよびTEIKIKOZのテーブルのデータ内容は、例えば図5に示すような口座名義、口座番号、残高、口座開設日および最終入金日等であり、テーブル名がTORIMEISのテーブルのデータ内容は、入金または出金の区分け、取引金額、取引日および取引時刻等である。
【0050】
図12の(B)に示されるように、反映後のRDBには、テーブル名がKOKYAKUJのテーブル、テーブル名がRYUDOKOZのテーブル、テーブル名がTORIMEISのテーブルおよびテーブル名がTEIKIKOZのテーブルに、それぞれ2つのキー番号(連結識別子)とそれらのデータ内容が格納されている。反映前のRDBと異なるところは、テーブル名がTORIMEISのテーブルにおいて、参照番号101で示す1つのキー番号(連結識別子)0000000001,0000000010,00001の反映前のデータ内容が参照番号102で示す同一キー番号(連結識別子)の反映後のデータ内容に変更され、かつテーブル名がTEIKIKOZのテーブルに、参照番号103で示す1つのキー番号(連結識別子)0000000001,0000000010とそのデータ内容が追加されたことである。
【0051】
(付記1) ネットワークデータベースにおけるレコードの更新をリレーショナルデータベースに反映させるデータベース更新情報の反映システムにおいて、
前記ネットワークデータベースに階層構造で格納される各レコードに対し、レコード名と、同一親レコードの子レコードが互いに識別可能となるような識別子とを設定する手段と、
前記レコードの更新毎に、更新するレコードに対応する前記レコード名および前記レコードの最上位階層から当該レコードの階層までの各識別子を含む該レコードの更新情報を蓄積する蓄積手段と、
前記リレーショナルデータベースに表構造で格納される各テーブルに対し、前記レコード名に対応するテーブル名および前記レコードの最上位階層から当該レコードの階層までの各識別子をひとつながりにした連結識別子を設定する手段と、
所定の周期で、前記テーブル名と前記連結識別子とから前記リレーショナルデータベース内のテーブルを特定し、該テーブルを前記レコードの更新情報で更新する手段と、
を備えたことを特徴とするデータベース更新情報の反映システム。
【0052】
(付記2) 前記蓄積手段は、予め設定したリレーショナルデータベースへの更新対象のレコードに対してのみ該レコードの更新時のデータを蓄積する、請求項1に記載のデータベース更新情報の反映システム。
【0053】
(付記3) 前記蓄積手段は、前記レコードの更新毎に、今回更新対象のレコードが前記蓄積手段に蓄積されたレコード内に有るか無いかを判定し、有ると判定されたときは該レコードの最新のデータを蓄積し、無いと判定されたときは今回更新対象のレコードのデータを蓄積する、請求項1または2に記載のデータベース更新情報の反映システム。
【0054】
(付記4) 前記蓄積手段は、前記蓄積されたレコード内に今回更新対象のレコードが有るか無いかの判定を、該今回更新対象のレコードの前記レコード名および前記連結識別子が前記蓄積された各レコードの前記レコード名および前記連結識別子に一致するか否かにより判定する、請求項3に記載のデータベース更新情報の反映システム。
【0055】
(付記5) 前記最新のデータは、今回更新対象のレコードの更新区分と該レコードに一致した前記蓄積されたレコード内のレコードの更新区分とに応じて決定される、請求項4に記載のデータベース更新情報の反映システム。
【0056】
(付記6) 前記テーブル名は、前記レコード名と同一名称である、付記1乃至5の何れか一つに記載のデータベース更新情報の反映システム。
【0057】
(付記7) ネットワークデータベースにおけるレコードの更新をリレーショナルデータベースに反映させるデータベース更新情報の反映システムを、
前記ネットワークデータベースに階層構造で格納される各レコードに対し、レコード名と、同一親レコードの子レコードが互いに識別可能となるような識別子とを設定する手段と、
前記レコードの更新毎に、更新するレコードに対応する前記レコード名および前記レコードの最上位階層から当該レコードの階層までの各識別子を含む該レコードの更新情報を蓄積する蓄積手段と、
前記リレーショナルデータベースに表構造で格納される各テーブルに対し、前記レコード名に対応するテーブル名および前記レコードの最上位階層から当該レコードの階層までの各識別子をひとつながりにした連結識別子を設定する手段と、
所定の周期で、前記テーブル名と前記連結識別子とから前記リレーショナルデータベース内のテーブルを特定し、該テーブルを前記レコードの更新情報で更新する手段と、
して機能させるためのプログラムを備えたことを特徴とするデータベース更新情報の反映プログラム。
【0058】
【発明の効果】
以上説明したように、本発明のデータベース更新情報の反映システムおよびそのためのプログラムによれば、計算機負荷が少なくデータベース更新情報の反映処理を簡素化したので、基幹系データベース(ネットワークデータベース:NDB)のデータ更新内容を迅速かつ効率的に情報系データベース(リレーショナルデータベース:RDB)に反映することができる。
【0059】
本発明によれば、データベース更新情報の反映処理時間を短縮でき、それゆえ頻繁に更新処理ができるようになる。具体的には従来日毎にNDBの情報をRDBに反映していたが、本発明では数十分から1時間毎に最新情報が反映可能となるので、RDBの情報の鮮度が高くなり経営分析等の利用に有効となる。
【0060】
また、本発明によれば、NDBの更新データの内でRDBに反映する必要のない更新データを排除する構成を設けたので、効率的なデータ反映が可能となる。
【図面の簡単な説明】
【図1】本発明によるデータベース更新情報の反映システムの一実施形態の概略構成図である。
【図2】図1に示すNDB更新情報蓄積部42に蓄積されるデータであるNDB更新情報の具体例を示す図である。
【図3】図1に示すNDB51の具体例を示す図である。
【図4】(A)はRDBのキー設定の基本形を示す図であり、(B)は図3に示すNDBのレコード311に対応するRDBのキー設定を具体的に示す図である。
【図5】図1に示すRDB52から抽出されるテーブルの具体例を示す図である。
【図6】図1に示すRDB反映対象テーブル53の具体例を示す図である。
【図7】本発明によるNDB更新処理のフローチャートである。
【図8】本発明による塗替パターンを説明するための図である。
【図9】本発明によるRDB更新処理のフローチャートである。
【図10】オンライン上のNDBの具体例を示す図である。
【図11】取引ログの具体例を示す図である。
【図12】図11に示す取引ログがRDBに反映されるときの図10に示すNDBに対応するRDBの状態を示す図であり、(A)は反映前のRDBの状態を示す図であり、(B)は反映後のRDBの状態を示す図である。
【符号の説明】
1…CPU
2…入力部
3…出力部
4…内部記憶部
5…外部記憶部
6…通信部
10…データベース更新情報反映システム
41…NDB更新処理部
42…NDB更新情報蓄積部
43…RDB更新処理部
51,151…ネットワークデータベース(NDB)
52…リレーショナルデータベース(RDB)
53…RDB対象テーブル
54,154…取引ログ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a database update information reflection system for reflecting data update contents of a network database (NDB) in a relational database (RDB), and a program therefor.
[0002]
[Prior art]
In general, data generated by ordinary transactions in a business is generally registered daily in a basic database. The DB used in the backbone host computer is generally a network database (NDB).
[0003]
However, when performing some kind of analysis using such data, data stored in the relational database (RDB) format, which is an information database, can be processed more efficiently. Is reflected so that it can be handled as RDB data. Here, the features of NDB and RDB are described below.
[0004]
Network database (NDB):
Records are managed by providing a one-to-n parent-child relationship (network structure) between records using pointers based on hierarchical relationships. The parent-child relationship of records between hierarchies is maintained by a mechanism called a set. Program / data logical relationship / data physical structure can be defined independently. Since processing is performed in accordance with the hierarchical relationship, search and update speed is fast for records in the hierarchical relationship, and it is suitable for mission-critical tasks that emphasize response.
[0005]
Relational database (RDB):
Records are managed using a two-dimensional table. Express parent-child relationships between data only with keys. By using the keys provided for each data, data between different tables can be linked, that is, unlike NDB, there is no relationship between records, so flexible search according to the purpose is possible and information system work The direction.
[0006]
When such NDB update data is reflected in the RDB, it is impossible to determine which RDB table corresponds to only the content of the NDB update data. For this reason, conventionally, one of the following three methods has been adopted as a method for reflecting data from an NDB having a hierarchical structure to an RDB having a table structure.
[0007]
Conventional method 1: Copy the static state of NDB to RDB. A dedicated processing program for copying, that is, a program for updating the data in the corresponding RDB table by attaching a key to each record on the NDB side is required.
[0008]
Conventional method 2: The NDB transaction log (transaction history) is used to reproduce the contents at the time of updating the RDB and reflect them in the RDB.
[0009]
Conventional method 3: A correspondence table (address table) indicating the address in which the NDB data is stored in the RDB is prepared, the RDB address is added to the update log of the NDB, and this address is used when the RDB is reflected. The RDB is updated according to the above (refer to JP-A-7-244605).
[0010]
[Problems to be solved by the invention]
The process of reflecting data from the NDB to the RDB by the conventional method has the following problems. In the conventional method 1, all the records in the NDB must be read and copied, and the reflection process can be performed only once a day due to high load. In the conventional method 2, processing similar to NDB update must be performed again at the stage of updating RDB, and the processing time and load are doubled. In the conventional method 3, there is a burden of constantly updating and managing the address table. As described above, all of the conventional methods 1 to 3 have a problem that the processing of reflecting data from the NDB to the RDB becomes heavy or takes a long time.
[0011]
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to solve the above-described problems and provide a database update information reflecting system and a program therefor for reflecting data updating in NDB to data in RDB quickly and efficiently.
[0012]
[Means for Solving the Problems]
A database update information reflecting system according to the present invention that solves the above problem is a database update information reflecting system that reflects a record update in a network database in a relational database. A reflection target table for storing the record name of the network database that reflects the update in the relational database, a record name of the record of the network database, each identifier from the highest hierarchy of the record to the hierarchy of the record, An update information accumulation unit for accumulating and storing update information of the record including information on update data of the record, and any update category of addition, change, deletion, and no output; Network database Stored in Each record When there is a record that matches the record name of the record to be updated when the update target table is updated, the record name of the record to be updated and the highest hierarchy of the record are stored in the update information storage unit. Search means for searching whether there is a match with each identifier up to the hierarchy of the record, and as a result of the search by the search means, the update information storage section records the record name of the record to be updated and the top of the record The record name of the record to be updated and the record when there is no match for each identifier from the hierarchy to the hierarchy of the record Update information of the record including each identifier from the top level of the record to the level of the record In the update information storage unit Accumulation Store Do update information Storage means; As a result of the search by the search means, if there is a record that matches the record name of the record to be updated and each identifier from the highest hierarchy of the record to the hierarchy of the record in the update information storage unit, the update When the former is an addition or change and the latter is a change with respect to the update classification included in the update information of the matching record stored in the information storage unit and the update classification of the record to be updated, the former update data Is updated to the latter update data.If the former is addition and the latter is deletion, the former update classification is updated without output, and if the former is change and the latter is deletion, the former update classification is updated. If the former is a deletion and the latter is an addition, the former update classification is updated to a change, and the former update data is updated to the latter update data. Record name included in the record update information stored in the stage And the connection identifier , Identify the table in the relational database and update the table with the update information of the record update Means.
[0014]
A database update information reflecting program according to the present invention that solves the above problem is a database update information reflecting system that reflects a record update in a network database in a relational database. The database update information reflection system includes a reflection target table that stores a record name of a network database that reflects an update in a relational database, a record name of the record of the network database, and the record Update information of the record including each identifier from the highest hierarchy of the record to the hierarchy of the record, any update classification of addition, change, deletion, and no output, and update data information of the record An update information storage unit, and the program includes a computer, Network database Stored in Each record When there is a record that matches the record name of the record to be updated when the update target table is updated, the record name of the record to be updated and the highest hierarchy of the record are stored in the update information storage unit. Search means for searching whether there is a match with each identifier up to the hierarchy of the record, and as a result of the search by the search means, the update information storage section records the record name of the record to be updated and the top of the record The record name of the record to be updated and the record when there is no match for each identifier from the hierarchy to the hierarchy of the record Update information of the record including each identifier from the top level of the record to the level of the record In the update information storage unit Accumulation Store Do update information Storage means; As a result of the search by the search means, if there is a record that matches the record name of the record to be updated and each identifier from the highest hierarchy of the record to the hierarchy of the record in the update information storage unit, the update When the former is an addition or change and the latter is a change with respect to the update classification included in the update information of the matching record stored in the information storage unit and the update classification of the record to be updated, the former update data Is updated to the latter update data.If the former is addition and the latter is deletion, the former update classification is updated without output, and if the former is change and the latter is deletion, the former update classification is updated. If the former is a deletion and the latter is an addition, the former update classification is updated to a change, and the former update data is updated to the latter update data. Record name included in the record update information stored in the stage And the connection identifier , Identify the table in the relational database and update the table with the update information of the record update Function as a means It is characterized by .
[0015]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a schematic configuration diagram of an embodiment of a database update information reflection system according to the present invention. A database update information reflecting system 10 of the present invention shown in FIG. 1 as a whole is composed of a large computer system (for example, a computer installed in a bank office center), and performs a calculation and control, a CPU 1, a keyboard, a mouse, and a flexible disk. An input unit 2 such as a CRT, a printer or a flexible disk, a temporary storage area for programs and data executed by the CPU 1, and an internal storage unit 4 used for the work area of the CPU 1, and an internal storage unit 4 as required. And an external storage unit 5 for storing programs and data to be written to the computer and a communication unit 6 connected to other computer systems so as to be able to communicate with each other.
[0016]
For example, the internal storage unit 4 mainly composed of a RAM is provided with an NDB update processing unit 41, an NDB update information storage unit 42, an RDB update processing unit 43, and the like. For example, the external storage unit 5 mainly composed of a magnetic disk includes Each information of a network database (NDB) 51, a relational database (RDB) 52, an RDB reflection target table 53, and a transaction log 54 is stored. In the present embodiment, the above four pieces of information are stored in one external storage unit 5, but these pieces of information may be configured by external storage devices such as independent magnetic disks. Further, in the present embodiment, it is configured by one large computer system. However, the RDB 52 may be incorporated in another computer system, and these computers may be communicably connected.
[0017]
The NDB update processing unit 41 has a function of updating the record of the NDB 51. The NDB update information accumulation unit 42 is a storage area for temporarily accumulating information related to the latest record, that is, NDB update information, whenever a record in the NDB 51 is updated. The NDB update information is input from another computer (for example, a terminal device installed in a bank branch) connected to the database update information reflection system 10 of the present invention via the communication unit 6, and temporarily NDB update information. After being stored in the storage unit 42 and subjected to a repainting process (described later), it is stored in the transaction log 54. The RDB update processing unit 43 has a function of updating the table of the RDB 52 by reflecting the update process of the record of the NDB 51.
[0018]
FIG. 2 is a diagram showing a specific example of NDB update information that is data stored in the NDB update information storage unit 42 shown in FIG. The NDB update information includes an RDB table name, an RDB key number (concatenation identifier), an NDB update category, and data contents. Here, NDB update processing is classified into data, that is, record change, addition, or deletion.
[0019]
FIG. 3 is a diagram showing a specific example of the NDB 51 shown in FIG. The NDB shown in FIG. 3 is composed of seven records in a three-layer structure, and a record name and a key number (identifier) are added to each record 30, 31, 32, 311, 312 and 321. The key number is set so that child records under the same parent record can be distinguished from each other.
[0020]
4A is a diagram showing a basic form of RDB key setting, and FIG. 4B is a diagram specifically showing RDB key setting corresponding to the NDB record 311 shown in FIG. As shown in FIG. 4A, the key number of the table in the RDB corresponding to one record in the nth layer in the NDB is connected to the key number of each record in the first to nth layers in the NDB. Set with Here, n (integer) represents the depth of the hierarchy from the highest hierarchy of the NDB of the record.
[0021]
As shown in FIG. 4B, the key number of the table in the RDB corresponding to the record 311 in the NDB is the record number from the highest level of the record 311 in the NDB to the third level of the record 311. The key number (identifier) of the record, that is, the first hierarchy key number 001, the second hierarchy key number 987, and the third hierarchy key number 111 are connected identifiers 001, 987, 111. The
[0022]
FIG. 5 is a diagram showing a specific example of a table extracted from the RDB 52 shown in FIG. In the table of the matrix configuration shown in FIG. 5, the table name is a liquidity account, and items (data contents) such as account name, account number, balance, account opening date, and final payment date are stored in the table column. Each row indicates that data corresponding to an item described in each column is stored.
[0023]
FIG. 6 is a diagram showing a specific example of the RDB reflection target table 53 shown in FIG. The RDB reflection target table is a table in which table names that are RDB update targets in the NDB update process are listed in advance, and NDB update is performed only when a record in the NDB corresponding to the table name listed in the table 53 is updated. NDB update information is stored in the information storage unit 42. In other words, RDB reflection target records are defined in advance in this table so that records that are not necessary in the RDB table among the records existing in the NDB are not acquired as update information.
[0024]
Note that the NDB record name and the RDB table name use the same name to facilitate table identification.
[0025]
The transaction log 54 shown in FIG. 1 is data indicating a transaction history recorded in addition to a data recovery HLF (Historical Log File) in which data indicating the system state of the computer is recorded. This data, that is, the NDB update information shown in FIG. 2 is written from the NDB update information storage unit 42 of the internal storage unit 4 to the transaction log 54 in the external storage unit 5 for each transaction. The data is transferred to other magnetic disks in the external storage unit 5 for RDB update processing at periodic intervals.
[0026]
In the update of the RDB 52, the RDB table name of the update information in the transaction log 54 and the RDB key number (concatenated identifier) are directly searched through the RDB update processing unit 43 at a predetermined cycle, for example, every 10 minutes to every hour. The corresponding RDB table is determined as a key, and the process of reflecting the data content of the NDB in the RDB 52 in accordance with the update category (change / add / delete) of the NDB is performed.
[0027]
Next, a reflection process for reflecting the NDB data update in the RDB according to the present invention will be described in detail below.
[0028]
FIG. 7 is a flowchart of NDB update processing according to the present invention. As described above, the NDB update information includes the RDB table name, the RDB key number (concatenation identifier), the NDB update classification, and the data contents, and is temporarily stored in a work area (not shown) when the NDB record is updated. Yes.
[0029]
When the NDB record is updated, the RDB reflection target table 53 as shown in FIG. 6 is searched (step S1), and the record to be updated this time temporarily stored in the work area matches the record in the table. Only, the NDB update information of the record to be updated this time is stored in the NDB update information storage unit 42 as a storage target (step S2).
[0030]
Next, within one transaction (one transaction log), whether or not the current NDB update information stored in the NDB update information storage unit 42 is already accumulated, that is, whether or not the same record has been updated multiple times. (Step S3), if it is determined to be YES, it is determined that the information is to be repainted, a repainting process is executed (step S4), and the repainted information is written to the transaction log 54 ( Step S5). On the other hand, if NO is determined, the current NDB update information is written as accumulated information at the end of the transaction log 54 (step S6). Thus, when the same record is updated a plurality of times within one transaction, only the last update information is valid. Next, the repainting process will be described below.
[0031]
FIG. 8 is a view for explaining a repainting pattern according to the present invention. When the NDB update information in the NDB update information storage unit 42 is repainted, the RDB table name and key number (concatenation identifier) that are the NDB update information stored this time are already stored in the NDB update information storage unit 42. Whether or not it matches the table name and key number (concatenated identifier) of the RDB that is the NDB update information that has been stored, the latest stored information is searched in order from the oldest to check the same table name and key number (concatenated identifier). If the NDB update information having () exists in the NDB update information storage unit 42, the NDB update information stored this time is determined as the match update information, and is set as a repainting target. This process corresponds to step S3 in FIG. When the determination result is YES, the repainting process is performed, and when the determination result is NO, the repainting process is not performed, and the NDB update information accumulated this time after the NDB update information already accumulated in the NDB update information accumulation unit 42, That is, the RDB table name, RDB key number (concatenation identifier), NDB update classification, and data contents are written. The repainting process according to the present invention will be described below with reference to FIG.
[0032]
In the diagram for explaining the pattern shown in FIG. 8, the leftmost column shows the number of the repaint pattern, and the right column shows the last update information, the current update information, and the post-repaint update information in order. ing. In each of the previous update information, current update information, and post-painting update information, an update category and data are shown. Both the previous update information and the current update information are the match update information determined to be the above-described repainting target. The post-repainting update information is information that requires RDB reflection processing later, and only this information is transferred from the NDB update information storage unit 42 shown in FIG. The previous update information, current update information, and post-painting update information are all cleared after writing to the transaction log 54.
[0033]
The NDB update information repainting process (a method of leaving only the last update information) is performed in the manner shown in the following specific repaint patterns 1 to 5 in consideration of the order.
[0034]
Repainting pattern 1: When the update classification of the last update information is added and the update classification of the current update information is changed, the update classification of the post-painting update information is added. This shows a case where the data of the same record is changed this time after a record is added to the NDB update information storage unit 42 that has been all cleared after the transaction log 54 is written. Therefore, the update information after repainting performs an additional update process in the next RDB reflection process, and indicates that the latest data of the record is not the XXXXXX of the previous update information but the current update information YYYYYY.
[0035]
Repainting pattern 2: When the update classification of the last update information is added and the update classification of the current update information is deletion, the post-repainting update information is not output. This shows a case where the data of the same record is deleted this time after a record is added to the NDB update information storage unit 42 that has been all cleared after the transaction log 54 is written. Therefore, the update information after repainting indicates that it is not necessary to execute anything in the next RDB reflection process, and neither the update classification nor the record data is output.
[0036]
Repaint pattern 3: When the update classification of the last update information is changed and the update classification of the current update information is changed, the post-paint update information is changed. This shows a case in which the data of the same record is further changed this time after the record is changed in the NDB update information storage unit 42 that is all cleared after the transaction log 54 is written. Therefore, the update information after repainting performs the update process of the change in the next RDB reflection process, and indicates that the latest data of the record is not the XXXXXX of the previous update information but the current update information YYYYYY.
[0037]
Repaint pattern 4: When the update classification of the last update information is changed and the update classification of the current update information is deletion, the post-repainting update information is deleted. This shows a case where the data of the same record is deleted this time after the record is changed in the NDB update information storage unit 42 that has been all cleared after the transaction log 54 is written. Therefore, the post-repainting update information indicates that deletion update processing is performed in the next RDB reflection processing, and that the latest data of the record is both XXXXXXX for the previous update information and the current update information. During the next RDB reflection process, the RDB table corresponding to the record and its data XXXX are both deleted.
[0038]
Repaint pattern 5: When the update category of the last update information is deleted and the update category of the current update information is added, the post-repaint update information is changed. This shows a case where data of the same record is added to the NDB update information storage unit 42 that has been all cleared after the transaction log 54 is written, after the record is deleted. Therefore, the update information after repainting is performed to update the change in the next RDB reflection process, and indicates that the latest data of the record is YXYYYY of the current update information, not XXXXXX of the previous update information.
[0039]
As described above, the case where the NDB update process is performed twice in one transaction has been described as an example using FIG. 8, but the same applies to the case where the NDB update process is performed multiple times in one transaction. In addition, a repainting process is performed.
[0040]
Thus, by performing the repainting process according to the repainting pattern shown in FIG. 8, unnecessary data update at the time of RDB reflection can be eliminated, and the processing time can be shortened. Note that a determination table similar to the explanatory diagram shown in FIG. 8 may be held in the internal storage unit 4, or a process for causing the program to make a determination as shown in FIG. 8 may be described. I do not care.
[0041]
Finally, RDB update processing will be described.
[0042]
FIG. 9 is a flowchart of RDB update processing according to the present invention. In the RDB update process, the RDB table is searched using the RDB table name and key number (concatenation identifier), which are NDB update information stored in the transaction log 54, as they are as search keys (step S11), and the searched RDB table Then, the update classification (change / addition / deletion) of the NDB update information is determined (step S12), and reflection processing in accordance with the determination, that is, RDB data update processing (step S13) is performed.
[0043]
Next, a specific example of reflecting the data update contents of the NDB in the RDB using the database update information reflecting system according to the present invention shown in FIG. 1 will be described below with reference to FIGS.
[0044]
FIG. 10 is a diagram showing a specific example of online NDB. The NDB 151 shown in FIG. 10 has a three-level hierarchical structure for bank passbooks. A customer information record is shown in the top first hierarchy, a liquidity (ordinary) account and a recurring account record are shown in the second hierarchy, and a transaction detail record in the liquidity account is shown in the third hierarchy. A record name and an identifier are set for each record. Customer number is the customer information record identifier, liquidity (regular) account and recurring account record identifier is the account number, liquidity account or recurring account transaction statement record identifier is the item number Are uniquely registered under the same parent record. Each record has the latest data content (not shown).
[0045]
Next, assuming a case where an NDB update process is performed in which a transaction account record 81 of a liquidity account is changed in one transaction and a record 82 of a periodicity account indicated by a broken line is newly added, this update is performed as RDB. A specific example reflected in FIG. The periodicity account record 82 is indicated by a broken line because it did not exist before the NDB update processing.
[0046]
FIG. 11 is a diagram showing a specific example of the transaction log 154. As shown in FIG. 11, in the transaction log of one transaction of NDB 151 shown in FIG. 10, as the update information of the record 81 of the transaction details of the liquidity account in the first (upper row), the update column is displayed in the status column. TORIMEIS is indicated in the record name, identifier 0000000001 is the identifier of the customer information record in the first hierarchy, identifier 0000000010 is the identifier of the liquidity account record in the second hierarchy, and is in the third hierarchy The identifier 00001 which is the identifier of the record 81 is shown, and the second (lower) shows that the update category is added to the status column as the update information of the record 82 of the periodicity account. TEIKIKOZ is shown in the name, the identifier 0000000001 is shown in the first hierarchy, and the identifier 0000000010 is shown in the second hierarchy, as in the first transaction log.
[0047]
In order to reflect the NDB update shown in this transaction log to the RDB, since the update classification of the first update record 81 in the transaction log is a change, it is the record name of the record 81 of the transaction details of the liquidity account. A table having a table name with the same name as TORIMEIS and having a concatenation identifier of 0000000001,0000000010,00001 is searched in the RDB, and the data of the searched table is changed with the data of the record 81. Next, since the update classification of the second update record 82 in the transaction log is additional, it has a table name having the same name as TEIKIKOZ which is the record name of the record 82 of the periodicity account, and the concatenated identifier is 0000000001,0000000010. Is newly generated in the RDB, and the data of the record 82 is written into the data of the generated table.
[0048]
FIG. 12 is a diagram showing the state of the RDB corresponding to the NDB shown in FIG. 10 when the transaction log shown in FIG. 11 is reflected in the RDB, and (A) is a diagram showing the state of the RDB before reflection. (B) is a figure which shows the state of RDB after reflection. As shown in (A) and (B) of FIG. 12, the RDB stores four tables whose table names that can be extracted by SQL are KOKYAKUJ, RYUDOKOZ, TORIMEIS, and TEIKIKOZ. Each table stores in the key number column a key number (concatenated identifier) in which the identifier from the highest-level record of the record having the same record name in the NDB to the identifier of the record is connected. The data content of the record is stored in the content column.
[0049]
As shown in FIG. 12A, the RDB before reflection includes two key numbers (concatenated identifiers) in the table whose table name is KOKYAKUJ, the table name is RYUDOKOZ, and the table name is TORIMEIS. These data contents are stored, and one key number (concatenation identifier) and its data contents are stored in a table whose table name is TEIKIKOZ. The data contents of the tables whose table names are RYUDOKOZ and TEIKIKOZ are, for example, the account name, account number, balance, account opening date, and final payment date as shown in FIG. 5, and the data contents of the table whose table name is TORIMEIS are: The classification of deposit or withdrawal, transaction amount, transaction date and transaction time.
[0050]
As shown in FIG. 12B, the reflected RDB includes a table with a table name of KOKYAKUJ, a table with a table name of RYUDOKOZ, a table with a table name of TORIMEIS, and a table with a table name of TEIKIKOZ. Two key numbers (concatenated identifiers) and their data contents are stored. The difference from the RDB before the reflection is that, in the table whose table name is TORIMEIS, the data content before the reflection of one key number (concatenation identifier) 0000000001,0000000010,00001 indicated by the reference number 101 is the same key number indicated by the reference number 102 It is changed to the data contents after reflecting (concatenated identifier), and one key number (concatenated identifier) 0000000001,0000000010 and its data contents are added to the table whose table name is TEIKIKOZ. .
[0051]
(Supplementary note 1) In the database update information reflection system for reflecting the record update in the network database to the relational database,
For each record stored in a hierarchical structure in the network database, means for setting a record name and an identifier such that child records of the same parent record can be distinguished from each other;
Storage means for storing the record name corresponding to the record to be updated and the update information of the record including each identifier from the highest hierarchy of the record to the hierarchy of the record, for each update of the record;
Means for setting, for each table stored in the relational database in a table structure, a table name corresponding to the record name and a concatenated identifier in which each identifier from the highest hierarchy of the record to the hierarchy of the record is connected. When,
Means for identifying a table in the relational database from the table name and the connection identifier at a predetermined cycle, and updating the table with update information of the record;
A database update information reflecting system characterized by comprising:
[0052]
(Supplementary note 2) The database update information reflection system according to claim 1, wherein the storage unit stores data at the time of updating the record only for a record to be updated to a preset relational database.
[0053]
(Supplementary Note 3) Each time the record is updated, the storage unit determines whether or not the record to be updated this time is in the record stored in the storage unit. The database update information reflection system according to claim 1 or 2, wherein the latest data is stored, and when it is determined that there is no data, the data of the record to be updated this time is stored.
[0054]
(Supplementary Note 4) The storage means determines whether or not there is a record to be updated this time in the stored record, and determines whether the record name and the connection identifier of the record to be updated this time are stored. 4. The database update information reflection system according to claim 3, wherein determination is made based on whether or not the record name and the concatenated identifier of a record match.
[0055]
(Supplementary note 5) The database according to claim 4, wherein the latest data is determined according to an update division of a record to be updated this time and an update division of a record in the accumulated record that matches the record. Update information reflection system.
[0056]
(Supplementary note 6) The database update information reflecting system according to any one of supplementary notes 1 to 5, wherein the table name is the same name as the record name.
[0057]
(Appendix 7) A database update information reflection system for reflecting record updates in a network database to a relational database.
For each record stored in a hierarchical structure in the network database, means for setting a record name and an identifier such that child records of the same parent record can be distinguished from each other;
Storage means for storing the record name corresponding to the record to be updated and the update information of the record including each identifier from the highest hierarchy of the record to the hierarchy of the record, for each update of the record;
Means for setting, for each table stored in the relational database in a table structure, a table name corresponding to the record name and a concatenated identifier in which each identifier from the highest hierarchy of the record to the hierarchy of the record is connected. When,
Means for identifying a table in the relational database from the table name and the connection identifier at a predetermined cycle, and updating the table with update information of the record;
A database update information reflection program characterized by comprising a program for causing the program to function.
[0058]
【The invention's effect】
As described above, according to the database update information reflecting system and the program therefor according to the present invention, the processing load of the database update information is simplified because the computer load is small, and the data of the core database (network database: NDB) Update contents can be reflected quickly and efficiently in an information database (relational database: RDB).
[0059]
According to the present invention, the reflection processing time of database update information can be shortened, and therefore update processing can be performed frequently. Specifically, the NDB information has been reflected in the RDB every day, but in the present invention, the latest information can be reflected every tens of minutes to every hour, so the freshness of the RDB information becomes higher and management analysis, etc. It becomes effective for the use of.
[0060]
Further, according to the present invention, since the configuration is provided in which update data that does not need to be reflected in the RDB among the update data in the NDB is provided, it is possible to efficiently reflect the data.
[Brief description of the drawings]
FIG. 1 is a schematic configuration diagram of an embodiment of a database update information reflection system according to the present invention.
FIG. 2 is a diagram illustrating a specific example of NDB update information that is data stored in an NDB update information storage unit 42 illustrated in FIG. 1;
FIG. 3 is a diagram showing a specific example of NDB 51 shown in FIG. 1;
4A is a diagram showing a basic form of RDB key setting, and FIG. 4B is a diagram specifically showing RDB key setting corresponding to the NDB record 311 shown in FIG. 3;
FIG. 5 is a diagram showing a specific example of a table extracted from the RDB 52 shown in FIG. 1;
6 is a diagram showing a specific example of an RDB reflection target table 53 shown in FIG.
FIG. 7 is a flowchart of NDB update processing according to the present invention.
FIG. 8 is a diagram for explaining a repainting pattern according to the present invention.
FIG. 9 is a flowchart of RDB update processing according to the present invention.
FIG. 10 is a diagram illustrating a specific example of online NDB.
FIG. 11 is a diagram showing a specific example of a transaction log.
12 is a diagram showing the state of the RDB corresponding to the NDB shown in FIG. 10 when the transaction log shown in FIG. 11 is reflected in the RDB, and (A) is a diagram showing the state of the RDB before reflection. (B) is a figure which shows the state of RDB after reflection.
[Explanation of symbols]
1 ... CPU
2 ... Input section
3 ... Output section
4 ... Internal memory
5 ... External storage
6 ... Communication Department
10 ... Database update information reflection system
41 ... NDB update processing unit
42 ... NDB update information storage unit
43 ... RDB update processing unit
51, 151 ... Network database (NDB)
52 ... Relational database (RDB)
53 ... RDB target table
54,154 ... Transaction log

Claims (2)

ネットワークデータベースにおけるレコードの更新をリレーショナルデータベースに反映させるデータベース更新情報の反映システムであって、
リレーショナルデータベースに更新を反映させるネットワークデータベースのレコード名を格納する反映対象テーブルと、
ネットワークデータベースのレコードのレコード名と、該レコードの最上位階層から当該レコードの階層までの各識別子と、追加、変更、削除、および、出力なしの何れかの更新区分と、該レコードの更新データの情報を含む該レコードの更新情報を蓄積格納する更新情報蓄積部と、
前記ネットワークデータベースに格納される各レコードの更新時に、前記反映対象テーブルに、該更新対象のレコードのレコード名に一致するものがあった場合に、前記更新情報蓄積部内に該更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在するか検索する検索手段と、
前記検索手段による検索の結果、前記更新情報蓄積部に前記更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在しない場合に、
該更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子を含む該レコードの更新情報を前記更新情報蓄積部に蓄積格納する更新情報蓄積手段と、
前記検索手段による検索の結果、前記更新情報蓄積部に前記更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在する場合に、
該更新情報蓄積部に格納された該合致するレコードの更新情報に含まれた更新区分と該更新対象のレコードの更新区分について、
前者が追加または変更で後者が変更である場合には、前者の更新データを後者の更新データに更新し、
前者が追加で後者が削除である場合には、前者の更新区分を出力なしに更新し、
前者が変更で後者が削除である場合には、前者の更新区分を削除に更新し、
前者が削除で後者が追加である場合には、前者の更新区分を変更に更新し、前者の更新データを後者の更新データに更新する、塗替処理手段と、
前記蓄積手段に蓄積された前記レコードの更新情報に含まれたレコード名と前記連結識別子とから前記リレーショナルデータベース内のテーブルを特定し、該テーブルを前記レコードの更新情報で更新する更新手段と、
を備えたことを特徴とするデータベース更新情報の反映システム。
A database update information reflection system for reflecting record updates in a network database to a relational database ,
A target table that stores the record names of network databases that reflect updates to the relational database;
The record name of the record in the network database, each identifier from the highest hierarchy of the record to the hierarchy of the record, any update category of addition, change, deletion, and no output, and the update data of the record An update information storage unit for storing and storing update information of the record including information;
When updating each record stored in the network database , if there is a record that matches the record name of the record to be updated in the reflection target table, the record of the record to be updated is stored in the update information storage unit. A search means for searching for a name and a match with each identifier from the highest hierarchy of the record to the hierarchy of the record;
As a result of the search by the search means, when there is no record in the update information storage unit that matches the record name of the record to be updated and each identifier from the highest hierarchy of the record to the hierarchy of the record,
Update information accumulating means for accumulating and storing the update information of the record including the record name of the record to be updated and each identifier from the highest hierarchy of the record to the hierarchy of the record in the update information accumulation unit;
As a result of the search by the search means, in the update information storage unit, there is a record name that matches the record name of the record to be updated and each identifier from the highest hierarchy of the record to the hierarchy of the record,
Regarding the update category included in the update information of the matching record stored in the update information storage unit and the update category of the record to be updated,
If the former is an addition or change and the latter is a change, the former update data is updated to the latter update data,
If the former is addition and the latter is deletion, update the former update class without output,
If the former is a change and the latter is a delete, update the former update class to delete,
When the former is deletion and the latter is addition, the former update classification is updated to change, the former update data is updated to the latter update data,
From said storage means record name included in the update information stored the record in and said connection identifier, and updating means for the identifying the table in a relational database, and updates the table with the update information of the record,
A database update information reflecting system characterized by comprising:
ネットワークデータベースにおけるレコードの更新をリレーショナルデータベースに反映させるデータベース更新情報の反映システムをコンピュータによって機能させるプログラムであって、
前記データベース更新情報の反映システムは、リレーショナルデータベースに更新を反映させるネットワークデータベースのレコード名を格納する反映対象テーブルと、
ネットワークデータベースのレコードのレコード名と、該レコードの最上位階層から当該レコードの階層までの各識別子と、追加、変更、削除、および、出力なしの何れかの更新区分と、該レコードの更新データの情報を含む該レコードの更新情報を蓄積格納する更新情報蓄積部と、を備え、
前記プログラムは、
コンピュータを、
前記ネットワークデータベースに格納される各レコードの更新時に、前記反映対象テーブルに、該更新対象のレコードのレコード名に一致するものがあった場合に、前記更新情報蓄積部内に該更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在するか検索する検索手段と、
前記検索手段による検索の結果、前記更新情報蓄積部に前記更新対象のレコードのレコ ード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在しない場合に、
該更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子を含む該レコードの更新情報を前記更新情報蓄積部に蓄積格納する更新情報蓄積手段と、
前記検索手段による検索の結果、前記更新情報蓄積部に前記更新対象のレコードのレコード名および該レコードの最上位階層から当該レコードの階層までの各識別子と合致するものが存在する場合に、
該更新情報蓄積部に格納された該合致するレコードの更新情報に含まれた更新区分と該更新対象のレコードの更新区分について、
前者が追加または変更で後者が変更である場合には、前者の更新データを後者の更新データに更新し、
前者が追加で後者が削除である場合には、前者の更新区分を出力なしに更新し、
前者が変更で後者が削除である場合には、前者の更新区分を削除に更新し、
前者が削除で後者が追加である場合には、前者の更新区分を変更に更新し、前者の更新データを後者の更新データに更新する、塗替処理手段と、
前記蓄積手段に蓄積された前記レコードの更新情報に含まれたレコード名と前記連結識別子とから前記リレーショナルデータベース内のテーブルを特定し、該テーブルを前記レコードの更新情報で更新する更新手段と、
して機能させることを特徴とするプログラム。
A program for causing a computer to function a database update information reflection system for reflecting record updates in a network database to a relational database ,
The database update information reflection system includes a reflection target table that stores a record name of a network database that reflects an update in a relational database;
The record name of the record in the network database, each identifier from the highest hierarchy of the record to the hierarchy of the record, any update category of addition, change, deletion, and no output, and the update data of the record An update information storage unit for storing and storing update information of the record including information,
The program is
Computer
When updating each record stored in the network database , if there is a record that matches the record name of the record to be updated in the reflection target table, the record of the record to be updated is stored in the update information storage unit. A search means for searching for a name and a match with each identifier from the highest hierarchy of the record to the hierarchy of the record;
Search result by the search means, when those consistent with each identifier from the highest layer to the hierarchy of the record of record de name and the record of the updated records to the update information storage unit is not present,
Update information accumulating means for accumulating and storing the update information of the record including the record name of the record to be updated and each identifier from the highest hierarchy of the record to the hierarchy of the record in the update information accumulation unit;
As a result of the search by the search means, in the update information storage unit, there is a record name that matches the record name of the record to be updated and each identifier from the highest hierarchy of the record to the hierarchy of the record,
Regarding the update category included in the update information of the matching record stored in the update information storage unit and the update category of the record to be updated,
If the former is an addition or change and the latter is a change, the former update data is updated to the latter update data,
If the former is addition and the latter is deletion, update the former update class without output,
If the former is a change and the latter is a delete, update the former update class to delete,
When the former is deletion and the latter is addition, the former update classification is updated to change, the former update data is updated to the latter update data,
From said storage means record name included in the update information stored the record in and said connection identifier, and updating means for the identifying the table in a relational database, and updates the table with the update information of the record,
A program characterized by making it function.
JP2002007803A 2002-01-16 2002-01-16 Database update information reflection system and program therefor Expired - Lifetime JP4152107B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002007803A JP4152107B2 (en) 2002-01-16 2002-01-16 Database update information reflection system and program therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002007803A JP4152107B2 (en) 2002-01-16 2002-01-16 Database update information reflection system and program therefor

Publications (2)

Publication Number Publication Date
JP2003208346A JP2003208346A (en) 2003-07-25
JP4152107B2 true JP4152107B2 (en) 2008-09-17

Family

ID=27646223

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002007803A Expired - Lifetime JP4152107B2 (en) 2002-01-16 2002-01-16 Database update information reflection system and program therefor

Country Status (1)

Country Link
JP (1) JP4152107B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4704736B2 (en) * 2004-11-04 2011-06-22 新日鉄ソリューションズ株式会社 Data processing apparatus, data processing method and program thereof
JP5748711B2 (en) * 2012-07-25 2015-07-15 株式会社三菱東京Ufj銀行 Database drivers and programs
JP6260339B2 (en) * 2014-02-24 2018-01-17 富士通株式会社 Information processing apparatus, data conversion program, and data conversion method
EP3373149A4 (en) * 2015-11-06 2019-04-03 Nomura Research Institute, Ltd. Data management system

Also Published As

Publication number Publication date
JP2003208346A (en) 2003-07-25

Similar Documents

Publication Publication Date Title
US10846277B1 (en) Journaled tables in database systems
US9292573B2 (en) Extended database engine providing versioning and embedded analytics
US7672966B2 (en) Adding extrinsic data columns to an existing database schema using a temporary column pool
JP4594306B2 (en) Self-describing business object
US8874562B2 (en) Time-addressed database management system
CN100445998C (en) Transactional file system
US5870733A (en) Automated system and method for providing access data concerning an item of business property
Harrington Relational database design clearly explained
US7958031B2 (en) Apparatus, system, and method for automated identity relationship maintenance
JP4571636B2 (en) Service management of service-oriented business framework
US20090287737A1 (en) Architecture for enabling rapid database and application development
CA2412318A1 (en) Method and apparatus for efficient management of xml documents
US20070255685A1 (en) Method and system for modelling data
US7653663B1 (en) Guaranteeing the authenticity of the data stored in the archive storage
US6453324B1 (en) Method for maintaining a version history of objects in a repository
US20090300037A1 (en) Enhanced database structure configuration
JP5033322B2 (en) Information management method and apparatus using connection relation information
CN100517334C (en) Method and apparatus for representing a group hierarchy structure in a relational database
JP4152107B2 (en) Database update information reflection system and program therefor
CN113886505B (en) Management system for realizing dynamic modeling based on search engine and relational database
US20030200220A1 (en) Method, system, and program product for the implementation of an attributegroup to aggregate the predefined attributes for an information entity within a content management system
CN113986974A (en) Database transaction management method and device and database transaction recovery method and device
WO2007049289A2 (en) Method and system for re-population of data in a database
Wu et al. Data storage and management
Oxborrow et al. Object-oriented data management in specialized environments

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040825

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080129

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080205

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080407

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: 20080603

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080701

R150 Certificate of patent or registration of utility model

Ref document number: 4152107

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110711

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110711

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120711

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120711

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130711

Year of fee payment: 5

EXPY Cancellation because of completion of term