[go: up one dir, main page]

JP5836422B2 - Method and system for data matching - Google Patents

Method and system for data matching Download PDF

Info

Publication number
JP5836422B2
JP5836422B2 JP2014083183A JP2014083183A JP5836422B2 JP 5836422 B2 JP5836422 B2 JP 5836422B2 JP 2014083183 A JP2014083183 A JP 2014083183A JP 2014083183 A JP2014083183 A JP 2014083183A JP 5836422 B2 JP5836422 B2 JP 5836422B2
Authority
JP
Japan
Prior art keywords
data
memory
stored
database
data record
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014083183A
Other languages
Japanese (ja)
Other versions
JP2015203985A (en
Inventor
飯塚 真玄
真玄 飯塚
拓 橋本
拓 橋本
伸介 岩元
伸介 岩元
Original Assignee
株式会社Tkc
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 株式会社Tkc filed Critical 株式会社Tkc
Priority to JP2014083183A priority Critical patent/JP5836422B2/en
Publication of JP2015203985A publication Critical patent/JP2015203985A/en
Application granted granted Critical
Publication of JP5836422B2 publication Critical patent/JP5836422B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、一般に、データ一致化のための技術に関し、さらに詳しくは、ソース・データベースと複製データベースとの間の高速なデータ一致化のための方法およびシステムに関する。   The present invention relates generally to techniques for data matching, and more particularly to a method and system for fast data matching between a source database and a replicate database.

ソース・データベースと複製データベースとを備えてなるデータベース・システムでは、ソース・データベースと複製データベースとの間でのデータ一致化が重要である。   In a database system including a source database and a duplicate database, data matching between the source database and the duplicate database is important.

図4は、従来のデータ一致化方式を示す概念図である。   FIG. 4 is a conceptual diagram showing a conventional data matching method.

すなわち、図4(a)に示す方式によれば、ソース・データベースから、1件目のデータ・レコードが取得され、取得された1件目のデータ・レコードが、複製データベースに書き込まれる。このようにして複製データベースへの1件目のデータ・レコードの書き込みが終了すると、ソース・データベースから2件目のデータ・レコードが取得され、同様に、複製データベースに書き込まれる。   That is, according to the method shown in FIG. 4A, the first data record is acquired from the source database, and the acquired first data record is written in the duplicate database. When the writing of the first data record to the duplicate database is completed in this way, the second data record is acquired from the source database and similarly written to the duplicate database.

このような取出/書込処理が、最後のデータ・レコードの書き込みが完了するまで、データ・レコード1件ずつシーケンシャルに行われることによって、ソース・データベースと、複製データベースとの間でのデータ一致化が達成される。   Such retrieval / write processing is performed sequentially for each data record until writing of the last data record is completed, thereby matching the data between the source database and the duplicate database. Is achieved.

しかしながら、このようなシーケンシャル方式では、データ・レコードを取得するためのソース・データベースへのアクセスと、データ・レコードを書き込むための複製データベースへのアクセスとが、データ・レコード数に等しい回数、繰り返しなされるので、最後のデータ・レコードが複製データベースに書き込まれるまでに、非常に時間がかかってしまうという問題があった。   However, in such a sequential method, access to the source database to obtain data records and access to the duplicate database to write data records are repeated a number of times equal to the number of data records. Therefore, there is a problem that it takes a very long time before the last data record is written in the duplicate database.

このような問題を解決する1つの方法として、図4(b)に示すようなバルク・コピー方式がある。この方式では、ソース・データベースから大量(例えば、10万件ずつ)のデータ・レコードが一括して取得され、しかる後に、まとめて複製データベースに書き込まれる。この方式によれば、データ・レコードを取得するためのソース・データベースへのアクセスと、データ・レコードを書き込むための複製データベースへのアクセスとを、レコード数に等しい回数、繰り返し行う必要はないので、最後のデータ・レコードが複製データベースに書き込まれるまでに要する時間は、図4(a)に示す方式よりも大幅に短縮される。   One method for solving such a problem is a bulk copy method as shown in FIG. In this method, a large amount (for example, 100,000 records) of data records are collectively acquired from the source database, and thereafter, are collectively written in the duplicate database. According to this method, it is not necessary to repeat the access to the source database for obtaining the data record and the access to the duplicate database for writing the data record, the number of times equal to the number of records. The time required for the last data record to be written to the duplicate database is greatly reduced compared to the method shown in FIG.

一例として、10万件のデータ・レコードを、ソース・データベースから複製データベースにコピーする場合、図4(a)に示すシーケンシャル・コピー方式では、取得と書込とを10万回ループすることにより、約10時間を要するのに対し、図4(b)に示すバルク・コピー方式では、約34分しか要しない。   As an example, when 100,000 data records are copied from a source database to a duplicate database, in the sequential copy method shown in FIG. 4A, acquisition and writing are looped 100,000 times, While it takes about 10 hours, the bulk copy method shown in FIG. 4B requires only about 34 minutes.

なお、バルク・コピーに関しては、非特許文献1に示すように、Microsoft SQL Serverのテーブルに、サイズの大きなデータを高速で一括書き込みするSqlBulkCopyという一般的な部品が用意されている。   As for the bulk copy, as shown in Non-Patent Document 1, a general component called SQL Bulk Copy is prepared that batch-writes large-sized data at a high speed in a Microsoft SQL Server table.

また、非特許文献2には、Oracle Databaseのテーブルに、サイズの大きなデータを高速で一括書き込みするOracleBulkCopyという一般的な部品が用意されている。   Non-Patent Document 2 provides a general part called OracleBulkCopy that batch-writes large data at a high speed to an Oracle Database table.

また、非特許文献3には、IBM DB2 Databaseのテーブルに、サイズの大きなデータを高速で一括書き込みするDB2BulkCopyという一般的な部品が用意されている。   Non-Patent Document 3 provides a general component called DB2BulkCopy that batch-writes large-size data at a high speed into the IBM DB2 Database table.

Microsoft Developer Network ホームページ、http://msdn.microsoft.com/ja-jp/library/7ek5da1a(v=vs.110).aspxMicrosoft Developer Network home page, http://msdn.microsoft.com/en-us/library/7ek5da1a(v=vs.110).aspx Oracle Data Provider for .NET開発者ガイド ホームページ、http://docs.oracle.com/cd/E16635_01/win.111/e06104/OracleBulkCopyClass.htmOracle Data Provider for .NET Developer's Guide home page, http://docs.oracle.com/cd/E16635_01/win.111/e06104/OracleBulkCopyClass.htm IBM DB2 Database for Linux, UNIX, and Windows インフォメーション・センター ホームページ、http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.swg.im.dbclient.adonet.ref.doc%2Fdoc%2FDB2BulkCopyClass.htmlIBM DB2 Database for Linux, UNIX, and Windows Information Center home page, http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.swg.im.dbclient. adonet.ref.doc% 2Fdoc% 2FDB2BulkCopyClass.html

しかしながら、このような従来のバルク・コピー方式では、以下のような問題がある。   However, such a conventional bulk copy method has the following problems.

すなわち、バルク・コピー方式では、前述したように、ソース・データベースから一度に大量(例えば、10万件ずつ)のデータ・レコードが取得される。図5は、このようにして、ソース・データベース60から、大量のデータ・レコードが、サーバ62によって取得され、複製データベース70へ書き込まれる処理を説明するための概念図である。   That is, in the bulk copy method, as described above, a large amount (for example, 100,000 records) of data records are acquired from the source database at a time. FIG. 5 is a conceptual diagram for explaining a process in which a large amount of data records are acquired by the server 62 from the source database 60 and written to the duplicate database 70 in this way.

ソース・データベース60および複製データベース70に接続されたサーバ62は、データ取得部64と、メモリ66と、データ書込部68とを備えている。そして、ソース・データベース60に格納されているデータ・レコードは、データ取得部64によって取得され、データ取得部64からメモリ66に渡され、メモリ66において保持される。データ取得部64によって取得されたデータ・レコードがすべてメモリ66に格納されると、メモリ66に格納されたデータ・レコードがデータ書込部68によって取り出され、複製データベース70へと書き込まれる。   The server 62 connected to the source database 60 and the duplicate database 70 includes a data acquisition unit 64, a memory 66, and a data writing unit 68. The data record stored in the source database 60 is acquired by the data acquisition unit 64, transferred from the data acquisition unit 64 to the memory 66, and held in the memory 66. When all the data records acquired by the data acquisition unit 64 are stored in the memory 66, the data records stored in the memory 66 are retrieved by the data writing unit 68 and written to the duplicate database 70.

すなわち、ソース・データベース60からどれだけの量のデータ・レコードを一度に取得することができるかは、メモリ66の容量に依存する。   That is, how much data records can be obtained from the source database 60 at a time depends on the capacity of the memory 66.

メモリ66が十分な容量を有していれば、ソース・データベース60から、すべてのデータ・レコードを一度で取得できるだろう。しかしながら、十分な容量のメモリ66を準備することは、コスト・アップをもたらすという問題がある。また、現時点ではメモリ66の容量が十分であったとしても、将来的に、ソース・データベース60に格納されているデータ・サイズが増えれば、メモリの容量を増設する必要が生じうるという問題が常に付きまとう。   If the memory 66 has sufficient capacity, all data records could be obtained from the source database 60 at once. However, there is a problem that preparing a memory 66 having a sufficient capacity causes an increase in cost. Even if the capacity of the memory 66 is sufficient at the present time, there is always a problem that if the data size stored in the source database 60 increases in the future, it may be necessary to increase the capacity of the memory. Let's go.

一方、メモリ66が十分な容量を有していなければ、ソース・データベース60に格納されているすべてのデータ・レコードを一度に保持しきることはできないので、ソース・データベース60からのデータ・レコードの取得と、取得したデータ・レコードの複製データベース70への書込とからなるプロセスを、何度か繰り返す必要がある。その場合、複製データベース70へのすべてのデータ・レコードの書込が完了するまでの時間が長くなるという問題がある。   On the other hand, if the memory 66 does not have a sufficient capacity, all the data records stored in the source database 60 cannot be held at one time. And the process of writing the acquired data record to the duplicate database 70 must be repeated several times. In that case, there is a problem that it takes a long time to complete writing of all data records in the duplicate database 70.

本発明はこのような事情に鑑みてなされたものであり、ソース・データベースに格納されたデータ・レコードを複製データベースにコピーする場合、ソース・データベースに格納されたデータ・レコードの数が増えても、メモリ容量を増設する必要なく、複製データベースへのコピーを高速で実施することが可能な、データ一致化のための方法およびシステムを提供することを目的とする。   The present invention has been made in view of such circumstances, and when copying data records stored in a source database to a duplicate database, even if the number of data records stored in the source database increases. Another object of the present invention is to provide a data matching method and system capable of performing copying to a duplicate database at high speed without the need for increasing the memory capacity.

上記の目的を達成するために、本発明では、以下のような手段を講じる。   In order to achieve the above object, the present invention takes the following measures.

すなわち、請求項1の発明は、ソース・データベースと複製データベースとの間のデータ一致化のためのシステムであって、ソース・データベースに格納された複数のデータ・レコードを順次取得しながら順次送出する取得手段と、取得手段によって順次送出されたデータ・レコードを順次受け取ってメモリに順次格納する格納手段と、メモリにデータ・レコードが格納されると、格納されたデータ・レコードを、後続するデータ・レコードがメモリに格納されている途中であっても、複製データベースに書き込み、書き込み終了後、このデータ・レコードを、メモリから削除する書込手段とを備えている。そして、書込手段が、メモリに格納されたデータ・レコードの複製データベースへの書き込みと、書き込み終了後のメモリからの削除とを、メモリに格納されたデータ・レコードが存在しなくなるまで繰り返すことによって、ソース・データベースに格納されたデータ・レコードと、複製データベースに格納されたデータ・レコードとの一致化を図るようにしている。
ここで、取得手段と格納手段とは通信ネットワークを介して接続され、取得手段が、Webサーバである。
また、ソース・データベースと書込手段とがダイレクトに接続しないように、ソース・データベースと書込手段との間に、Webサーバを設けるようにしている。
That is, the invention of claim 1 is a system for matching data between a source database and a duplicate database, and sequentially transmits a plurality of data records stored in the source database while sequentially acquiring them. An acquisition unit; a storage unit that sequentially receives and sequentially stores the data records sent by the acquisition unit; and when the data record is stored in the memory, the stored data record Writing means is provided for writing to the duplicate database even when the record is being stored in the memory, and deleting the data record from the memory after the writing is completed. Then, the writing means repeats the writing of the data record stored in the memory to the duplicate database and the deletion from the memory after the writing is completed until there is no data record stored in the memory. The data records stored in the source database and the data records stored in the duplicate database are matched.
Here, the acquisition unit and the storage unit are connected via a communication network, and the acquisition unit is a Web server.
Further, a Web server is provided between the source database and the writing means so that the source database and the writing means are not directly connected.

請求項2の発明は、取得手段および格納手段と、書込手段とは、独立して動作する、請求項1の発明のデータ一致化システムである。   The invention according to claim 2 is the data matching system according to claim 1, wherein the obtaining means, the storing means, and the writing means operate independently.

請求項3の発明は、ソース・データベースと複製データベースとの間のデータ一致化のための方法であって、ソース・データベースに格納された複数のデータ・レコードをWebサーバが順次取得しながら順次送出し、順次送出されたデータ・レコードを順次受け取ってメモリに順次格納し、メモリにデータ・レコードが格納されると、格納されたデータ・レコードを、後続するデータ・レコードがメモリに格納されている途中であっても、複製データベースに書き込み、書き込み終了後、このデータ・レコードを、メモリから削除する。そして、メモリに格納されたデータ・レコードの複製データベースへの書き込みと、書き込み終了後のメモリからの削除とを、メモリに格納されたデータ・レコードが存在しなくなるまで繰り返すことによって、ソース・データベースに格納されたデータ・レコードと、複製データベースに格納されたデータ・レコードとの一致化を図る。
また、ソース・データベースとメモリとがダイレクトに接続しないように、ソース・データベースとメモリとの間に、Webサーバを設けるようにしている。
The invention of claim 3 is a method for data matching between a source database and a replica database, wherein a Web server sequentially acquires a plurality of data records stored in the source database and sequentially transmits them. Then, sequentially sent data records are sequentially received and stored in the memory, and when the data record is stored in the memory, the stored data record is stored in the subsequent data record in the memory. Even in the middle, data is written to the duplicate database, and after the data is written, this data record is deleted from the memory. Then, by repeatedly writing the data record stored in the memory to the duplicate database and deleting it from the memory after the writing is completed, the data record stored in the memory does not exist. Matching the stored data records with the data records stored in the duplicate database.
Also, a Web server is provided between the source database and the memory so that the source database and the memory are not directly connected.

本発明に係るデータ一致化のための方法およびシステムによれば、ソース・データベースに格納されたデータ・レコードを複製データベースにコピーする場合、ソース・データベースに格納されたデータ・レコードの数が増えても、メモリ容量を増やす必要なく、高速で、複製データベースへのコピーを完了することが可能となる。   According to the method and system for data matching according to the present invention, when data records stored in a source database are copied to a duplicate database, the number of data records stored in the source database increases. However, it is possible to complete copying to the duplicate database at high speed without having to increase the memory capacity.

本発明の実施形態に係るデータ一致化方法が適用されたシステムの構成例を示す概念図である。It is a conceptual diagram which shows the structural example of the system by which the data matching method which concerns on embodiment of this invention was applied. 本発明の実施形態に係るシステムの動作を示すフローチャートである。It is a flowchart which shows operation | movement of the system which concerns on embodiment of this invention. 本発明の実施形態に係るシステムによるソース・データベースからのデータ・レコードの取得と、複製データベースへのデータ・レコードの書込とのタイミングを示す図である。It is a figure which shows the timing of acquisition of the data record from the source database by the system which concerns on embodiment of this invention, and the writing of the data record to a replication database. 従来のデータ一致化方式を示す概念図である。It is a conceptual diagram which shows the conventional data matching method. 従来のバルク・コピー方式を説明するための概念図である。It is a conceptual diagram for demonstrating the conventional bulk copy system.

以下に、本発明を実施するための最良の形態について図面を参照しながら説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

図1は、本発明の実施形態に係るデータ一致化方法が適用されたシステムの構成例を示す概念図である。   FIG. 1 is a conceptual diagram showing a configuration example of a system to which a data matching method according to an embodiment of the present invention is applied.

このシステム10は、ソース・データベース12と複製データベース14との間のデータ一致化のためのシステムであって、ソース・データベース12と複製データベース14の他に、例えばWebサーバであるデータ取得部16と、データ書込部18とを備えている。そして、データ取得部16とデータ書込部18とは、例えばインターネットのような通信ネットワーク19によって接続されている。   This system 10 is a system for data matching between a source database 12 and a duplicate database 14, and in addition to the source database 12 and the duplicate database 14, for example, a data acquisition unit 16 that is a Web server, The data writing unit 18 is provided. The data acquisition unit 16 and the data writing unit 18 are connected by a communication network 19 such as the Internet.

このような通信ネットワーク19は、イーサネット(登録商標)等のLAN、あるいは公衆回線や専用回線を介して複数のLANが接続されるWAN等からなる。LANの場合には、必要に応じてルータを介した多数のサブネットから構成される。また、WANの場合には、公衆回線に接続するためのファイアウォール等を適宜備えているが、ここではその図示及び詳細説明を省略する。   Such a communication network 19 includes a LAN such as Ethernet (registered trademark) or a WAN to which a plurality of LANs are connected through a public line or a dedicated line. In the case of a LAN, it is composed of a number of subnets via routers as necessary. In the case of a WAN, a firewall or the like for connecting to a public line is provided as appropriate, but illustration and detailed description thereof are omitted here.

データ取得部16は、ソース・データベース12に接続されており、ソース・データベース12に格納された複数のデータ・レコードを順次取得しながら、通信ネットワーク19を介してデータ書込部18へ順次送出する。すなわち、データ取得部16は、後続するデータ・レコードを取得している途中であっても、既に取得したデータ・レコードを、データ書込部18へ順次送出する。   The data acquisition unit 16 is connected to the source database 12, and sequentially sends out a plurality of data records stored in the source database 12 to the data writing unit 18 via the communication network 19. . In other words, the data acquisition unit 16 sequentially transmits the already acquired data records to the data writing unit 18 even while the subsequent data records are being acquired.

データ書込部18は、受信部20と、メモリ22と、書込部24と備えている。そして、データ取得部16によって順次送出されたデータ・レコードを受信部20が順次受信して、メモリ22に順次格納する。書込部24は、メモリ22にデータ・レコード(例えば、データ・レコード#1)が格納されると、後続するデータ・レコード(例えば、データ・レコード#2,#3,#4・・・・)がメモリ22に格納されている途中であっても、格納されたデータ・レコード(データ・レコード#1)を複製データベース14へ書き込む。そして、複製データベース14にデータ・レコード(データ・レコード#1)が書き込まれると、このデータ・レコード(データ・レコード#1)を、メモリ22から削除する。   The data writing unit 18 includes a receiving unit 20, a memory 22, and a writing unit 24. Then, the receiving unit 20 sequentially receives the data records sequentially transmitted by the data acquisition unit 16 and sequentially stores them in the memory 22. When a data record (for example, data record # 1) is stored in the memory 22, the writing unit 24 performs subsequent data records (for example, data records # 2, # 3, # 4,...). ) Is stored in the memory 22, the stored data record (data record # 1) is written to the replication database 14. Then, when a data record (data record # 1) is written in the duplicate database 14, this data record (data record # 1) is deleted from the memory 22.

書込部24は、その後、次のデータ・レコード(例えば、データ・レコード#2)に対しても同様なことを行う。書込部24は、このような動作を、メモリ22に格納された最後のデータ・レコードまで連続的に繰り返すことによって、メモリ22に格納されたすべてのデータ・レコードを複製データベース14に書き込む。   Thereafter, the writing unit 24 performs the same operation for the next data record (for example, data record # 2). The writing unit 24 writes all the data records stored in the memory 22 in the duplicate database 14 by continuously repeating such an operation until the last data record stored in the memory 22.

次に、以上のように構成した本発明の実施形態に係るシステムの動作を、図2のフローチャートを用いて説明する。   Next, the operation of the system according to the embodiment of the present invention configured as described above will be described with reference to the flowchart of FIG.

本実施形態に係るシステム10では、ソース・データベース12に格納された複数のデータ・レコードが、例えばWebサーバのようなデータ取得部16によって順次取得され、データ書込部18へ順次送出される(ステップS1)。   In the system 10 according to the present embodiment, a plurality of data records stored in the source database 12 are sequentially acquired by a data acquisition unit 16 such as a Web server and sequentially transmitted to the data writing unit 18 ( Step S1).

ステップS1で順次送出されたデータ・レコードが、データ書込部18の受信部20によって順次取得され、メモリ22に順次格納される(ステップS2)。   The data records sequentially transmitted in step S1 are sequentially acquired by the receiving unit 20 of the data writing unit 18 and sequentially stored in the memory 22 (step S2).

メモリ22へデータ・レコード(例えば、データ・レコード#1)が格納されると、後続するデータ・レコード(例えば、データ・レコード#2,#3,#4・・・・)がメモリ22に格納されている途中であっても、格納されたデータ・レコード(データ・レコード#1)は、書込部24によって複製データベース14へ書き込まれる(ステップS3)。   When a data record (for example, data record # 1) is stored in the memory 22, subsequent data records (for example, data records # 2, # 3, # 4,...) Are stored in the memory 22. Even during the process, the stored data record (data record # 1) is written into the replication database 14 by the writing unit 24 (step S3).

このようにして、複製データベース14にデータ・レコード(データ・レコード#1)が書き込まれると、このデータ・レコード(データ・レコード#1)は、書込部24によって、メモリ22から削除される(ステップS4)。   When the data record (data record # 1) is thus written in the duplicate database 14, the data record (data record # 1) is deleted from the memory 22 by the writing unit 24 ( Step S4).

その後、次のデータ・レコード(例えば、データ・レコード#2)に対しても、書込部24によって、ステップS3およびステップS4と同様な処理がなされる。このような動作が、メモリ22に格納された最後のデータ・レコードまで連続的に繰り返される(ステップS5)ことによって、メモリ22に格納されたすべてのデータ・レコードが複製データベース14に書き込まれる。   Thereafter, the writing unit 24 performs the same processing as in step S3 and step S4 for the next data record (for example, data record # 2). Such an operation is continuously repeated until the last data record stored in the memory 22 (step S5), whereby all the data records stored in the memory 22 are written in the duplicate database 14.

図3は、本実施形態に係るシステム10によるソース・データベース12からのデータ・レコードの取得と、複製データベース14へのデータ・レコードの書込とのタイミングを、従来技術と比較して示す図である。図3(a)は、図4(a)でも示したシーケンシャル・コピー方式であり、図3(b)は、図4(b)でも示したバルク・コピー方式である。   FIG. 3 is a diagram showing the timing of data record acquisition from the source database 12 by the system 10 according to the present embodiment and writing of the data record to the duplicate database 14 in comparison with the prior art. is there. 3A shows the sequential copy method shown in FIG. 4A, and FIG. 3B shows the bulk copy method shown in FIG. 4B.

ステップS1およびステップS2が、図3(c)におけるデータ・レコードの取得プロセスaに相当し、ステップS3およびステップS4が、図3(c)におけるデータ・レコードの書込プロセスbに相当する。図3(c)に示すように、本実施形態に係るシステム10では、メモリ22に1件のデータ・レコードでも格納されると、このデータ・レコードの、複製データベース14への書込が開始されるので、データ・レコードの取得プロセスaが完了していなくても、データ・レコードの書込プロセスbが開始される。すなわち、ステップS2において、メモリ22にデータ・レコードが格納されると、ステップS3の動作が開始され、その後は、ステップS1およびステップS2の動作と、ステップS3およびステップS4の動作とは、独立して実行される。   Steps S1 and S2 correspond to the data record acquisition process a in FIG. 3C, and steps S3 and S4 correspond to the data record writing process b in FIG. 3C. As shown in FIG. 3C, in the system 10 according to the present embodiment, when even one data record is stored in the memory 22, writing of this data record to the duplicate database 14 is started. Therefore, even if the data record acquisition process a is not completed, the data record writing process b is started. That is, when a data record is stored in the memory 22 in step S2, the operation of step S3 is started, and thereafter, the operations of step S1 and step S2 and the operations of step S3 and step S4 are independent. Executed.

このような独立動作によって、ソース・データベース12から最初のデータ・レコードが取得されてから、最後のデータ・レコードの複製データベース14への書込が終了するまでに要する時間は、図3(b)に示すバルク・コピー方式よりもさらに大幅に短縮される。   The time required for the writing of the last data record to the duplicate database 14 after the first data record is acquired from the source database 12 by such an independent operation is as shown in FIG. This is much shorter than the bulk copy method shown in

一例として、10万件のデータ・レコードを、ソース・データベース12から複製データベース14にコピーする場合、図3(a)に示すシーケンシャル・コピー方式では、約10時間を要するところ、図3(b)に示すバルク・コピー方式では、約34分しか要しないことを前述したが、図3(c)に示す本実施形態に係るシステム10では、約18分しか要しない。すなわち、本実施形態に係るシステム10によれば、従来のバルク・コピー方式で要していた処理時間が、さらに約半分に短縮される。しかも、ステップS4で説明したように、データ・レコードは、複製データベース14に書き込まれると、順次、メモリ22から削除されるので、メモリ22は、さほど大きな容量を要しない。   As an example, when 100,000 data records are copied from the source database 12 to the duplicate database 14, the sequential copy method shown in FIG. 3A requires about 10 hours, whereas FIG. As described above, the bulk copy method shown in FIG. 3 only requires about 34 minutes, but the system 10 according to the present embodiment shown in FIG. 3C requires only about 18 minutes. That is, according to the system 10 according to the present embodiment, the processing time required for the conventional bulk copy method is further reduced to about half. Moreover, as described in step S4, when the data record is written in the duplicate database 14, it is deleted from the memory 22 in sequence, so that the memory 22 does not require a very large capacity.

このような動作は、前述したSqlBulkCopyや、OracleBulkCopyや、DB2BulkCopyによっても実現可能である。例えば、SqlBulkCopyは、図5に示すように、ソース・データベース60と複製データベース70とにダイレクトに接続されたサーバ62のデータ書込部68において使用されることを想定している。しかし、ソース・データベース60とサーバ62の間に、ネットワーク等の制約や、テーブル間の単純コピーでなくデータ加工のプロセスが入っているなどの理由で、ソース・データベース60とデータ書き込み部68がダイレクトに接続できない場合は、データ書き込み部68で使用するSqlBulkCopyに読み込ませるために、データ取得部64によりメモリ66にデータを一時的に全てのデータを蓄積する必要がある。したがって、SqlBulkCopyをそのまま適用した場合、前述したように、ソース・データベース60からの大量(例えば、10万件ずつ)のデータ・レコードがメモリ66に格納されるので、メモリ66は十分な容量を有している必要がある。   Such an operation can also be realized by the above-described SQL Bulk Copy, Oracle Bulk Copy, and DB2 Bulk Copy. For example, it is assumed that SqlBulkCopy is used in a data writing unit 68 of a server 62 directly connected to a source database 60 and a duplicate database 70 as shown in FIG. However, the source database 60 and the data writing unit 68 are directly connected between the source database 60 and the server 62 because of a limitation of a network or the like, or a data processing process instead of a simple copy between tables. If the connection cannot be established, all data must be temporarily stored in the memory 66 by the data acquisition unit 64 in order to be read by the SQL Bulk Copy used by the data writing unit 68. Therefore, when the SQL Bulk Copy is applied as it is, a large amount (for example, 100,000 records) of data records from the source database 60 are stored in the memory 66 as described above, so that the memory 66 has a sufficient capacity. Need to be.

しかしながら、図1に示すように、Webサーバのようなデータ取得部16を設け、ソース・データベース12とダイレクトに接続しないようにしたデータ書込部18においてSqlBulkCopyを適用すれば、メモリ22にデータ・レコード(例えば、データ・レコード#1)が格納されると、後続するデータ・レコード(例えば、データ・レコード#2,#3,#4・・・・)がメモリ22に格納されている途中であっても、格納されたデータ・レコード(データ・レコード#1)が複製データベース14へ書き込まれ、しかる後に、このデータ・レコード(データ・レコード#1)が、メモリ22から削除されるようになり、本実施形態に係るシステム10が実現される。   However, as shown in FIG. 1, if a data acquisition unit 16 such as a Web server is provided and a data writing unit 18 that is not directly connected to the source database 12 is applied with SqlBulkCopy, the data 22 is stored in the memory 22. When a record (for example, data record # 1) is stored, a subsequent data record (for example, data record # 2, # 3, # 4,...) Is being stored in the memory 22. Even so, the stored data record (data record # 1) is written to the duplicate database 14, and then the data record (data record # 1) is deleted from the memory 22. The system 10 according to the present embodiment is realized.

上述したように、本実施形態に係るシステム10においては、上記のような作用により、ソース・データベース12に格納されたデータ・レコードを複製データベース14にコピーする場合、ソース・データベース12に格納されたデータ・レコードのサイズが増えても、メモリ22の容量を増設する必要なく、高速で、複製データベース14へのコピーを完了することが可能となる。   As described above, in the system 10 according to the present embodiment, when the data record stored in the source database 12 is copied to the duplicate database 14 by the operation as described above, the data record stored in the source database 12 is stored. Even if the size of the data record increases, copying to the replication database 14 can be completed at high speed without the need to increase the capacity of the memory 22.

また、データ取得部16およびデータ書込部のメモリの容量が十分にある場合には、並行して複数のバルク・コピーを実施しても良い。 以上、本発明を実施するための最良の形態について、添付図面を参照しながら説明したが、本発明はかかる構成に限定されない。特許請求の範囲の発明された技術的思想の範疇において、当業者であれば、各種の変更例及び修正例に想到し得るものであり、それら変更例及び修正例についても本発明の技術的範囲に属するものと了解される。   If the data acquisition unit 16 and the data writing unit have sufficient memory capacity, a plurality of bulk copies may be performed in parallel. The best mode for carrying out the present invention has been described above with reference to the accompanying drawings, but the present invention is not limited to such a configuration. Within the scope of the invented technical idea of the scope of claims, a person skilled in the art can conceive of various changes and modifications. The technical scope of the present invention is also applicable to these changes and modifications. It is understood that it belongs to.

例えば、本実施形態では、図1に示すように、データ取得部16とデータ書込部18とがインターネットのような通信ネットワーク19を介して接続された構成例を説明したが、本発明に係るシステムおよび方法は、このような構成に限定されるものではなく、通信ネットワークを排して、データ取得部16とデータ書込部18とをダイレクトに接続するようにしても良い。   For example, in the present embodiment, as illustrated in FIG. 1, the configuration example in which the data acquisition unit 16 and the data writing unit 18 are connected via the communication network 19 such as the Internet has been described. The system and method are not limited to such a configuration, and the data acquisition unit 16 and the data writing unit 18 may be directly connected without the communication network.

本発明に係るデータ一致化のためのシステムおよび方法は、ソース・データベースと複製データベースとを備えてなる、例えば、自治体の住民データ管理のためのデータベース・システムや、金融機関、証券会社、保険会社等のデータベース・システムにも好適に適用される。   The system and method for data matching according to the present invention comprises a source database and a replica database. For example, a database system for resident data management of a local government, a financial institution, a securities company, an insurance company The present invention is also preferably applied to a database system such as

10 システム
12 ソース・データベース
14 複製データベース
16 データ取得部
18 データ書込部
19 通信ネットワーク
20 受信部
22 メモリ
24 書込部
60 ソース・データベース
62 サーバ
64 データ取得部
66 メモリ
68 データ書込部
70 複製データベース
DESCRIPTION OF SYMBOLS 10 System 12 Source database 14 Replication database 16 Data acquisition part 18 Data writing part 19 Communication network 20 Reception part 22 Memory 24 Writing part 60 Source database 62 Server 64 Data acquisition part 66 Memory 68 Data writing part 70 Replica database

Claims (3)

バルクコピーを用いてソース・データベースと複製データベースとの間のデータ一致化を図るためのシステムであって、
前記ソース・データベースに格納された複数のデータ・レコードを順次取得しながら順次送出する取得手段と、
前記取得手段によって順次送出されたデータ・レコードを順次受け取ってメモリに順次格納する格納手段と、
前記メモリにデータ・レコードが格納されると、前記格納されたデータ・レコードを、後続するデータ・レコードが前記メモリに格納されている途中であっても、前記複製データベースに書き込み、書き込み終了後、このデータ・レコードを、前記メモリから削除する書込手段とを備え、
前記書込手段が、前記メモリに格納されたデータ・レコードの前記複製データベースへの書き込みと、書き込み終了後の前記メモリからの削除とを、前記メモリに格納されたデータ・レコードが存在しなくなるまで繰り返すことによって、前記ソース・データベースに格納されたデータ・レコードと、前記複製データベースに格納されたデータ・レコードとの一致化を図り、
前記取得手段と、前記格納手段とが、通信ネットワークを介して接続され、前記取得手段が、Webサーバであ
前記ソース・データベースと前記書込手段とがダイレクトに接続しないように、前記ソース・データベースと前記書込手段との間に、前記Webサーバを設けるようにした、データ一致化システム。
A system for achieving data consistency between a source database and a duplicate database using bulk copy ,
Obtaining means for sequentially sending out a plurality of data records stored in the source database;
Storage means for sequentially receiving the data records sequentially sent by the obtaining means and sequentially storing them in a memory;
When a data record is stored in the memory, the stored data record is written to the duplicate database even when a subsequent data record is being stored in the memory. Writing means for deleting the data record from the memory;
The writing means writes the data record stored in the memory to the duplicate database and deletes the data record from the memory after the writing is completed until there is no data record stored in the memory. By repeating, the data record stored in the source database and the data record stored in the duplicate database are matched,
Said acquisition means, said storage means being connected through a communication network, said acquiring means, Ri Oh the Web server,
A data matching system in which the Web server is provided between the source database and the writing means so that the source database and the writing means are not directly connected .
前記取得手段および前記格納手段と、前記書込手段とは、独立して動作する、請求項1に記載のデータ一致化システム。   The data matching system according to claim 1, wherein the acquisition unit, the storage unit, and the writing unit operate independently. バルクコピーを用いてソース・データベースと複製データベースとの間のデータ一致化を図るための方法であって、
前記ソース・データベースに格納された複数のデータ・レコードをWebサーバが順次取得しながら順次送出し、
前記順次送出されたデータ・レコードを順次受け取ってメモリに順次格納し、
前記メモリにデータ・レコードが格納されると、前記格納されたデータ・レコードを、後続するデータ・レコードが前記メモリに格納されている途中であっても、前記複製データベースに書き込み、書き込み終了後、このデータ・レコードを、前記メモリから削除し、
前記メモリに格納されたデータ・レコードの前記複製データベースへの書き込みと、書き込み終了後の前記メモリからの削除とを、前記メモリに格納されたデータ・レコードが存在しなくなるまで繰り返すことによって、前記ソース・データベースに格納されたデータ・レコードと、前記複製データベースに格納されたデータ・レコードとの一致化を図るようにし
前記ソース・データベースと前記メモリとがダイレクトに接続しないように、前記ソース・データベースと前記メモリとの間に、前記Webサーバを設けるようにした、データ一致化方法。
A method for achieving data matching of between the source database and the duplicate database using bulk copy,
The Web server sequentially sends out a plurality of data records stored in the source database,
Sequentially receiving and sequentially storing the sequentially sent data records in memory;
When a data record is stored in the memory, the stored data record is written to the duplicate database even when a subsequent data record is being stored in the memory. Delete this data record from the memory,
By repeating the writing of the data record stored in the memory to the duplicate database and the deletion from the memory after completion of the writing until the data record stored in the memory does not exist, the source The data records stored in the database are matched with the data records stored in the duplicate database ;
A data matching method in which the Web server is provided between the source database and the memory so that the source database and the memory are not directly connected .
JP2014083183A 2014-04-14 2014-04-14 Method and system for data matching Active JP5836422B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014083183A JP5836422B2 (en) 2014-04-14 2014-04-14 Method and system for data matching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014083183A JP5836422B2 (en) 2014-04-14 2014-04-14 Method and system for data matching

Publications (2)

Publication Number Publication Date
JP2015203985A JP2015203985A (en) 2015-11-16
JP5836422B2 true JP5836422B2 (en) 2015-12-24

Family

ID=54597411

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014083183A Active JP5836422B2 (en) 2014-04-14 2014-04-14 Method and system for data matching

Country Status (1)

Country Link
JP (1) JP5836422B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004282382A (en) * 2003-03-14 2004-10-07 Canon Inc Network terminal equipment
US8762331B2 (en) * 2004-06-29 2014-06-24 Microsoft Corporation Concurrent transactions and page synchronization
JP2006285481A (en) * 2005-03-31 2006-10-19 Nec Corp Database replication system, database replication method, and its program
US7865572B2 (en) * 2007-01-08 2011-01-04 Mspot, Inc. Method and apparatus for transferring digital content from a personal computer to a mobile handset
JP2009302879A (en) * 2008-06-12 2009-12-24 Konica Minolta Business Technologies Inc Image processing apparatus
JP4589427B2 (en) * 2008-08-06 2010-12-01 株式会社日立製作所 Database management method, database management apparatus, and database management program
JP2010166313A (en) * 2009-01-15 2010-07-29 Fuji Xerox Co Ltd Communication control device and image processor

Also Published As

Publication number Publication date
JP2015203985A (en) 2015-11-16

Similar Documents

Publication Publication Date Title
US11003646B2 (en) Data isolation in a blockchain network
Scanlon Battling the digital forensic backlog through data deduplication
US11741046B2 (en) Method and apparatus for creating system disk snapshot of virtual machine
US8676749B2 (en) Statement logging in databases
JP6725742B2 (en) File storage, object storage, and storage systems
US9075839B2 (en) Method, apparatus and database system for restoring tenant data in a multi-tenant environment
CN105574187B (en) A method and system for ensuring consistency of replicated transactions in heterogeneous databases
WO2016177026A1 (en) Data processing method and apparatus of decentralized autonomous organization
CN107122355A (en) Data mover system and method
US20190294505A1 (en) Object store for database backups
US20170220426A1 (en) Maintaining files in a retained file system
JP2013509646A (en) Backup using metadata virtual hard drive and differential virtual hard drive
US20170235643A1 (en) Data recovery from multiple data backup technologies
WO2019073324A1 (en) File system content based security
US20230185559A1 (en) Managing a federated software repository across multiple devices
US10031904B2 (en) Database management system based on a spreadsheet concept deployed in an object grid
Leimich et al. A RAM triage methodology for Hadoop HDFS forensics
US10761945B2 (en) Dynamically directing data in a deduplicated backup system
WO2015087509A1 (en) State storage and restoration device, state storage and restoration method, and storage medium
CN110121694A (en) A kind of blog management method, server and Database Systems
US9547652B2 (en) System and method for validating replication of mutable operations performed on a file system object during a migration
JP5836422B2 (en) Method and system for data matching
US10620872B2 (en) Replicating data in a data storage system
US20120317073A1 (en) Replication Support for Procedures with Arguments of Unsupported Types
JP5836423B2 (en) Data matching confirmation method and system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150526

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20150813

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151102

R150 Certificate of patent or registration of utility model

Ref document number: 5836422

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250