JP2013171495A - Data management device, data management method and data management program - Google Patents

Data management device, data management method and data management program Download PDF

Info

Publication number
JP2013171495A
JP2013171495A JP2012036002A JP2012036002A JP2013171495A JP 2013171495 A JP2013171495 A JP 2013171495A JP 2012036002 A JP2012036002 A JP 2012036002A JP 2012036002 A JP2012036002 A JP 2012036002A JP 2013171495 A JP2013171495 A JP 2013171495A
Authority
JP
Japan
Prior art keywords
attribute information
storage unit
attribute
date
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012036002A
Other languages
Japanese (ja)
Inventor
Rie Sakai
理江 酒井
Masahiko Minaguchi
正彦 水口
Shinichi Nakagawa
真一 中川
Takahiko Murayama
隆彦 村山
Junichi Akahani
淳一 赤埴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2012036002A priority Critical patent/JP2013171495A/en
Publication of JP2013171495A publication Critical patent/JP2013171495A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To easily provide a data transition.SOLUTION: A data management device comprises: a memory section; a storage section; and a retrieval section. The memory section stores attribute information about a predetermined thing and an expiration date indicating a date that the attribute information corresponds to an attribute of the thing in association with each other. The storage section updates an expiration date indicating that a present time is within the expiration date among expiration dates stored in the memory section to a date that the latest attribute information corresponding to the expiration date does not correspond to the attribute of the thing when receiving an update request for updating the attribute information, and stores a new attribute information included in the update request and an expiration date indicating that the new attribute information corresponds to the attribute of the thing at the present time in the memory section. The retrieval section retrieves attribute information included in a retrieval request from the memory section when receiving the retrieval request of the attribute information.

Description

本発明の実施形態は、データ管理装置、データ管理方法及びデータ管理プログラムに関する。   Embodiments described herein relate generally to a data management device, a data management method, and a data management program.

従来、情報システムでは、膨大なデータがデータ記憶装置などにより管理されることが多い。例えば、企業内の情報システムでは、膨大なデータが共有資産として管理されている。このようなデータ記憶装置には最新データが保持され、データの変更履歴についてはログ(例えば、トランザクションログなど)として保持されることが多い。このため、利用者は、データの変更ログを参照することで、過去データの取得が可能となる。   Conventionally, in an information system, a large amount of data is often managed by a data storage device or the like. For example, in an information system in a company, a huge amount of data is managed as a shared asset. In such a data storage device, the latest data is held, and the data change history is often held as a log (for example, a transaction log). For this reason, the user can acquire past data by referring to the data change log.

ここで、上述した膨大なデータ及び変更ログに関する技術の一例について説明する。上記の通り、企業内には膨大なデータが存在するが、かかる膨大なデータは、異なる情報システムにおいて蓄積されたり、組織毎に異なるフォーマットで蓄積されたりする。近年では、このような膨大なデータの有効活用を図る技術が知られている。例えば、企業内の情報システムを連結することでデータ連携を図るEAI(Enterprise Application Integration)や、企業内の知識共有を図るナレッジマネジメントや、多くのデータベースにおいて共通して保持される基本的な情報(例えば、製品、顧客、会計、社員に関する情報など)であるマスターデータを統合活用するためのMDM(Master Data Management)など技術が知られている。また、DWH(Data WareHouse)においては、現在のデータだけでなく過去のデータを用いた時間変化を含む分析が可能となりつつある。   Here, an example of a technique related to the enormous data and change log described above will be described. As described above, an enormous amount of data exists in a company, but such enormous data is accumulated in different information systems or in different formats for each organization. In recent years, techniques for effectively utilizing such a large amount of data are known. For example, EAI (Enterprise Application Integration) that links data by linking information systems within a company, knowledge management for sharing knowledge within a company, and basic information that is commonly held in many databases ( For example, technologies such as MDM (Master Data Management) for integrating and utilizing master data, such as information on products, customers, accounting, and employees, are known. In addition, in DWH (Data WareHouse), analysis including temporal changes using not only current data but also past data is becoming possible.

上記例において、MDMでは、基本的に最新データのみをマスターデータとして保持し、過去データの管理を省くことによりデータのスリム化とデータアクセス処理の軽減を図っている。また、MDMでは、マスターデータの変更ログが保持されることが多いので、過去データの参照を可能である。   In the above example, the MDM basically holds only the latest data as master data, and omits management of past data, thereby reducing data and reducing data access processing. In addition, in the MDM, since a change log of master data is often retained, past data can be referred to.

MDM One MI、”ASTERIA MDM One MI 機能一覧”、[online]、[平成24年2月1日検索]、インターネット<http://www.infoteria.com/jp/asteriamdmone/product/mi_function.php>MDM One MI, “ASTERIA MDM One MI Function List”, [online], [Search February 1, 2012], Internet <http://www.infoteria.com/jp/asteriamdmone/product/mi_function.php>

しかしながら、上記従来のデータ管理手法では、データの変遷を容易に提供することが困難であった。例えば、上記のマスターデータに社員ID及び所属組織に関するデータが保持されており、利用者が、特定の社員における所属組織の変遷を閲覧するものとする。このとき、上記の従来手法によりデータ管理が行われている場合、利用者は、データの変遷が記憶されているトランザクションログ自体を解析することにより、所属組織の変遷を閲覧することができるとも考えられる。しかし、かかる手法では、膨大なトランザクションログを解析することになるので、利用者にかかる手間が増大する。また、利用者は、トランザクションログを用いてロールバックすることにより過去データを閲覧することができるとも考えられる。しかし、かかる手法は、過去の複数時点におけるマスターデータの状態に何度もロールバックすることを要するので、データの変遷を閲覧する作業としては現実的でない。このようなことから、上記従来のデータ管理手法では、特定のデータの変遷を利用者に提供することも困難であった。   However, with the conventional data management method, it is difficult to easily provide data transition. For example, it is assumed that the above-described master data holds data regarding employee IDs and affiliated organizations, and the user views changes in affiliated organizations of specific employees. At this time, when data management is performed by the above-described conventional method, it is considered that the user can browse the transition of the organization to which the user belongs by analyzing the transaction log itself in which the transition of the data is stored. It is done. However, with this method, a large amount of transaction logs are analyzed, which increases the time and effort for the user. It is also considered that the user can browse past data by rolling back using a transaction log. However, such a technique requires rolling back to the master data state at a plurality of past points in time, so that it is not realistic as a work for browsing data transition. For this reason, it is difficult to provide the user with specific data transitions by the conventional data management method.

本願の開示する技術は、上記に鑑みてなされたものであって、データの変遷を容易に提供することができるデータ管理装置、データ管理方法及びデータ管理プログラムを提供することを目的とする。   The technology disclosed in the present application has been made in view of the above, and an object thereof is to provide a data management device, a data management method, and a data management program capable of easily providing data transition.

実施形態に係るデータ管理装置は、所定の事物に関する属性情報と、当該属性情報が当該事物の属性に該当する期限を示す有効期限とを対応付けて記憶する記憶部と、前記属性情報を更新する旨の更新要求を受け付けた場合に、前記記憶部に記憶されている有効期限のうち現時点が有効期限内であることを示す有効期限を、当該有効期限に対応する最新属性情報が前記事物の属性に該当しなくなった日付に更新し、前記更新要求に含まれる新たな属性情報と当該新たな属性情報が現時点で前記事物の属性に該当することを示す有効期限とを前記記憶部に格納する格納部と、前記属性情報の検索要求を受け付けた場合に、当該検索要求に含まれる属性情報を前記記憶部から検索する検索部とを備えることを特徴とする。   The data management apparatus according to the embodiment updates attribute information related to a predetermined thing, a storage unit that associates and stores an expiration date indicating a time limit corresponding to the attribute of the thing, and the attribute information. When an update request is received, an expiration date indicating that the current time is within the expiration date among the expiration dates stored in the storage unit, and the latest attribute information corresponding to the expiration date is the Update to a date that no longer corresponds to an attribute, and store in the storage unit new attribute information included in the update request and an expiration date indicating that the new attribute information currently corresponds to the attribute of the thing And a search unit that searches the storage unit for attribute information included in the search request when a search request for the attribute information is received.

実施形態に係るデータ管理装置、データ管理方法及びデータ管理プログラムは、データの変遷を容易に提供することができるという効果を奏する。   The data management device, the data management method, and the data management program according to the embodiment have an effect that data transition can be easily provided.

図1は、実施例1に係るデータ管理装置の構成例を示す図である。FIG. 1 is a diagram illustrating a configuration example of a data management apparatus according to the first embodiment. 図2は、実施例1に係るマスターデータテーブルの一例を示す図である。FIG. 2 is a diagram illustrating an example of a master data table according to the first embodiment. 図3は、実施例1に係るデータ管理装置による格納処理手順を示すフローチャートである。FIG. 3 is a flowchart illustrating the storage processing procedure performed by the data management apparatus according to the first embodiment. 図4は、実施例1に係るデータ管理装置による検索処理手順を示すフローチャートである。FIG. 4 is a flowchart illustrating a search processing procedure performed by the data management apparatus according to the first embodiment. 図5は、参考例に係るデータ管理装置が有するデータ例を示す図である。FIG. 5 is a diagram illustrating an example of data included in the data management apparatus according to the reference example. 図6は、参考例に係るデータ管理装置による検索処理手順を示すフローチャートである。FIG. 6 is a flowchart illustrating a search processing procedure performed by the data management apparatus according to the reference example. 図7は、実施例2に係るデータ管理装置の構成例を示す図である。FIG. 7 is a diagram illustrating a configuration example of the data management apparatus according to the second embodiment. 図8は、実施例2に係る社員IDテーブルの一例を示す図である。FIG. 8 is a diagram illustrating an example of an employee ID table according to the second embodiment. 図9は、実施例2に係る組織履歴テーブルの一例を示す図である。FIG. 9 is a diagram illustrating an example of the organization history table according to the second embodiment. 図10は、実施例2に係る内線履歴テーブルの一例を示す図である。FIG. 10 is a diagram illustrating an example of the extension history table according to the second embodiment. 図11は、実施例2に係るデータ管理装置による格納処理手順を示すフローチャートである。FIG. 11 is a flowchart illustrating a storage processing procedure performed by the data management apparatus according to the second embodiment. 図12は、実施例2に係るデータ管理装置による検索処理手順を示すフローチャートである。FIG. 12 is a flowchart illustrating a search processing procedure performed by the data management apparatus according to the second embodiment. 図13は、実施例2に係る属性管理テーブルの一例を示す図である。FIG. 13 is a diagram illustrating an example of an attribute management table according to the second embodiment. 図14は、データ管理プログラムを実行するコンピュータを示す図である。FIG. 14 is a diagram illustrating a computer that executes a data management program.

以下に、本願に係るデータ管理装置、データ管理方法及びデータ管理プログラムの実施例を図面に基づいて詳細に説明する。なお、この実施例により本願に係るデータ管理装置、データ管理方法及びデータ管理プログラムが限定されるものではない。   Hereinafter, embodiments of a data management device, a data management method, and a data management program according to the present application will be described in detail with reference to the drawings. The data management apparatus, data management method, and data management program according to the present application are not limited to the embodiment.

[実施例1に係るデータ管理装置の構成]
まず、図1を用いて、実施例1に係るデータ管理装置について説明する。図1は、実施例1に係るデータ管理装置100の構成例を示す図である。実施例1では、図1に示したデータ管理装置100が、基本的な情報(例えば、製品、顧客、会計、社員に関する情報等)であるマスターデータを記憶するものとして説明する。
[Configuration of Data Management Device According to Embodiment 1]
First, the data management apparatus according to the first embodiment will be described with reference to FIG. FIG. 1 is a diagram illustrating a configuration example of the data management apparatus 100 according to the first embodiment. In the first embodiment, it is assumed that the data management apparatus 100 illustrated in FIG. 1 stores master data that is basic information (for example, information about products, customers, accounts, employees, and the like).

図1に例示するように、実施例1に係るデータ管理装置100は、IF(interface)部110と、記憶部120と、受付部131と、格納部132と、検索部133とを有する。   As illustrated in FIG. 1, the data management apparatus 100 according to the first embodiment includes an IF (interface) unit 110, a storage unit 120, a reception unit 131, a storage unit 132, and a search unit 133.

IF部110は、データ管理装置100以外の他の装置との間でデータを送受信する。例えば、IF部110は、通信制御を行う電子回路や、NIC(Network Interface Card)等によって実現される。   The IF unit 110 transmits and receives data to and from devices other than the data management device 100. For example, the IF unit 110 is realized by an electronic circuit that performs communication control, a NIC (Network Interface Card), or the like.

記憶部120は、各種データを記憶する記憶デバイスであり、例えば、ハードディスク、光ディスク、又は、RAM(Random Access Memory)、フラッシュメモリ(Flash Memory)等の半導体メモリ素子によって実現される。   The storage unit 120 is a storage device that stores various data, and is realized by, for example, a hard disk, an optical disk, or a semiconductor memory element such as a RAM (Random Access Memory) or a flash memory (Flash Memory).

実施例1に係る記憶部120は、図1に例示するように、マスターデータテーブル121を有する。マスターデータテーブル121は、所定の事物に関する属性情報と、かかる属性情報が事物の属性に該当する期間を示す有効期限とを対応付けて記憶する。   The storage unit 120 according to the first embodiment includes a master data table 121 as illustrated in FIG. The master data table 121 stores attribute information related to a predetermined thing and an expiration date indicating a period during which the attribute information corresponds to the attribute of the thing.

ここで、図2に、実施例1に係るマスターデータテーブル121の一例を示す。図2に例示したマスターデータテーブル121は、特定の事物である社員に関する各属性情報を記憶する。具体的には、マスターデータテーブル121は、図2に示すように、「ID」、「社員ID」、「組織名」、「内線」、「部屋番号」、「startDate」、「endDate」といった項目を有する。なお、「社員ID」、「組織名」、「内線」及び「部屋番号」は、社員の属性情報に該当する。   Here, FIG. 2 shows an example of the master data table 121 according to the first embodiment. The master data table 121 illustrated in FIG. 2 stores each piece of attribute information related to an employee that is a specific thing. Specifically, as shown in FIG. 2, the master data table 121 includes items such as “ID”, “employee ID”, “organization name”, “extension”, “room number”, “startDate”, and “endDate”. Have “Employee ID”, “Organization name”, “Extension”, and “Room number” correspond to employee attribute information.

「ID」は、マスターデータテーブル121に記憶されるレコードを識別するための識別情報を示す。すなわち、「ID」は、マスターデータテーブル121における主キー(Primary Key)に該当する。   “ID” indicates identification information for identifying a record stored in the master data table 121. That is, “ID” corresponds to a primary key in the master data table 121.

「社員ID」は、社員を識別するための識別情報を示す。かかる「社員ID」は、企業内において各社員に割り当てられる。「組織名」は、社員が所属している組織や部署等の名称を示す。「内線」は、社員に割り当てられている内線電話の番号を示す。「部屋番号」は、社員が職務を遂行する建物や部屋等を識別するための識別情報を示し、例えば、社員の作業机が置かれている部屋を示す。   “Employee ID” indicates identification information for identifying an employee. Such “employee ID” is assigned to each employee in the company. “Organization name” indicates the name of the organization or department to which the employee belongs. “Extension” indicates an extension telephone number assigned to the employee. The “room number” indicates identification information for identifying a building or a room where the employee performs his / her duties, for example, a room where the employee's work desk is placed.

「startDate」は、かかるstartDateを含むレコード内の各属性情報が社員の属性に該当することとなった最初の日付、又は、かかるstartDateを含むレコードがマスターデータテーブル121に格納された日付を示す。「endDate」は、かかるendDateを含むレコード内の各属性情報が社員の属性に該当する最終の日付、又は、かかるendDateを含むレコードの次に新たなレコードがマスターデータテーブル121に格納された日付の前日を示す。なお、図2に示した例のように、レコード内の各属性情報が現在も社員の属性に該当する場合には、「endDate」に情報が記憶されないか、又は、現在も属性に該当することを示す所定の値(例えば、データ管理装置100が運用されないことが想定される日付「3000−1−1」等)が記憶される。以下の実施例では、各属性情報が現在も社員の属性に該当する場合には、「endDate」に情報が記憶されない例を用いて説明する。   “StartDate” indicates the first date when each piece of attribute information in the record including the startDate corresponds to the employee attribute, or the date when the record including the startDate is stored in the master data table 121. “EndDate” is the last date when each attribute information in the record including the endDate corresponds to the employee attribute, or the date when the new record next to the record including the endDate is stored in the master data table 121. Indicates the previous day. In addition, as in the example shown in FIG. 2, when each attribute information in the record still corresponds to the employee attribute, the information is not stored in “endDate”, or the attribute also corresponds to the attribute at present. Is stored (for example, a date “3000-1-1” or the like on which the data management apparatus 100 is assumed not to be operated). In the following embodiments, description will be made using an example in which information is not stored in “endDate” when each piece of attribute information still corresponds to an employee attribute.

すなわち、マスターデータテーブル121に記憶されている各属性情報(社員ID、組織名、内線、部屋番号)は、「startDate」によって示される日付から「endDate」によって示される日付の間において、社員の属性に該当することを示す。言い換えれば、「startDate」及び「endDate」は、レコード内の各属性情報が社員の属性情報として有効である期限を示す。   That is, each attribute information (employee ID, organization name, extension, room number) stored in the master data table 121 is attributed to the employee attribute between the date indicated by “startDate” and the date indicated by “endDate”. Indicates that this is the case. In other words, “startDate” and “endDate” indicate a time limit during which each piece of attribute information in the record is valid as employee attribute information.

例えば、図2に示したID「000001」によって識別されるレコードは、社員ID「1122」の社員が、2009年10月1日(「startDate」)から2010年3月31日(「endDate」)において、組織名「G11」の組織(部署)に属し、内線番号「1111」が割り当てられ、部屋番号「1−1001」によって示される部屋において職務を遂行していたことを示す。   For example, the record identified by the ID “000001” shown in FIG. 2 indicates that the employee with the employee ID “1122” is from October 1, 2009 (“startDate”) to March 31, 2010 (“endDate”). In FIG. 5, the extension number “1111” belongs to the organization (department) with the organization name “G11”, and the job is performed in the room indicated by the room number “1-1001”.

また、例えば、図2に示したID「000003」によって識別されるレコードは、社員ID「1122」の社員が、2011年12月1日(「startDate」)から現在において、組織名「G13」の組織(部署)に属し、内線番号「3333」が割り当てられ、部屋番号「1−1001」によって示される部屋において職務を遂行していることを示す。   Further, for example, the record identified by the ID “000003” shown in FIG. 2 indicates that the employee with the employee ID “1122” has the organization name “G13” since December 1, 2011 (“startDate”). It indicates that it belongs to an organization (department), is assigned an extension number “3333”, and is performing duties in the room indicated by the room number “1-1001”.

このように、実施例1に係るマスターデータテーブル121は、各社員の属性情報を記憶するとともに、有効期限(「startDate」及び「endDate」)によって各属性情報を履歴管理する。   As described above, the master data table 121 according to the first embodiment stores the attribute information of each employee, and manages the history of each attribute information according to the expiration date (“startDate” and “endDate”).

なお、実施例1に係るマスターデータテーブル121は、特定の事物の属性を示す属性情報を記憶する場合には、少なくとも特定の事物を識別するための識別情報(以下、「特定情報」と表記する場合がある)を記憶する。例えば、図2に示したマスターデータテーブル121は、特定の事物「社員」の属性として、「社員ID」、「組織名」、「内線」及び「部屋番号」を記憶する。この例の場合、マスターデータテーブル121は、特定の事物である社員を識別するための特定情報「社員ID」を記憶する。   The master data table 121 according to the first embodiment stores at least identification information for identifying a specific thing (hereinafter referred to as “specific information”) when storing attribute information indicating the attribute of the specific thing. Remember). For example, the master data table 121 illustrated in FIG. 2 stores “employee ID”, “organization name”, “extension”, and “room number” as attributes of a specific thing “employee”. In the case of this example, the master data table 121 stores specific information “employee ID” for identifying an employee as a specific thing.

また、図2の例では、マスターデータテーブル121が「ID」を記憶する例を示し、以下の実施例では、マスターデータテーブル121が「ID」を記憶する例を用いて説明する。ただし、主キーが不要な場合には、マスターデータテーブル121は、「ID」を記憶しなくてもよい。   2 illustrates an example in which the master data table 121 stores “ID”. In the following embodiment, an example in which the master data table 121 stores “ID” will be described. However, when the primary key is unnecessary, the master data table 121 does not need to store “ID”.

図1の説明に戻って、受付部131は、IF部110を介して、マスターデータテーブル121を更新する旨の更新要求を受け付ける。例えば、受付部131は、マスターデータテーブル121の更新を要求する他の装置から、更新要求とともに更新データを受け付ける。   Returning to the description of FIG. 1, the accepting unit 131 accepts an update request for updating the master data table 121 via the IF unit 110. For example, the reception unit 131 receives update data together with an update request from another device that requests an update of the master data table 121.

ここで、実施例1に係る受付部131によって受け付けられる更新データについて説明する。実施例1における更新データには、マスターデータテーブル121に記憶されている全ての属性情報が含まれるものとする。例えば、マスターデータテーブル121が図2に示した例の場合、組織名のみを更新するための更新データであっても、社員ID、組織名、内線、部屋番号が含まれる。また、実施例1における更新データには、このような社員ID、組織名、内線及び部屋番号の組合せであるレコードが複数含まれる場合もある。   Here, update data received by the receiving unit 131 according to the first embodiment will be described. It is assumed that the update data in the first embodiment includes all attribute information stored in the master data table 121. For example, in the case of the example shown in FIG. 2, the master data table 121 includes employee ID, organization name, extension, and room number even if it is update data for updating only the organization name. The update data in the first embodiment may include a plurality of records that are combinations of such employee IDs, organization names, extensions, and room numbers.

また、実施例1における更新データには、更新対象の属性情報を有効にする日付(以下、「有効日付」と表記する場合がある)が含まれる場合もある。かかる「有効日付」は、更新対象の属性情報が上記特定の事物の属性に該当することとなる最初の日付を示す。言い換えれば、「有効日付」は、組織、内線、部屋番号の変更が社員に発令される日付を示す。例えば、図2に示した例において、社員ID「2233」の社員が組織名「G13」の組織に「2012年1月1日」付けで所属することになったものとする。このとき、社員ID「2233」の組織名を「G13」に更新するための更新データには、社員ID「2233」及び組織名「G13」に加えた、社員が新たな組織に属する最初の日付である「2012年1月1日(データとしては、2012−1−1や20120101等)」が含まれる場合がある。更新データの送信元は、更新データに有効日付を含めることで、属性情報が変更となる日に更新データをデータ管理装置100に送信しなくても、マスターデータテーブル121に属性情報が変更日を登録することができる。   In addition, the update data according to the first embodiment may include a date for validating the attribute information to be updated (hereinafter, sometimes referred to as “valid date”). The “valid date” indicates the first date when the attribute information to be updated corresponds to the attribute of the specific thing. In other words, the “effective date” indicates the date when the change of the organization, extension, and room number is issued to the employee. For example, in the example shown in FIG. 2, it is assumed that the employee with the employee ID “2233” belongs to the organization with the organization name “G13” with “January 1, 2012”. At this time, the update data for updating the organization name of the employee ID “2233” to “G13” includes the first date that the employee belongs to the new organization in addition to the employee ID “2233” and the organization name “G13”. “January 1, 2012 (as data, 2012-1-1, 20120101, etc.)” may be included. The transmission source of the update data includes the effective date in the update data, so that the update date of the attribute information is displayed in the master data table 121 without sending the update data to the data management apparatus 100 on the date when the attribute information is changed. You can register.

なお、上記例では、データ管理装置100が他の装置から更新データを受信する例を示したが、データ管理装置100は、利用者によって直接操作されることによって更新データを受け付けてもよい。例えば、データ管理装置100は、図示しない入力部(キーボード、マウス等)及び表示部(液晶表示装置等)を有し、かかる入力部を介して利用者により更新データが入力されてもよい。かかる場合には、受付部131は、入力部を介して入力された更新データを受け付ける。   In the above example, the data management apparatus 100 receives the update data from another apparatus. However, the data management apparatus 100 may accept the update data by being directly operated by the user. For example, the data management apparatus 100 may include an input unit (keyboard, mouse, etc.) and a display unit (liquid crystal display device, etc.) not shown, and update data may be input by the user via the input unit. In such a case, the accepting unit 131 accepts update data input via the input unit.

格納部132は、受付部131によって受け付けられた更新データをマスターデータテーブル121に格納する。具体的には、格納部132は、更新要求を受け付けた場合に、マスターデータテーブル121に記憶されている属性情報のうち最も新しい社員の属性情報に対応する有効期限(startDate、endDate)をかかる最も新しい属性情報が社員の属性に該当しなくなったことを示す有効期限に更新する。さらに、格納部132は、更新要求に含まれる新たな属性情報と、かかる新たな属性情報が現時点で社員の属性に該当することを示す有効期限とをマスターデータテーブル121に格納する。   The storage unit 132 stores the update data received by the receiving unit 131 in the master data table 121. Specifically, when the update request is received, the storage unit 132 applies the expiration date (startDate, endDate) corresponding to the attribute information of the newest employee among the attribute information stored in the master data table 121. Update the expiration date to indicate that the new attribute information is no longer an employee attribute. Further, the storage unit 132 stores new attribute information included in the update request and an expiration date indicating that the new attribute information currently corresponds to the employee attribute in the master data table 121.

より具体的に説明すると、格納部132は、受付部131によって更新データが受け付けられた場合に、更新データに含まれる特定情報と同一の情報がマスターデータテーブル121に記憶されているか否かを判定する。言い換えれば、格納部132は、更新対象となるレコードがマスターデータテーブル121に存在するか否かを判定する。例えば、図2に示したマスターデータテーブル121の例では、社員に関する属性情報を記憶するので、更新データには少なくとも社員IDが含まれる。この例の場合、格納部132は、更新データに含まれる特定情報「社員ID」がマスターデータテーブル121に記憶されている場合には、更新対象となるレコードが存在すると判定する。一方、格納部132は、更新データに含まれる特定情報「社員ID」がマスターデータテーブル121に記憶されていない場合には、更新対象となるレコードが存在しないと判定する。   More specifically, the storage unit 132 determines whether or not the same information as the specific information included in the update data is stored in the master data table 121 when the update data is received by the reception unit 131. To do. In other words, the storage unit 132 determines whether a record to be updated exists in the master data table 121. For example, in the example of the master data table 121 shown in FIG. 2, attribute information related to the employee is stored, so that the update data includes at least the employee ID. In the case of this example, when the specific information “employee ID” included in the update data is stored in the master data table 121, the storage unit 132 determines that there is a record to be updated. On the other hand, if the specific information “employee ID” included in the update data is not stored in the master data table 121, the storage unit 132 determines that there is no record to be updated.

そして、格納部132は、更新対象となるレコードが存在しない場合には、更新データに含まれる各属性情報を新たなレコードとしてマスターデータテーブル121に格納する。このとき、格納部132は、更新データに有効日付が含まれる場合には、「startDate」に有効日付を格納し、更新データに有効日付が含まれない場合には、「startDate」に現在日付を格納する。また、格納部132は、「endDate」には情報を格納しない。   When there is no record to be updated, the storage unit 132 stores each attribute information included in the update data in the master data table 121 as a new record. At this time, the storage unit 132 stores the effective date in “startDate” when the update data includes the effective date, and stores the current date in “startDate” when the update data does not include the effective date. Store. In addition, the storage unit 132 does not store information in “endDate”.

一方、格納部132は、更新対象となるレコードが存在する場合には、更新対象となるレコードのうち、「endDate」に情報が記憶されていないレコードを最新レコードとして特定する。そして、格納部132は、かかる最新レコードに記憶されている各属性情報が、更新データに含まれる各属性情報と全て同一であるか否かを判定する。このとき、格納部132は、更新データと最新レコードが同一である場合には、かかる更新データを用いた格納処理を行わない。   On the other hand, when there is a record to be updated, the storage unit 132 specifies a record in which information is not stored in “endDate” among the records to be updated as the latest record. Then, the storage unit 132 determines whether or not each attribute information stored in the latest record is the same as each attribute information included in the update data. At this time, if the update data and the latest record are the same, the storage unit 132 does not perform a storage process using the update data.

一方、格納部132は、更新データと最新レコードが同一でない場合には、更新データに含まれる有効日付から「1日(24時間)」を減算した日付を最新レコードの「endDate」に格納する。このとき、格納部132は、更新データに有効日付が含まれない場合には、現在日付から「1日(24時間)」を減算した日付を最新レコードの「endDate」に格納する。また、格納部132は、受付部131によって受け付けられた更新データを新たなレコードとしてマスターデータテーブル121に格納する。このとき、格納部132は、上記例と同様に、「startDate」に有効日付又は現在日付を格納し、「endDate」に情報を格納しない。   On the other hand, when the update data and the latest record are not the same, the storage unit 132 stores the date obtained by subtracting “1 day (24 hours)” from the valid date included in the update data in “endDate” of the latest record. At this time, when the update data does not include the valid date, the storage unit 132 stores the date obtained by subtracting “1 day (24 hours)” from the current date in “endDate” of the latest record. In addition, the storage unit 132 stores the update data received by the receiving unit 131 in the master data table 121 as a new record. At this time, the storage unit 132 stores the effective date or the current date in “startDate” and does not store the information in “endDate”, as in the above example.

かかる格納部132による格納処理について図2に示した例を用いて説明する。ここでは、マスターデータテーブル121に、ID「000001」であるレコードのみが記憶されているものとする。この状態において、受付部131によって、社員ID「1122」、組織名「G12」、内線「1111」、部屋番号「1−1001」及び有効日付「2010−4−1」を含む更新データが受け付けられたものとする。かかる場合に、格納部132は、更新データに含まれる社員ID「1122」がマスターデータテーブル121に記憶されているか否かを判定する。ここの例では、マスターデータテーブル121には社員ID「1122」が記憶されているので、格納部132は、更新対象となるレコードが存在すると判定する。かかる場合に、格納部132は、社員ID「1122」と一致するレコード(社員IDが「1122」であるレコード)のうち、「endDate」がNULLであるレコードを最新レコードとして特定する。ここの例では、格納部132は、IDが「000001」であるレコードを最新レコードとして特定する。   The storage processing by the storage unit 132 will be described using the example shown in FIG. Here, it is assumed that only the record with ID “000001” is stored in the master data table 121. In this state, the reception unit 131 receives update data including the employee ID “1122”, the organization name “G12”, the extension “1111”, the room number “1-1001”, and the effective date “2010-4-1”. Shall be. In such a case, the storage unit 132 determines whether or not the employee ID “1122” included in the update data is stored in the master data table 121. In this example, since the employee ID “1122” is stored in the master data table 121, the storage unit 132 determines that there is a record to be updated. In such a case, the storage unit 132 identifies a record whose “endDate” is NULL among the records that match the employee ID “1122” (the record whose employee ID is “1122”) as the latest record. In this example, the storage unit 132 identifies the record having the ID “000001” as the latest record.

そして、格納部132は、IDが「000001」であるレコードの「endDate」に、更新データに含まれる有効日付「2010−4−1」から1日を減算した日付「2010−3−31」を格納する。さらに、格納部132は、更新データに含まれる社員ID「1122」、組織名「G12」、内線「1111」及び部屋番号「1−1001」を新たなレコードとしてマスターデータテーブル121に格納する。このとき、格納部132は、新たなレコードの「startDate」に有効日付「2010−4−1」を格納し、「endDate」に情報を格納しない。このようにして、格納部132は、図2のID「000002」に示した例のようなレコードをマスターデータテーブル121に新たに格納する。   Then, the storage unit 132 adds a date “2010-3-31” obtained by subtracting one day from the effective date “2010-4-1” included in the update data to the “endDate” of the record whose ID is “000001”. Store. Further, the storage unit 132 stores the employee ID “1122”, the organization name “G12”, the extension “1111”, and the room number “1-1001” included in the update data in the master data table 121 as new records. At this time, the storage unit 132 stores the effective date “2010-4-1” in “startDate” of the new record and does not store information in “endDate”. In this way, the storage unit 132 newly stores a record such as the example indicated by the ID “000002” in FIG. 2 in the master data table 121.

なお、格納部132は、新たなレコードのIDについては、マスターデータテーブル121に記憶されていない番号を付与する。例えば、格納部132は、マスターデータテーブル121に記憶されているIDの最大値に「1」をインクリメントした値を新たなレコードのIDとする。   The storage unit 132 assigns a number that is not stored in the master data table 121 to the ID of the new record. For example, the storage unit 132 sets a value obtained by incrementing “1” to the maximum value of the ID stored in the master data table 121 as the ID of the new record.

また、上記例の後に、受付部131によって、社員ID「1122」、組織名「G13」、内線「3333」、部屋番号「1−1001」及び有効日付「2011−12−1」を含む更新データが受け付けられたものとする。かかる場合に、格納部132は、図2に示した例のように、IDが「000002」であるレコードの「endDate」に「2011−11−30」を格納し、IDが「000003」であるレコードを格納する。   Further, after the above example, the reception unit 131 causes the reception unit 131 to update data including the employee ID “1122”, the organization name “G13”, the extension “3333”, the room number “1-1001”, and the effective date “2011-12-1”. Is accepted. In this case, the storage unit 132 stores “2011-11-30” in “endDate” of the record whose ID is “000002”, and the ID is “000003”, as in the example illustrated in FIG. Store records.

また、受付部131によって、社員ID「2233」、組織名「G12」、内線「2222」、部屋番号「1−1001」及び有効日付「2011−4−1」を含む更新データが受け付けられたものとする。かかる場合に、格納部132は、マスターデータテーブル121に社員ID「2233」が記憶されていないので、図2に示した例のように、IDが「000004」であるレコードをマスターデータテーブル121に新たに格納する。   Also, update data including an employee ID “2233”, an organization name “G12”, an extension “2222”, a room number “1-1001”, and an effective date “2011-4-1” is received by the reception unit 131. And In this case, since the employee ID “2233” is not stored in the master data table 121, the storage unit 132 stores the record having the ID “000004” in the master data table 121 as in the example illustrated in FIG. 2. Store new.

検索部133は、IF部110を介して検索要求を受け付けた場合に、かかる検索要求に従って、マスターデータテーブル121から各種データを検索する。例えば、検索部133は、特定情報、及び、検索対象の属性情報の名称(カラム名)を含む検索要求を受け付ける。かかる場合に、検索部133は、検索要求に含まれる特定情報をキーとして、「検索対象の属性情報」及び「startDate」をマスターデータテーブル121から検索する。そして、検索部133は、検索結果の属性情報をstartDateの降順にソートする。さらに、検索部133は、ソート後の属性情報に同一の属性情報が連続して存在する場合には、連続する属性情報のうち、最後の属性情報を除く他の属性情報を削除する。そして、検索部133は、ソートかつ重複情報削除後の属性情報及びstartDateが記載された検索結果一覧を生成し、生成した検索結果一覧を検索要求の送信元に通知する。   When the search unit 133 receives a search request via the IF unit 110, the search unit 133 searches various data from the master data table 121 according to the search request. For example, the search unit 133 receives a search request including specific information and the name (column name) of attribute information to be searched. In this case, the search unit 133 searches the master data table 121 for “search target attribute information” and “startDate” using the specific information included in the search request as a key. Then, the search unit 133 sorts the attribute information of the search results in descending order of startDate. Furthermore, when the same attribute information is continuously present in the sorted attribute information, the search unit 133 deletes other attribute information other than the last attribute information from the consecutive attribute information. And the search part 133 produces | generates the search result list | wrist with which attribute information and startDate after sorting and duplication information deletion were described, and notifies the produced | generated search result list | wrist to the transmission origin of a search request.

かかる検索部133による検索処理について図2に示した例を用いて説明する。例えば、検索部133が、社員ID「1122」、及び、検索対象の属性情報の名称「内線」を含む検索要求を受け付けたものとする。かかる場合に、検索部133は、社員ID「1122」をキーにマスターデータテーブル121を検索することで、「内線」及び「startDate」を取得する。ここの例では、検索部133は、内線「1111」及びstartDate「2009−10−1」の組合せと、内線「1111」及びstartDate「2010−4−1」の組合せと、内線「3333」及びstartDate「2011−12−1」の組合せとを取得する。そして、検索部133は、startDateの降順にソートすることで、内線を「3333」、「1111」、「1111」に並び替える。さらに、検索部133は、内線「1111」が連続して存在するので、かかる2個の内線のうち先頭の「1111」を削除する。そして、検索部133は、内線「3333」及びstartDate「2011−12−1」、内線「1111」及びstartDate「2009−10−1」の順に記載された検索結果一覧を検索要求の送信元に通知する。これにより、かかる検索結果一覧を参照するユーザは、社員IDが「1122」である社員に割り当てられた内線番号の変遷を確認することができる。   The search process by the search unit 133 will be described using the example shown in FIG. For example, it is assumed that the search unit 133 receives a search request including the employee ID “1122” and the name “extension” of the attribute information to be searched. In this case, the search unit 133 searches the master data table 121 using the employee ID “1122” as a key, thereby acquiring “extension” and “startDate”. In this example, the search unit 133 includes the combination of the extension “1111” and the startDate “2009-10-1”, the combination of the extension “1111” and the startDate “2010-4-1”, and the extension “3333” and the startDate. The combination of “2011-12-1” is acquired. Then, the search unit 133 sorts the extensions into “3333”, “1111”, and “1111” by sorting in descending order of the startDate. Furthermore, since the extension “1111” exists continuously, the search unit 133 deletes the leading “1111” from the two extensions. Then, the search unit 133 notifies the search request source of the search result list described in the order of the extension “3333” and the startDate “2011-12-1”, the extension “1111”, and the startDate “2009-10-1”. To do. As a result, the user who refers to the search result list can check the transition of the extension number assigned to the employee whose employee ID is “1122”.

なお、上記では、検索部133が、検索結果をstartDateの降順に並び替える例を示した。しかし、検索部133は、検索結果をstartDateの昇順に並び替えてもよい。また、検索部133は、startDateではなくendDateを検索してもよい。かかる場合には、検索部133は、endDateがNULLである属性情報が最新であるものとしてソートを行う。また、検索部133は、startDate及びendDateの双方を検索してもよい。   In the above description, the search unit 133 has shown an example in which the search results are rearranged in descending order of the startDate. However, the search unit 133 may rearrange the search results in ascending order of startDate. Further, the search unit 133 may search for endDate instead of startDate. In such a case, the search unit 133 sorts the attribute information whose endDate is NULL as the latest attribute information. Moreover, the search part 133 may search both startDate and endDate.

また、上記例では、データ管理装置100が他の装置から検索要求を受信することとするが、データ管理装置100は、利用者によって直接操作されることによって検索要求を受け付けてもよい。例えば、データ管理装置100は、図示しない入力部及び表示部を有し、かかる入力部を介して利用者により検索要求が入力されてもよい。かかる場合には、検索部133は、入力部を介して入力された検索要求に従って、上記の検索処理を行う。   In the above example, the data management apparatus 100 receives a search request from another apparatus, but the data management apparatus 100 may accept the search request by being directly operated by a user. For example, the data management apparatus 100 may include an input unit and a display unit (not shown), and a search request may be input by a user via the input unit. In such a case, the search unit 133 performs the search process according to the search request input via the input unit.

また、図1に示した受付部131、格納部132及び検索部133は、例えば、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)等の集積回路により実現される。また、例えば、受付部131、格納部132及び検索部133は、CPU(Central Processing Unit)やMPU(Micro Processing Unit)等によって、図示しない記憶装置に記憶されているプログラムがRAM(Random Access Memory)を作業領域として実行されることにより実現される。   Moreover, the reception unit 131, the storage unit 132, and the search unit 133 illustrated in FIG. 1 are realized by an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array). Further, for example, the reception unit 131, the storage unit 132, and the search unit 133 may store a program stored in a storage device (not shown) by a CPU (Central Processing Unit), an MPU (Micro Processing Unit), or the like (Random Access Memory). Is implemented as a work area.

[実施例1に係るデータ管理装置による格納処理手順]
次に、図3を用いて、実施例1に係るデータ管理装置100による格納処理の手順について説明する。図3は、実施例1に係るデータ管理装置100による格納処理手順を示すフローチャートである。なお、以下では、マスターデータテーブル121が、図2に例示した各種情報を記憶する場合を例に挙げて説明する。すなわち、データ管理装置100は、特定情報として社員IDが含まれる更新データを受け付けるものとする。
[Storage Processing Procedure by Data Management Device According to Embodiment 1]
Next, the procedure of storage processing by the data management apparatus 100 according to the first embodiment will be described with reference to FIG. FIG. 3 is a flowchart illustrating the storage processing procedure performed by the data management apparatus 100 according to the first embodiment. Hereinafter, a case where the master data table 121 stores various types of information illustrated in FIG. 2 will be described as an example. That is, the data management apparatus 100 accepts update data including an employee ID as specific information.

図3に示すように、データ管理装置100の格納部132は、受付部131によって更新データが受け付けられた場合に、かかる更新データに含まれる行数(レコード数)だけ、ループ1に示した処理を繰り返し行う。   As illustrated in FIG. 3, the storage unit 132 of the data management apparatus 100 performs the processing illustrated in the loop 1 by the number of rows (number of records) included in the update data when the update data is received by the reception unit 131. Repeat.

具体的には、格納部132は、1行目の更新データに含まれる特定情報「社員ID」と同一の情報がマスターデータテーブル121に存在するか否かを判定する(ステップS101)。   Specifically, the storage unit 132 determines whether or not the same information as the specific information “employee ID” included in the update data in the first row exists in the master data table 121 (step S101).

そして、格納部132は、更新データの社員IDがマスターデータテーブル121に存在しない場合には(ステップS101否定)、更新データに含まれる社員ID、各属性情報(組織名、内線、部屋番号など)と、startDate及びendDateをマスターデータテーブル121に新たなレコードとして格納する(ステップS102)。このとき、格納部132は、更新データに有効日付が含まれる場合には、startDateに有効日付を格納し、更新データに有効日付が含まれない場合には、startDateに現在日付(すなわち、更新日)を格納する。また、格納部132は、endDateには情報を格納しない。   When the employee ID of the update data does not exist in the master data table 121 (No at Step S101), the storage unit 132 stores the employee ID and each attribute information (organization name, extension, room number, etc.) included in the update data. Then, startDate and endDate are stored as new records in the master data table 121 (step S102). At this time, the storage unit 132 stores the effective date in the startDate when the update data includes the effective date, and stores the current date (that is, the update date) in the startDate when the update data does not include the effective date. ). The storage unit 132 does not store information in endDate.

一方、格納部132は、更新データの社員IDがマスターデータテーブル121に存在する場合には(ステップS101肯定)、かかる社員IDと一致するレコードのうち最新レコードに記憶されている各属性情報が、更新データに含まれる各属性情報と全て同一であるか否かを判定する(ステップS103)。そして、格納部132は、更新データの属性情報と同一の属性情報が最新レコードに記憶されている場合には(ステップS103肯定)、かかる更新データを用いた格納処理を行わない。   On the other hand, when the employee ID of the update data exists in the master data table 121 (Yes in step S101), the storage unit 132 stores each attribute information stored in the latest record among the records that match the employee ID. It is determined whether or not all pieces of attribute information included in the update data are the same (step S103). When the same attribute information as the attribute information of the update data is stored in the latest record (Yes at Step S103), the storage unit 132 does not perform the storage process using the update data.

一方、格納部132は、更新データと最新レコードとが同一でない場合には(ステップS103否定)、更新データに含まれる有効日付から「1日」を減算した日付、又は、現在日付(更新日)から「1日」を減算した日付を最新レコードの「endDate」に格納する(ステップS104)。また、格納部132は、更新データに含まれる社員ID、各属性情報(組織名、内線、部屋番号など)と、startDate及びendDateを新たなレコードとしてマスターデータテーブル121に格納する(ステップS105)。このとき、格納部132は、更新データに有効日付が含まれる場合には、startDateに有効日付を格納し、更新データに有効日付が含まれない場合には、startDateに現在日付(更新日)を格納する。また、格納部132は、endDateには情報を格納しない。   On the other hand, when the update data and the latest record are not the same (No at Step S103), the storage unit 132 subtracts “one day” from the effective date included in the update data, or the current date (update date). The date obtained by subtracting “1 day” from “endDate” of the latest record is stored (step S104). Further, the storage unit 132 stores the employee ID, each attribute information (organization name, extension, room number, etc.), startDate and endDate included in the update data as new records in the master data table 121 (step S105). At this time, the storage unit 132 stores the effective date in the startDate when the update data includes an effective date, and stores the current date (update date) in the startDate when the update data does not include the effective date. Store. The storage unit 132 does not store information in endDate.

[実施例1に係るデータ管理装置による検索処理手順]
次に、図4を用いて、実施例1に係るデータ管理装置100による検索処理の手順について説明する。図4は、実施例1に係るデータ管理装置100による検索処理手順を示すフローチャートである。なお、以下では、マスターデータテーブル121が、図2に例示した各種情報を記憶する場合を例に挙げて説明する。
[Search Processing Procedure by Data Management Device According to Embodiment 1]
Next, a search process procedure performed by the data management apparatus 100 according to the first embodiment will be described with reference to FIG. FIG. 4 is a flowchart illustrating the search processing procedure performed by the data management apparatus 100 according to the first embodiment. Hereinafter, a case where the master data table 121 stores various types of information illustrated in FIG. 2 will be described as an example.

図4に示すように、データ管理装置100の検索部133は、検索要求を受け付けた場合に、検索要求に含まれる社員IDをキーに、マスターデータテーブル121から検索対象の属性情報を検索する(ステップS201)。このとき、検索部133は、startDateについても検索する。   As shown in FIG. 4, when receiving a search request, the search unit 133 of the data management apparatus 100 searches the master data table 121 for search target attribute information using the employee ID included in the search request as a key ( Step S201). At this time, the search unit 133 also searches for startDate.

そして、検索部133は、検索結果の属性情報をstartDateに基づいて、ソートする(ステップS202)。例えば、検索部133は、検索結果の属性情報を新しい順にソートする。そして、検索部133は、ソート後の属性情報において連続する属性情報のうち、最後の属性情報を除く他の属性情報を削除する(ステップS203)。この後に、検索部133は、検索結果一覧を検索要求の送信元に通知する。   Then, the search unit 133 sorts the attribute information of the search results based on the startDate (Step S202). For example, the search unit 133 sorts the attribute information of the search results in order from the newest. And the search part 133 deletes other attribute information except the last attribute information among the attribute information continuous in the attribute information after a sort (step S203). Thereafter, the search unit 133 notifies the search result transmission source of the search result list.

[実施例1の効果]
上述してきたように、実施例1に係るデータ管理装置100において、記憶部120は、所定の事物に関する属性情報と、かかる属性情報が事物の属性に該当する期限を示す有効期限(endDateに対応)とを対応付けて記憶するマスターデータテーブル121を有する。また、格納部132は、属性情報を更新する旨の更新要求を受け付けた場合に、マスターデータテーブル121に記憶されている有効期限のうち現時点が有効期限内であることを示す有効期限を、かかる有効期限に対応する最新属性情報が事物の属性に該当しなくなったことを示す有効期限に更新する。さらに、格納部132は、更新要求に含まれる新たな属性情報と、かかる新たな属性情報が現時点で事物の属性に該当することを示す有効期限とをマスターデータテーブル121に格納する。また、検索部133は、属性情報の検索要求を受け付けた場合に、かかる検索要求に含まれる属性情報をマスターデータテーブル121から検索する。
[Effect of Example 1]
As described above, in the data management apparatus 100 according to the first embodiment, the storage unit 120 includes attribute information related to a predetermined thing, and an expiration date (corresponding to endDate) indicating a time limit when the attribute information corresponds to the attribute of the thing. Are stored in association with each other. Further, when receiving an update request for updating the attribute information, the storage unit 132 takes an expiration date indicating that the current time is within the expiration date among the expiration dates stored in the master data table 121. Update to the expiration date indicating that the latest attribute information corresponding to the expiration date no longer corresponds to the attribute of the thing. Further, the storage unit 132 stores new attribute information included in the update request and an expiration date indicating that the new attribute information currently corresponds to the attribute of the object in the master data table 121. Further, when receiving a search request for attribute information, the search unit 133 searches the master data table 121 for attribute information included in the search request.

このように、実施例1に係るデータ管理装置100は、各属性情報とともに、かかる属性情報の変更履歴を有効期限としてマスターデータテーブル121内で管理する。言い換えれば、データ管理装置100は、各属性情報の変更履歴をログとして管理するのではなく、同一のマスターデータテーブル121内で管理する。これにより、実施例1に係るデータ管理装置100は、マスターデータテーブル121に記憶されているデータの変遷を容易に検索することができるので、データの変遷を容易に提供することができる。   As described above, the data management apparatus 100 according to the first embodiment manages the change history of the attribute information together with each attribute information in the master data table 121 as the expiration date. In other words, the data management apparatus 100 does not manage the change history of each attribute information as a log, but manages it in the same master data table 121. Thereby, the data management apparatus 100 according to the first embodiment can easily search for the transition of the data stored in the master data table 121, and therefore can easily provide the transition of the data.

また、実施例1に係るデータ管理装置100において、格納部132は、更新要求に含まれる新たな属性情報と、マスターデータテーブル121に記憶されている最新属性情報とが異なる場合に、かかる最新属性情報に対応する有効期限を更新するとともに、新たな属性情報をマスターデータテーブル121に格納する。   Further, in the data management apparatus 100 according to the first embodiment, the storage unit 132 determines that the latest attribute is included when the new attribute information included in the update request is different from the latest attribute information stored in the master data table 121. The expiration date corresponding to the information is updated, and new attribute information is stored in the master data table 121.

これにより、実施例1に係るデータ管理装置100は、同一の属性情報を連続してマスターデータテーブル121に格納することを防止できる。この結果、データ管理装置100は、同一の更新データを重複して受け付けた場合であっても、データの変遷があった際にマスターデータテーブル121を更新することができるので、データの正確な変遷を提供することができる。   Thereby, the data management apparatus 100 according to the first embodiment can prevent the same attribute information from being stored in the master data table 121 continuously. As a result, the data management apparatus 100 can update the master data table 121 when there is a data transition even when the same update data is received in duplicate. Can be provided.

[参考例に係るデータ管理装置]
ここで、上記実施例1に係るデータ管理装置100における効果を明確にするために、図5及び図6を用いて、参考例に係るデータ管理装置900によるデータ管理について説明する。なお、参考例に係るデータ管理装置900は、一般的に考え得るデータ管理装置の一例に該当する。図5は、参考例に係るデータ管理装置900が有するデータ例を示す図である。図5に示した例では、データ管理装置900は、マスターデータテーブル91と、ログデータテーブル92とを有する。
[Data management device according to reference example]
Here, in order to clarify the effect of the data management apparatus 100 according to the first embodiment, data management by the data management apparatus 900 according to the reference example will be described with reference to FIGS. 5 and 6. The data management apparatus 900 according to the reference example corresponds to an example of a data management apparatus that can be generally considered. FIG. 5 is a diagram illustrating an example of data included in the data management apparatus 900 according to the reference example. In the example illustrated in FIG. 5, the data management apparatus 900 includes a master data table 91 and a log data table 92.

マスターデータテーブル91は、最新データのみを保持する。すなわち、図5に示したマスターデータテーブル91は、社員ID「1122」である社員の現在の属性情報として、組織名「G13」、内線「3333」及び部屋番号「1−1001」を記憶し、社員ID「2233」である社員の現在の属性情報として、組織名「G12」、内線「2222」及び部屋番号「1−1001」を記憶する。このように、一般的には、データ管理装置900は、マスターデータテーブル91に示した例のように、最新のマスターデータのみを保持する。ログデータテーブル92は、マスターデータテーブル91の更新ログを記憶する。図5に示した例では、ログデータテーブル92は、マスターデータテーブル91の更新時に用いられた更新コマンド(SQL文など)を変更内容に記憶する。   The master data table 91 holds only the latest data. That is, the master data table 91 shown in FIG. 5 stores the organization name “G13”, the extension “3333”, and the room number “1-1001” as the current attribute information of the employee with the employee ID “1122”. The organization name “G12”, extension “2222”, and room number “1-1001” are stored as the current attribute information of the employee with the employee ID “2233”. As described above, generally, the data management apparatus 900 holds only the latest master data as in the example shown in the master data table 91. The log data table 92 stores an update log of the master data table 91. In the example illustrated in FIG. 5, the log data table 92 stores an update command (such as an SQL statement) used at the time of updating the master data table 91 in the changed content.

データ管理装置900が上記のマスターデータテーブル91及びログデータテーブル92を保持する場合、利用者は、ログデータテーブル92を解析することにより、例えば特定の社員における所属組織の変遷を確認することが可能になるとも考えられる。しかし、ログデータテーブル92には膨大なログが記憶されているので、ログデータテーブル92を解析する手法では、利用者にかかる手間が増大する。また、利用者は、マスターデータテーブル91を用いてマスターデータテーブル91をロールバックすることにより、過去データを閲覧して特定の社員における所属組織の変遷を確認することが可能になるとも考えられる。しかし、かかる手法は、過去の複数時点におけるマスターデータの状態に何度もロールバックすることを要するので現実的ではない。   When the data management device 900 holds the master data table 91 and the log data table 92 described above, the user can confirm the transition of the organization to which a specific employee belongs by analyzing the log data table 92, for example. It is thought that it becomes. However, since an enormous log is stored in the log data table 92, the method for analyzing the log data table 92 increases the time and effort required for the user. In addition, it is considered that the user can confirm the transition of the organization belonging to a specific employee by browsing past data by rolling back the master data table 91 using the master data table 91. However, this method is not practical because it requires many times to roll back to the master data state at a plurality of past time points.

また、データ管理装置900がログデータテーブル92を解析することにより、特定の社員における所属組織の変遷を出力することも考えられる。しかし、ログデータテーブル92の解析処理が複雑となり、データ管理装置900にかかる負荷が増大する。この点について、図6を用いて説明する。図6は、参考例に係るデータ管理装置900による検索処理手順を示すフローチャートである。なお、図6は、データ管理装置900による検索処理として考え得る処理を示したものである。また、ここでは、データ管理装置900が社員ID「1122」における組織名の変遷を検索する場合を例に挙げて説明する。   It is also conceivable that the data management device 900 analyzes the log data table 92 and outputs the change of the organization to which a specific employee belongs. However, the analysis processing of the log data table 92 becomes complicated, and the load on the data management device 900 increases. This point will be described with reference to FIG. FIG. 6 is a flowchart illustrating a search processing procedure performed by the data management apparatus 900 according to the reference example. FIG. 6 shows a process that can be considered as a search process by the data management apparatus 900. Here, a case where the data management apparatus 900 searches for the transition of the organization name in the employee ID “1122” will be described as an example.

図6に示した例では、データ管理装置900は、社員ID「1122」の組織名を検索する旨の検索要求を受け付けた場合に、マスターデータテーブル91から、社員ID「1122」の組織名「G13」を検索し、最新組織名として保持する(ステップS11)。続いて、データ管理装置900は、社員ID「1122」をキーにログデータテーブル92の変更内容を検索する(ステップS12)。そして、データ管理装置900は、検索結果を新しい順にソートする(ステップS13)。   In the example illustrated in FIG. 6, when the data management apparatus 900 receives a search request for searching for the organization name of the employee ID “1122”, the data management apparatus 900 reads the organization name “1122” of the organization ID “1122” from the master data table 91. "G13" is retrieved and stored as the latest organization name (step S11). Subsequently, the data management apparatus 900 searches the log data table 92 for changes made using the employee ID “1122” as a key (step S12). Then, the data management apparatus 900 sorts the search results in order from the newest (step S13).

続いて、データ管理装置900は、検索結果の数(変更内容の数)だけループ1に示した処理を繰り返し行う。具体的には、データ管理装置900は、ソート後の検索結果である変更内容のうち最も新しい変更内容に組織名変更又は組織名追加が含まれるか否かを判定する(ステップS14)。例えば、データ管理装置900は、変更内容に「update」及び「組織名」の文字列が含まれるか否かを判定したり、変更内容に「insert」及び「組織名」の文字列が含まれるか否かを判定したりする。そして、データ管理装置900は、変更内容に組織名変更又は組織名追加が含まれる場合には(ステップS14肯定)、かかる変更内容に含まれる組織名が最新組織名と異なるか否かを判定する(ステップS15)。そして、データ管理装置900は、最新組織名と異なる場合には(ステップS15肯定)、かかる最新組織名を保持したまま、変更内容に含まれる組織名を新たな最新組織名として保持する(ステップS16)。データ管理装置900は、ソート後の変更内容について、変更内容の新しい順に上記ステップS14〜S16における処理を繰り返し行う。   Subsequently, the data management apparatus 900 repeatedly performs the process shown in the loop 1 by the number of search results (the number of changes). Specifically, the data management apparatus 900 determines whether or not an organization name change or an organization name addition is included in the latest change content that is a search result after sorting (step S14). For example, the data management apparatus 900 determines whether or not the change content includes the character strings “update” and “organization name”, and the change content includes the character strings “insert” and “organization name”. Or not. When the change content includes an organization name change or an organization name addition (Yes at step S14), the data management apparatus 900 determines whether the organization name included in the change content is different from the latest organization name. (Step S15). If the data management device 900 is different from the latest organization name (Yes at step S15), the data management device 900 retains the organization name included in the changed content as the new latest organization name while retaining the latest organization name (step S16). ). The data management apparatus 900 repeatedly performs the processes in steps S14 to S16 in the order of the changed contents with respect to the changed contents after sorting.

このようにして、データ管理装置900は、社員ID「1122」における組織名の変遷を検索する。しかし、データ管理装置900は、図6の処理を行う場合には、ステップS14においてSQL文等を文字列解析することになるので処理負荷が増大する。また、図6に示した処理手順は、実施例1に係るデータ管理装置100による検索処理(図4を参照)と比較すると、処理ステップ数が多く処理効率が悪い。   In this way, the data management apparatus 900 searches for the transition of the organization name in the employee ID “1122”. However, when the data management apparatus 900 performs the processing of FIG. 6, the processing load increases because the SQL sentence or the like is analyzed in step S14. Further, the processing procedure shown in FIG. 6 has a large number of processing steps and poor processing efficiency as compared with the search processing (see FIG. 4) by the data management apparatus 100 according to the first embodiment.

以上のように、実施例1に係るデータ管理装置100は、マスターデータテーブル121に記憶されているデータの変遷を容易に検索することができ、その結果、データの変遷を容易に提供することができる。   As described above, the data management apparatus 100 according to the first embodiment can easily search for the transition of data stored in the master data table 121, and as a result, can easily provide the transition of data. it can.

上記実施例1では、データ管理装置100が図2に示したマスターデータテーブル121を保持する例について説明した。しかし、データ管理装置は、マスターデータテーブルを属性情報毎に分割して保持してもよい。実施例2では、マスターデータテーブルを属性情報毎に分割して保持する例について説明する。   In the first embodiment, the example in which the data management apparatus 100 holds the master data table 121 illustrated in FIG. 2 has been described. However, the data management apparatus may divide and hold the master data table for each attribute information. In the second embodiment, an example in which the master data table is divided and held for each attribute information will be described.

[実施例2に係るデータ管理装置の構成]
まず、図7を用いて、実施例2に係るデータ管理装置について説明する。図7は、実施例2に係るデータ管理装置200の構成例を示す図である。なお、以下では、既に示した構成部位と同様の機能を有する部位には同一符号を付すこととして、その詳細な説明を省略する。図7に例示するように、実施例2に係るデータ管理装置200は、記憶部220と、格納部232と、検索部233とを有する。
[Configuration of Data Management Apparatus According to Second Embodiment]
First, the data management apparatus according to the second embodiment will be described with reference to FIG. FIG. 7 is a diagram illustrating a configuration example of the data management apparatus 200 according to the second embodiment. In addition, below, the detailed description is abbreviate | omitted as attaching | subjecting the same code | symbol to the site | part which has the function similar to the already shown component site | part. As illustrated in FIG. 7, the data management apparatus 200 according to the second embodiment includes a storage unit 220, a storage unit 232, and a search unit 233.

記憶部220は、例えば、ハードディスク、光ディスク、又は、RAM、フラッシュメモリ等の半導体メモリ素子によって実現される。実施例2に係る記憶部220は、図2に例示したマスターデータテーブル121に記憶される属性情報の種別毎に、かかる属性情報の変更履歴を異なる履歴テーブルに記憶する。具体的には、記憶部220は、図7に例示するように、社員IDテーブル221と、組織履歴テーブル222と、内線履歴テーブル223とを有する。   The storage unit 220 is realized by a semiconductor memory element such as a hard disk, an optical disk, or a RAM or a flash memory, for example. The storage unit 220 according to the second embodiment stores the change history of attribute information in different history tables for each type of attribute information stored in the master data table 121 illustrated in FIG. Specifically, as illustrated in FIG. 7, the storage unit 220 includes an employee ID table 221, an organization history table 222, and an extension history table 223.

社員IDテーブル221は、社員の社員IDを記憶する。図8に、実施例2に係る社員IDテーブル221の一例を示す。図8に示すように、社員IDテーブル221は、「社員ID」、「startDate」、「endDate」といった項目を有する。これらの項目は、図2に示した項目に対応する。   The employee ID table 221 stores employee IDs of employees. FIG. 8 shows an example of the employee ID table 221 according to the second embodiment. As shown in FIG. 8, the employee ID table 221 has items such as “employee ID”, “startDate”, and “endDate”. These items correspond to the items shown in FIG.

「社員ID」は、図2に示した社員IDに対応する。かかる「社員ID」は、社員IDテーブル221における主キーに該当する。「startDate」は、かかるstartDateを含むレコード内の社員IDが社員の属性に該当することとなった最初の日付、又は、かかるstartDateを含むレコードが社員IDテーブル221に格納された日付を示す。「endDate」は、かかるendDateを含むレコード内の社員IDが社員の属性に該当する最終の日付、又は、かかるendDateを含むレコードの次に新たなレコードが社員IDテーブル221に格納された日付の前日を示す。なお、実施例2では、社員の社員IDが変更されることはないものとする。すなわち、社員IDテーブル221の「endDate」には情報が記憶されることはない。ただし、社員が退職した場合などには、かかる社員に対応する社員IDテーブル221の「endDate」には「退職日」等が記憶される。   “Employee ID” corresponds to the employee ID shown in FIG. The “employee ID” corresponds to a main key in the employee ID table 221. “StartDate” indicates the first date when the employee ID in the record including the startDate corresponds to the attribute of the employee, or the date when the record including the startDate is stored in the employee ID table 221. “EndDate” is the last date when the employee ID in the record including the endDate corresponds to the attribute of the employee, or the day before the date when the new record next to the record including the endDate is stored in the employee ID table 221 Indicates. In the second embodiment, the employee ID of the employee is not changed. That is, no information is stored in “endDate” of the employee ID table 221. However, when an employee retires, “end date” or the like is stored in “endDate” of the employee ID table 221 corresponding to the employee.

組織履歴テーブル222は、各社員における組織名の変更履歴を記憶する。図9に、実施例2に係る組織履歴テーブル222の一例を示す。図9に示すように、組織履歴テーブル222は、「社員ID」、「組織名」、「startDate」、「endDate」といった項目を有する。   The organization history table 222 stores an organization name change history for each employee. FIG. 9 shows an example of the organization history table 222 according to the second embodiment. As illustrated in FIG. 9, the organization history table 222 includes items such as “employee ID”, “organization name”, “startDate”, and “endDate”.

「社員ID」は、図8に示した社員IDに対応する。かかる「社員ID」は、社員IDテーブル221の社員IDを参照先とする外部キー(Foreign Key)に該当する。「組織名」は、図2に示した組織名に対応する。「startDate」は、かかるstartDateを含むレコード内の組織名が社員の属性に該当することとなった最初の日付、又は、かかるstartDateを含むレコードが組織履歴テーブル222に格納された日付を示す。「endDate」は、かかるendDateを含むレコード内の組織名が社員の属性に該当する最終の日付、又は、かかるendDateを含むレコードの次に新たな組織履歴テーブル222に格納された日付の前日を示す。   “Employee ID” corresponds to the employee ID shown in FIG. The “employee ID” corresponds to a foreign key that refers to the employee ID in the employee ID table 221. “Organization name” corresponds to the organization name shown in FIG. “StartDate” indicates the first date when the organization name in the record including the startDate corresponds to the employee attribute, or the date when the record including the startDate is stored in the organization history table 222. “EndDate” indicates the last date when the organization name in the record including the endDate corresponds to the attribute of the employee, or the day before the date stored in the new organization history table 222 next to the record including the endDate. .

内線履歴テーブル223は、各社員における内線の変更履歴を記憶する。図10に、実施例2に係る内線履歴テーブル223の一例を示す。図10に示すように、内線履歴テーブル223は、「社員ID」、「内線」、「startDate」、「endDate」といった項目を有する。   The extension history table 223 stores an extension change history for each employee. FIG. 10 shows an example of the extension history table 223 according to the second embodiment. As illustrated in FIG. 10, the extension history table 223 includes items such as “employee ID”, “extension”, “startDate”, and “endDate”.

「社員ID」は、図8に示した社員IDに対応し、社員IDテーブル221の社員IDを参照先とする外部キーに該当する。「内線」は、図2に示した内線に対応する。「startDate」は、かかるstartDateを含むレコード内の内線が社員の属性に該当することとなった最初の日付、又は、かかるstartDateを含むレコードが内線履歴テーブル223に格納された日付を示す。「endDate」は、かかるendDateを含むレコード内の内線が社員の属性に該当する最終の日付、又は、かかるendDateを含むレコードの次に新たな内線履歴テーブル223に格納された日付の前日を示す。   “Employee ID” corresponds to the employee ID shown in FIG. 8 and corresponds to an external key with the employee ID in the employee ID table 221 as a reference destination. The “extension” corresponds to the extension shown in FIG. “StartDate” indicates the first date when the extension in the record including the startDate corresponds to the employee attribute, or the date when the record including the startDate is stored in the extension history table 223. “EndDate” indicates the last date when the extension in the record including the endDate corresponds to the employee attribute, or the day before the date stored in the new extension history table 223 next to the record including the endDate.

なお、図7では図示することを省略したが、実施例2に係る記憶部220は、上記の各テーブル以外にも、各社員の属性情報毎に、かかる属性情報の変更履歴を記憶する履歴テーブルを有する。例えば、記憶部220は、各社員における部屋番号の変更履歴を記憶する「部屋番号履歴テーブル」を有する。   Although not shown in FIG. 7, the storage unit 220 according to the second embodiment stores, in addition to the above-described tables, a history table that stores a change history of such attribute information for each attribute information of each employee. Have For example, the storage unit 220 includes a “room number history table” that stores room number change history for each employee.

図7の説明に戻って、格納部232は、受付部131によって受け付けられた更新データを記憶部220内の社員IDテーブル221、組織履歴テーブル222、内線履歴テーブル223等に格納する。   Returning to the description of FIG. 7, the storage unit 232 stores the update data received by the receiving unit 131 in the employee ID table 221, the organization history table 222, the extension history table 223, and the like in the storage unit 220.

具体的には、格納部232は、受付部131によって更新データが受け付けられた場合に、更新データに含まれる特定情報(ここの例では、社員ID)と同一の情報が社員IDテーブル221に記憶されているか否かを判定する。そして、格納部232は、更新データの社員IDが社員IDテーブル221に記憶されていない場合には、更新データに含まれる社員IDを社員IDテーブル221に新たなレコードとして格納する。このとき、格納部232は、更新データに有効日付が含まれる場合には、「startDate」に有効日付を格納し、更新データに有効日付が含まれない場合には、「startDate」に現在日付を格納する。また、格納部232は、「endDate」には情報を格納しない。   Specifically, when update data is received by the reception unit 131, the storage unit 232 stores the same information as the specific information (employee ID in this example) included in the update data in the employee ID table 221. It is determined whether or not it has been done. When the employee ID of the update data is not stored in the employee ID table 221, the storage unit 232 stores the employee ID included in the update data as a new record in the employee ID table 221. At this time, the storage unit 232 stores the effective date in “startDate” when the update data includes the effective date, and stores the current date in “startDate” when the update data does not include the effective date. Store. In addition, the storage unit 232 stores no information in “endDate”.

また、格納部232は、更新データに含まれる属性情報の種別に対応する履歴テーブルを記憶部220から選択する。そして、格納部232は、選択した履歴テーブル(以下、「選択テーブル」とする)に、更新データに含まれる特定情報(ここの例では、社員ID)と同一の情報が記憶されているか否かを判定する。そして、格納部232は、更新データの社員IDが選択テーブルに記憶されていない場合には、更新データに含まれる社員ID及び属性情報を新たなレコードとして選択テーブルに格納する。このとき、格納部232は、更新データに有効日付が含まれる場合には、「startDate」に有効日付を格納し、更新データに有効日付が含まれない場合には、「startDate」に現在日付を格納する。また、格納部232は、「endDate」には情報を格納しない。   In addition, the storage unit 232 selects a history table corresponding to the type of attribute information included in the update data from the storage unit 220. Then, the storage unit 232 stores whether or not the same information as the specific information (employee ID in this example) included in the update data is stored in the selected history table (hereinafter referred to as “selection table”). Determine. When the employee ID of the update data is not stored in the selection table, the storage unit 232 stores the employee ID and attribute information included in the update data as a new record in the selection table. At this time, the storage unit 232 stores the effective date in “startDate” when the update data includes the effective date, and stores the current date in “startDate” when the update data does not include the effective date. Store. In addition, the storage unit 232 stores no information in “endDate”.

一方、格納部232は、更新データの社員IDが選択テーブルに記憶されている場合には、選択テーブルに記憶されているレコードのうち、更新データに含まれる社員IDと同一であり、かつ、「endDate」に情報が記憶されていないレコードを最新レコードとして特定する。そして、格納部232は、更新データに含まれる属性情報と、最新レコードの属性情報とが同一であるか否かを判定する。そして、格納部232は、更新データの属性情報と最新レコードの属性情報とが同一である場合には、かかる更新データに含まれる属性情報を選択テーブルに格納しない。   On the other hand, when the employee ID of the update data is stored in the selection table, the storage unit 232 is the same as the employee ID included in the update data among the records stored in the selection table, and “ A record in which no information is stored in “endDate” is specified as the latest record. Then, the storage unit 232 determines whether or not the attribute information included in the update data is the same as the attribute information of the latest record. Then, when the attribute information of the update data and the attribute information of the latest record are the same, the storage unit 232 does not store the attribute information included in the update data in the selection table.

一方、格納部232は、更新データの属性情報と最新レコードの属性情報とが同一でない場合には、更新データに含まれる有効日付から「1日(24時間)」を減算した日付を最新レコードの「endDate」に格納する。このとき、格納部232は、更新データに有効日付が含まれない場合には、現在日付から「1日(24時間)」を減算した日付を最新レコードの「endDate」に格納する。また、格納部232は、更新データに含まれる属性情報を新たなレコードとして選択テーブルに格納する。このとき、格納部232は、上記例と同様に、「startDate」に有効日付又は現在日付を格納し、「endDate」に情報を格納しない。   On the other hand, if the attribute information of the update data is not the same as the attribute information of the latest record, the storage unit 232 subtracts the date obtained by subtracting “1 day (24 hours)” from the effective date included in the update data. Stored in “endDate”. At this time, if the update data does not include a valid date, the storage unit 232 stores the date obtained by subtracting “1 day (24 hours)” from the current date in “endDate” of the latest record. In addition, the storage unit 232 stores the attribute information included in the update data in the selection table as a new record. At this time, the storage unit 232 stores the effective date or the current date in “startDate” and does not store information in “endDate”, as in the above example.

かかる格納部232による格納処理について図8〜図10に示した例を用いて説明する。ここでは、社員IDテーブル221が図8に示した状態であり、組織履歴テーブル222が図9に示した状態であり、内線履歴テーブル223が図10に示した状態であるものとする。   The storage processing by the storage unit 232 will be described using the examples shown in FIGS. Here, it is assumed that the employee ID table 221 is in the state shown in FIG. 8, the organization history table 222 is in the state shown in FIG. 9, and the extension history table 223 is in the state shown in FIG.

この状態において、受付部131によって、社員ID「1122」、組織名「G14」、内線「3333」、部屋番号「1−1001」及び有効日付「2012−1−1」を含む更新データが受け付けられたものとする。かかる場合に、格納部232は、更新データに含まれる社員ID「1122」が社員IDテーブル221に記憶されているので、社員IDテーブル221を更新しない。   In this state, the receiving unit 131 receives update data including the employee ID “1122”, the organization name “G14”, the extension “3333”, the room number “1-1001”, and the effective date “2012-1-1”. Shall be. In this case, the storage unit 232 does not update the employee ID table 221 because the employee ID “1122” included in the update data is stored in the employee ID table 221.

続いて、格納部232は、更新データに含まれる社員ID「1122」及び組織名「G14」の組合せが、組織履歴テーブル222に記憶されていないので、組織履歴テーブル222に記憶されている社員ID「1122」のレコードのうち、endDateがNULLである最新レコード(図9の3行目のレコード)のendDateに、有効日付「2012−1−1」から1日を減算した日付「2011−12−31」を格納する。さらに、格納部232は、更新データに含まれる社員ID「1122」及び組織名「G14」を新たなレコードとして組織履歴テーブル222に格納する。このとき、格納部232は、新たなレコードの「startDate」に有効日付「2012−1−1」を格納し、「endDate」に情報を格納しない。   Subsequently, since the combination of the employee ID “1122” and the organization name “G14” included in the update data is not stored in the organization history table 222, the storage unit 232 stores the employee ID stored in the organization history table 222. Among the records “1122”, the date “2011-12” obtained by subtracting one day from the effective date “2012-1-1” to the endDate of the latest record (record on the third line in FIG. 9) whose endDate is NULL. 31 "is stored. Furthermore, the storage unit 232 stores the employee ID “1122” and the organization name “G14” included in the update data in the organization history table 222 as new records. At this time, the storage unit 232 stores the effective date “2012-1-1” in “startDate” of the new record, and does not store information in “endDate”.

続いて、格納部232は、更新データに含まれる社員ID「1122」及び内線「3333」の組合せが、内線履歴テーブル223に記憶されているので、内線履歴テーブル223を更新しない。このようにして、格納部232は、更新データに部屋番号「1−1001」を用いて、図示しない部屋番号履歴テーブルを更新する。   Subsequently, since the combination of the employee ID “1122” and the extension “3333” included in the update data is stored in the extension history table 223, the storage unit 232 does not update the extension history table 223. In this way, the storage unit 232 updates a room number history table (not shown) using the room number “1-1001” as update data.

検索部233は、検索要求を受け付けた場合に、かかる検索要求に従って、記憶部220から各種データを検索する。例えば、検索部233は、特定情報、及び、検索対象の属性情報の名称(カラム名)を含む検索要求を受け付ける。かかる場合に、検索部233は、検索要求に含まれる検索対象の属性情報の種別に対応する履歴テーブルを記憶部220から選択し、検索要求に含まれる特定情報をキーとして、「検索対象の属性情報」及び「startDate」を履歴テーブルから検索する。そして、検索部233は、検索結果の属性情報をstartDateの降順にソートし、ソート後の属性情報及びstartDateが記載された検索結果一覧を検索要求の送信元に通知する。   When receiving a search request, the search unit 233 searches various data from the storage unit 220 according to the search request. For example, the search unit 233 receives a search request including specific information and the name (column name) of attribute information to be searched. In such a case, the search unit 233 selects a history table corresponding to the type of attribute information to be searched included in the search request from the storage unit 220, and uses the specific information included in the search request as a key, “Information” and “startDate” are searched from the history table. Then, the search unit 233 sorts the search result attribute information in descending order of the startDate, and notifies the search request transmission source of the search result list in which the sorted attribute information and the startDate are described.

かかる検索部233による検索処理について図9に示した例を用いて説明する。例えば、検索部233が、社員ID「1122」、及び、検索対象の属性情報の名称「組織名」を含む検索要求を受け付けたものとする。かかる場合に、検索部233は、組織履歴テーブル222を検索対象の履歴テーブルとして選択する。そして、検索部233は、社員ID「1122」をキーに組織履歴テーブル222を検索することで、「組織名」及び「startDate」を取得する。ここの例では、検索部233は、組織名「G11」及びstartDate「2009−10−1」の組合せと、組織名「G12」及びstartDate「2010−4−1」の組合せと、組織名「G13」及びstartDate「2011−12−1」の組合せとを取得する。そして、検索部233は、startDateの降順にソートすることで、組織名を「G13」、「G12」、「G11」に並び替える。そして、検索部233は、組織名「G13」及びstartDate「2011−12−1」、組織名「G12」及びstartDate「2010−4−1」、組織名「G11」及びstartDate「2009−10−1」に順に記載された検索結果一覧を検索要求の送信元に通知する。これにより、かかる検索結果一覧を参照するユーザは、社員IDが「1122」である社員の所属組織の変遷を確認することができる。   The search processing by the search unit 233 will be described using the example shown in FIG. For example, it is assumed that the search unit 233 receives a search request including the employee ID “1122” and the name “organization name” of the attribute information to be searched. In such a case, the search unit 233 selects the organization history table 222 as a search target history table. Then, the search unit 233 searches the organization history table 222 using the employee ID “1122” as a key, thereby acquiring “organization name” and “startDate”. In this example, the search unit 233 includes a combination of an organization name “G11” and a startDate “2009-10-1”, a combination of an organization name “G12” and a startDate “2010-4-1”, and an organization name “G13”. ”And the combination of startDate“ 2011-12-1 ”. Then, the search unit 233 sorts the organization names into “G13”, “G12”, and “G11” by sorting in descending order of the startDate. Then, the search unit 233 executes the organization name “G13” and the startDate “2011-12-1”, the organization name “G12” and the startDate “2010-4-1”, the organization name “G11”, and the startDate “2009-10-1”. The search result list described in the order "" is notified to the transmission source of the search request. As a result, the user who refers to the search result list can confirm the transition of the organization to which the employee whose employee ID is “1122” belongs.

なお、上記では、検索部233が、検索結果をstartDateの降順に並び替える例を示した。しかし、検索部233は、検索結果をstartDateの昇順に並び替えてもよい。また、検索部233は、startDateではなくendDateを検索してもよい。かかる場合には、検索部233は、endDateがNULLである属性情報が最新であるものとしてソートを行う。また、検索部233は、startDate及びendDateの双方を検索してもよい。   In the above description, the search unit 233 shows an example in which the search results are rearranged in the descending order of the startDate. However, the search unit 233 may rearrange the search results in ascending order of startDate. In addition, the search unit 233 may search for endDate instead of startDate. In such a case, the search unit 233 sorts the attribute information whose endDate is NULL as the latest attribute information. Further, the search unit 233 may search both the startDate and the endDate.

また、図7に示した格納部232及び検索部233は、例えば、ASICやFPGA等の集積回路により実現される。また、例えば、格納部232及び検索部233は、CPUやMPU等によって、図示しない記憶装置に記憶されているプログラムがRAMを作業領域として実行されることにより実現される。   Further, the storage unit 232 and the search unit 233 illustrated in FIG. 7 are realized by an integrated circuit such as an ASIC or FPGA, for example. Further, for example, the storage unit 232 and the search unit 233 are realized by a program stored in a storage device (not shown) being executed using the RAM as a work area by a CPU, an MPU, or the like.

[実施例2に係るデータ管理装置による格納処理手順]
次に、図11を用いて、実施例2に係るデータ管理装置200による格納処理の手順について説明する。図11は、実施例2に係るデータ管理装置200による格納処理手順を示すフローチャートである。なお、以下では、記憶部220が図8〜図10に示した各履歴テーブルを有する場合を例に挙げて説明する。
[Storing Procedure by Data Management Device According to Second Embodiment]
Next, the procedure of storage processing by the data management apparatus 200 according to the second embodiment will be described with reference to FIG. FIG. 11 is a flowchart illustrating a storage processing procedure performed by the data management apparatus 200 according to the second embodiment. Hereinafter, a case where the storage unit 220 includes the history tables illustrated in FIGS. 8 to 10 will be described as an example.

図11に示すように、データ管理装置200の格納部232は、受付部131によって更新データが受け付けられた場合に、かかる更新データに含まれる行数(レコード数)だけ、ループ1に示した処理を繰り返し行う。具体的には、格納部232は、更新データ内の1レコードについて、記憶部220に記憶されている履歴テーブルの数だけ、ループ2に示した処理を繰り返し行う。なお、格納部232は、社員IDテーブル221、組織履歴テーブル222、内線履歴テーブル223、図示しない部屋番号履歴テーブルの順に格納処理を行うものとする。   As illustrated in FIG. 11, when update data is received by the reception unit 131, the storage unit 232 of the data management apparatus 200 performs the processing illustrated in the loop 1 by the number of rows (number of records) included in the update data. Repeat. Specifically, the storage unit 232 repeatedly performs the process shown in the loop 2 for one record in the update data by the number of history tables stored in the storage unit 220. The storage unit 232 performs storage processing in the order of an employee ID table 221, an organization history table 222, an extension history table 223, and a room number history table (not shown).

かかるループ2における処理について説明する。格納部232は、更新対象の履歴テーブルが社員IDテーブル221であるか否かを判定する(ステップS301)。このとき、格納部232は、更新対象の履歴テーブルが社員IDテーブル221である場合には(ステップS301肯定)、更新データに含まれる特定情報「社員ID」と同一の情報が社員IDテーブル221に記憶されているか否かを判定する(ステップS302)。   Processing in the loop 2 will be described. The storage unit 232 determines whether or not the history table to be updated is the employee ID table 221 (step S301). At this time, if the history table to be updated is the employee ID table 221 (Yes in step S301), the storage unit 232 stores the same information as the specific information “employee ID” included in the update data in the employee ID table 221. It is determined whether it is stored (step S302).

そして、格納部232は、更新データの社員IDが社員IDテーブル221に記憶されていない場合には(ステップS302否定)、更新データに含まれる社員IDを社員IDテーブル221に新たなレコードとして格納する(ステップS303)。このとき、格納部232は、更新データに有効日付が含まれる場合には、「startDate」に有効日付を格納し、更新データに有効日付が含まれない場合には、「startDate」に現在日付を格納する。また、格納部232は、「endDate」には情報を格納しない。また、格納部232は、更新データの社員IDが社員IDテーブル221に記憶されている場合には(ステップS302肯定)、かかる更新データに含まれる社員IDを社員IDテーブル221に格納せずに、ステップS301に戻る。   If the employee ID of the update data is not stored in the employee ID table 221 (No at step S302), the storage unit 232 stores the employee ID included in the update data as a new record in the employee ID table 221. (Step S303). At this time, the storage unit 232 stores the effective date in “startDate” when the update data includes the effective date, and stores the current date in “startDate” when the update data does not include the effective date. Store. In addition, the storage unit 232 stores no information in “endDate”. Further, when the employee ID of the update data is stored in the employee ID table 221 (Yes in step S302), the storage unit 232 stores the employee ID included in the update data in the employee ID table 221 without storing the employee ID. The process returns to step S301.

また、格納部232は、更新対象の履歴テーブルが社員IDテーブル221でない場合には(ステップS301否定)、更新データに含まれる特定情報「社員ID」と同一の情報が更新対象の履歴テーブルに記憶されているか否かを判定する(ステップS304)。例えば、格納部232は、更新対象の履歴テーブルが組織履歴テーブル222である場合には、更新データに含まれる社員IDが組織履歴テーブル222に記憶されているか否かを判定する。   Further, when the history table to be updated is not the employee ID table 221 (No at Step S301), the storage unit 232 stores the same information as the specific information “employee ID” included in the update data in the history table to be updated. It is determined whether or not it has been performed (step S304). For example, when the history table to be updated is the organization history table 222, the storage unit 232 determines whether or not the employee ID included in the update data is stored in the organization history table 222.

そして、格納部232は、更新データの社員IDが更新対象の履歴テーブルに記憶されている場合には(ステップS304肯定)、更新対象の履歴テーブルから、かかる社員IDと一致するレコードを抽出し、抽出したレコードのうちendDateがNULLである最新レコードを特定する。そして、格納部232は、更新データに含まれる属性情報と同一の属性情報が最新レコードに記憶されているか否かを判定する(ステップS305)。   Then, when the employee ID of the update data is stored in the update target history table (Yes in step S304), the storage unit 232 extracts a record that matches the employee ID from the update target history table, Among the extracted records, the latest record whose endDate is NULL is specified. Then, the storage unit 232 determines whether or not the same attribute information as the attribute information included in the update data is stored in the latest record (step S305).

例えば、更新対象の履歴テーブルが組織履歴テーブル222であるものとする。かかる場合に、格納部232は、組織履歴テーブル222から、更新データに含まれる社員IDと一致するレコードのうちendDateがNULLである最新レコードを特定し、特定した最新レコードに更新データに含まれる組織名が記憶されているか否かを判定する。   For example, it is assumed that the history table to be updated is the organization history table 222. In such a case, the storage unit 232 identifies, from the organization history table 222, the latest record whose endDate is NULL among the records that match the employee ID included in the update data, and the organization included in the update data in the identified latest record It is determined whether the name is stored.

そして、格納部232は、更新データの属性情報が最新レコードに記憶されていない場合には(ステップS305否定)、更新データに含まれる有効日付から「1日」を減算した日付、又は、現在日付(更新日)から「1日」を減算した日付を最新レコードの「endDate」に格納する(ステップS306)。さらに、格納部232は、更新データに含まれる社員ID及び属性情報と、startDate及びendDateとを新たなレコードとして更新対象の履歴テーブルに格納する(ステップS307)。このとき、格納部232は、更新データに有効日付が含まれる場合には、startDateに有効日付を格納し、更新データに有効日付が含まれない場合には、startDateに現在日付(更新日)を格納する。また、格納部232は、endDateには情報を格納しない。   When the update data attribute information is not stored in the latest record (No at Step S305), the storage unit 232 subtracts “one day” from the effective date included in the update data, or the current date. The date obtained by subtracting “1 day” from (update date) is stored in “endDate” of the latest record (step S306). Further, the storage unit 232 stores the employee ID and attribute information included in the update data, and the startDate and endDate as new records in the update target history table (step S307). At this time, the storage unit 232 stores the effective date in the startDate when the update data includes the effective date, and stores the current date (update date) in the startDate when the update data does not include the effective date. Store. The storage unit 232 does not store information in endDate.

例えば、更新対象の履歴テーブルが組織履歴テーブル222であるものとする。かかる場合に、格納部232は、更新データの組織名が組織履歴テーブル222の最新レコードに記憶されていない場合に、更新データに含まれる有効日付から「1日」を減算した日付等を最新レコードの「endDate」に格納する。さらに、格納部232は、更新データに含まれる社員ID、組織名、startDate及びendDateを新たなレコードとして組織履歴テーブル222に格納する。   For example, it is assumed that the history table to be updated is the organization history table 222. In such a case, when the organization name of the update data is not stored in the latest record of the organization history table 222, the storage unit 232 displays the date obtained by subtracting “one day” from the effective date included in the update data. Stored in “endDate”. Further, the storage unit 232 stores the employee ID, organization name, startDate, and endDate included in the update data as new records in the organization history table 222.

また、格納部232は、更新データの属性情報が最新レコードに記憶されている場合には(ステップS305肯定)、かかる更新データに含まれる社員ID及び属性情報を更新対象の履歴テーブルに格納せずに、ステップS301に戻る。   Further, when the attribute information of the update data is stored in the latest record (Yes at Step S305), the storage unit 232 does not store the employee ID and attribute information included in the update data in the history table to be updated. Returning to step S301.

また、格納部232は、更新データの社員IDが更新対象の履歴テーブルに記憶されていない場合には(ステップS304否定)、更新データに含まれる社員ID及び属性情報と、startDate及びendDateとを新たなレコードとして更新対象の履歴テーブルに格納する(ステップS308)。このとき、格納部232は、更新データに有効日付が含まれる場合には、startDateに有効日付を格納し、更新データに有効日付が含まれない場合には、startDateに現在日付(更新日)を格納する。また、格納部232は、endDateには情報を格納しない。   In addition, when the employee ID of the update data is not stored in the history table to be updated (No at Step S304), the storage unit 232 newly updates the employee ID and attribute information included in the update data, and startDate and endDate. As a new record in the history table to be updated (step S308). At this time, the storage unit 232 stores the effective date in the startDate when the update data includes the effective date, and stores the current date (update date) in the startDate when the update data does not include the effective date. Store. The storage unit 232 does not store information in endDate.

[実施例2に係るデータ管理装置による検索処理手順]
次に、図12を用いて、実施例2に係るデータ管理装置200による検索処理の手順について説明する。図12は、実施例2に係るデータ管理装置200による検索処理手順を示すフローチャートである。なお、以下では、記憶部220が図8〜図10に示した各履歴テーブルを有する場合を例に挙げて説明する。
[Search Processing Procedure by Data Management Device According to Second Embodiment]
Next, a search processing procedure performed by the data management apparatus 200 according to the second embodiment will be described with reference to FIG. FIG. 12 is a flowchart illustrating a search processing procedure performed by the data management apparatus 200 according to the second embodiment. Hereinafter, a case where the storage unit 220 includes the history tables illustrated in FIGS. 8 to 10 will be described as an example.

図12に示すように、データ管理装置200の検索部233は、検索要求を受け付けた場合に、検索対象の属性情報を記憶する履歴テーブル(組織履歴テーブル222、内線履歴テーブル223、部屋番号履歴テーブルなど)から、検索要求に含まれる社員IDをキーに、検索対象の属性情報を検索する(ステップS401)。   As shown in FIG. 12, when the search unit 233 of the data management apparatus 200 receives a search request, the search unit 233 stores a history table (organization history table 222, extension history table 223, room number history table) that stores search target attribute information. Etc.), the search target attribute information is searched using the employee ID included in the search request as a key (step S401).

そして、検索部233は、検索結果の属性情報をstartDateの降順にソートする(ステップS402)。この後に、検索部233は、ソート後の検索結果一覧を検索要求の送信元に通知する。なお、記憶部220内の各履歴テーブルには、同一の属性情報が連続して記憶されることがないので、検索部233は、連続する属性情報を削除する処理を行わなくてよい。   Then, the search unit 233 sorts the search result attribute information in descending order of startDate (step S402). Thereafter, the search unit 233 notifies the search request transmission source of the sorted search result list. In addition, since the same attribute information is not continuously stored in each history table in the storage unit 220, the search unit 233 does not have to perform a process of deleting the continuous attribute information.

[実施例2の効果]
上述してきたように、実施例2に係るデータ管理装置200において、記憶部220は、属性情報の種別毎に、かかる属性情報と有効期限とを対応付けて記憶する履歴テーブルを有する。また、格納部232は、更新要求を受け付けた場合に、更新要求に含まれる新たな属性情報の種別に対応する履歴テーブルに記憶されている最新属性情報の有効期限を更新するとともに、新たな属性情報を履歴テーブルに格納する。また、検索部133は、検索要求を受け付けた場合に、検索要求に含まれる属性情報の種別に対応する履歴テーブルから属性情報を検索する。
[Effect of Example 2]
As described above, in the data management apparatus 200 according to the second embodiment, the storage unit 220 includes a history table that stores the attribute information and the expiration date in association with each attribute information type. In addition, when the storage unit 232 receives an update request, the storage unit 232 updates the expiration date of the latest attribute information stored in the history table corresponding to the new attribute information type included in the update request. Store information in history table. Further, when receiving a search request, the search unit 133 searches for attribute information from a history table corresponding to the type of attribute information included in the search request.

このように、実施例2に係るデータ管理装置200は、属性情報毎に異なる履歴テーブルにて、かかる属性情報の変更履歴を管理する。これにより、実施例2に係るデータ管理装置200は、更新のあった属性情報のみを更新することができるので、記憶部220に管理するデータ量を削減することができる。また、実施例2に係るデータ管理装置200は、連続して重複する属性情報を各履歴テーブルに格納しないので、連続して重複する属性情報を削除する等の処理を要しない。この結果、実施例2に係るデータ管理装置200は、データの変遷を容易に提供することができる。   As described above, the data management apparatus 200 according to the second embodiment manages the change history of the attribute information in the history table that is different for each attribute information. As a result, the data management apparatus 200 according to the second embodiment can update only the attribute information that has been updated, and thus the amount of data managed in the storage unit 220 can be reduced. Further, since the data management apparatus 200 according to the second embodiment does not store continuously overlapping attribute information in each history table, it does not require processing such as deleting continuously overlapping attribute information. As a result, the data management apparatus 200 according to the second embodiment can easily provide data transition.

なお、上記実施例2において、データ管理装置200は、記憶部220内の各履歴テーブルが記憶する属性名を属性管理テーブルにて管理してもよい。図13に、実施例2に係る属性管理テーブル224の一例を示す。図13に示すように、属性管理テーブル224は、「属性名」、「テーブル名」といった項目を有する。「属性名」は、記憶部220内の各履歴テーブルが記憶する属性情報の名称(カラム名)を示し、属性情報の種別に該当する。「テーブル名」は、「属性名」によって示される属性情報を記憶する履歴テーブルの名称を示す。   In the second embodiment, the data management apparatus 200 may manage the attribute name stored in each history table in the storage unit 220 using the attribute management table. FIG. 13 illustrates an example of the attribute management table 224 according to the second embodiment. As shown in FIG. 13, the attribute management table 224 has items such as “attribute name” and “table name”. “Attribute name” indicates the name (column name) of attribute information stored in each history table in the storage unit 220 and corresponds to the type of attribute information. The “table name” indicates the name of the history table that stores the attribute information indicated by the “attribute name”.

すなわち、図13の例では、社員IDテーブル221が「社員ID」を記憶し、組織履歴テーブル222が「組織名」を記憶し、内線履歴テーブル223が「内線」を記憶することを示している。   That is, in the example of FIG. 13, the employee ID table 221 stores “employee ID”, the organization history table 222 stores “organization name”, and the extension history table 223 stores “extension”. .

実施例2に係る格納部232は、かかる属性管理テーブル224を参照することにより、更新対象の履歴テーブルを選択することができる。また、実施例2に係る検索部233は、かかる属性管理テーブル224を参照することにより、検索対象の履歴テーブルを選択することができる。これにより、格納部232及び検索部233は、属性情報の種別が膨大となり、履歴テーブルの数が膨大になった場合であっても、属性管理テーブル224を参照することにより、更新対象の履歴テーブルを容易に選択することができる。   The storage unit 232 according to the second embodiment can select the history table to be updated by referring to the attribute management table 224. Further, the search unit 233 according to the second embodiment can select a history table to be searched by referring to the attribute management table 224. Thereby, the storage unit 232 and the search unit 233 can update the history table to be updated by referring to the attribute management table 224 even when the number of types of attribute information becomes enormous and the number of history tables becomes enormous. Can be easily selected.

なお、上記例では、図13に例示した属性管理テーブル224が属性名「社員ID」及びテーブル名「社員IDテーブル」のレコードを記憶する例を示した。しかし、格納部232や検索部233は、「社員ID」のような基本的な情報がどのテーブルに記憶されているかを予め認識している場合もある。かかる場合には、属性管理テーブル224は、属性名「社員ID」及びテーブル名「社員IDテーブル」のレコードを記憶しなくてもよい。   In the above example, the attribute management table 224 illustrated in FIG. 13 stores the record of the attribute name “employee ID” and the table name “employee ID table”. However, the storage unit 232 and the search unit 233 may recognize in advance in which table basic information such as “employee ID” is stored. In such a case, the attribute management table 224 may not store records of the attribute name “employee ID” and the table name “employee ID table”.

上述したデータ管理装置は、上記実施例以外にも種々の異なる形態にて実施されてよい。そこで、実施例3では、上記のデータ管理装置の他の実施例について説明する。   The data management apparatus described above may be implemented in various different forms other than the above embodiment. Therefore, in a third embodiment, another embodiment of the data management apparatus will be described.

[管理対象のデータ]
上記実施例では、データ管理装置100又は200が、マスターデータを管理する例を示した。しかし、上記実施例に係るデータ管理装置100又は200は、マスターデータ以外のいかなるデータを管理する場合にも適用することができる。
[Managed data]
In the above embodiment, the example in which the data management apparatus 100 or 200 manages master data has been shown. However, the data management apparatus 100 or 200 according to the embodiment can be applied to managing any data other than the master data.

[データ構造]
また、上記実施例では、データ管理装置100又は200が、特定情報(上記実施例では、「社員ID」)を含むデータを管理する例を示した。しかし、上記実施例に係るデータ管理装置100又は200は、特定情報を含まないデータを管理する場合にも適用することができる。例えば、上記実施例1に係るデータ管理装置100は、社員IDの数だけ、マスターデータテーブルを有してもよい。この場合、データ管理装置100は、社員IDを含まないマスターデータテーブルを有することになる。かかる場合に、データ管理装置100の格納部132は、更新データに含まれる社員IDに基づいて、更新対象のマスターデータテーブルを選択することとなる。そして、格納部132は、選択したマスターデータテーブルの最新レコード内の属性情報と、更新データに含まれる属性情報とが全て一致するか否かを判定し、一致する場合には格納処理を行わずに、一致しない場合には、更新データに含まれる属性情報をマスターデータテーブルに格納する。同様に、上記実施例2に係るデータ管理装置200は、社員IDの数だけ、履歴テーブルを有してもよい。この場合、データ管理装置200は、社員IDを含まない履歴テーブルを有することになる。
[data structure]
In the above embodiment, the data management apparatus 100 or 200 manages data including specific information (“employee ID” in the above embodiment). However, the data management apparatus 100 or 200 according to the above embodiment can also be applied when managing data that does not include specific information. For example, the data management apparatus 100 according to the first embodiment may have as many master data tables as the number of employee IDs. In this case, the data management apparatus 100 has a master data table that does not include an employee ID. In such a case, the storage unit 132 of the data management apparatus 100 selects the master data table to be updated based on the employee ID included in the update data. Then, the storage unit 132 determines whether or not the attribute information in the latest record of the selected master data table matches the attribute information included in the update data. If they match, the storage process is not performed. If they do not match, the attribute information included in the update data is stored in the master data table. Similarly, the data management apparatus 200 according to the second embodiment may have as many history tables as the number of employee IDs. In this case, the data management apparatus 200 has a history table that does not include an employee ID.

[更新データ]
また、上記実施例では、更新データに全ての属性情報が含まれる例を示した。しかし、更新データには、特性情報(上記実施例では、「社員ID」)と、更新対象の属性情報のみが含まれてもよい。例えば、組織名を更新するための更新データには、社員IDと、更新後の組織名と、有効日付とが含まれ、内線及び部屋番号については含まれなくてもよい。この例の場合、実施例1に係るデータ管理装置100の格納部132は、更新データに含まれる社員ID及び組織名の組合せがマスターデータテーブル121の最新レコードに記憶されている場合には、格納処理を行わない。一方、格納部132は、かかる組合せが最新レコードに記憶されていない場合には、最新レコードのendDateを更新するとともに、更新データに含まれる属性情報を新たなレコードとしてマスターデータテーブル121に格納する。このとき、格納部132は、更新データに含まれない属性情報については、最新レコードにおける属性情報を新たなレコードにコピーする。
[Update data]
Moreover, in the said Example, the example in which all the attribute information was contained in update data was shown. However, the update data may include only characteristic information (“employee ID” in the above embodiment) and attribute information to be updated. For example, the update data for updating the organization name includes the employee ID, the updated organization name, and the effective date, and may not include the extension and the room number. In the case of this example, the storage unit 132 of the data management apparatus 100 according to the first embodiment stores the combination of the employee ID and the organization name included in the update data when stored in the latest record of the master data table 121. Do not process. On the other hand, when such a combination is not stored in the latest record, the storage unit 132 updates the endDate of the latest record and stores the attribute information included in the update data in the master data table 121 as a new record. At this time, for the attribute information not included in the update data, the storage unit 132 copies the attribute information in the latest record to a new record.

[システム構成]
また、上記実施例において説明した各処理のうち、自動的に行われるものとして説明した処理の全部または一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部または一部を公知の方法で自動的に行うこともできる。この他、上記文書中や図面中で示した処理手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。例えば、図2、図8〜図10、図13に示した各種情報は一例であって任意に変更することができる。一例を挙げると、図2に示したマスターデータテーブル121は、社員の氏名、住所、携帯電話番号、役職等の情報を記憶してもよい。また、図2に示したマスターデータテーブル121は、社員に関するマスターデータではなく、製品、顧客、会計等に関するマスターデータを記憶してもよい。
[System configuration]
In addition, among the processes described in the above embodiment, all or a part of the processes described as being automatically performed can be manually performed, or the processes described as being performed manually can be performed. All or a part can be automatically performed by a known method. In addition, the processing procedures, specific names, and information including various data and parameters shown in the document and drawings can be arbitrarily changed unless otherwise specified. For example, the various information shown in FIGS. 2, 8 to 10, and 13 is an example and can be arbitrarily changed. For example, the master data table 121 shown in FIG. 2 may store information such as employee names, addresses, mobile phone numbers, and job titles. In addition, the master data table 121 illustrated in FIG. 2 may store master data related to products, customers, accounting, and the like instead of master data related to employees.

また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。例えば、図1に示した受付部131と格納部132とは統合されてもよい。同様に、図7に示した受付部131と格納部232とは統合されてもよい。   Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. For example, the reception unit 131 and the storage unit 132 illustrated in FIG. 1 may be integrated. Similarly, the reception unit 131 and the storage unit 232 illustrated in FIG. 7 may be integrated.

[プログラム]
また、上記実施例において説明したデータ管理装置100又は200が実行する処理をコンピュータが実行可能な言語で記述したプログラムを作成することもできる。例えば、データ管理装置100又は200が実行する処理をコンピュータが実行可能な言語で記述したデータ管理プログラムを作成することもできる。この場合、コンピュータがデータ管理プログラムを実行することにより、上記実施例と同様の効果を得ることができる。さらに、かかるデータ管理プログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたデータ管理プログラムをコンピュータに読み込ませて実行することにより上記実施例と同様の処理を実現してもよい。以下に、図1に示したデータ管理装置100と同様の機能を実現するデータ管理プログラムを実行するコンピュータの一例を説明する。
[program]
In addition, it is possible to create a program in which the processing executed by the data management apparatus 100 or 200 described in the above embodiment is described in a language that can be executed by a computer. For example, a data management program in which processing executed by the data management apparatus 100 or 200 is described in a language that can be executed by a computer can be created. In this case, when the computer executes the data management program, the same effect as in the above embodiment can be obtained. Further, by recording the data management program on a computer-readable recording medium, and reading and executing the data management program recorded on the recording medium by the computer, the same processing as in the above-described embodiment may be realized. Good. An example of a computer that executes a data management program that implements the same function as that of the data management apparatus 100 shown in FIG. 1 will be described below.

図14は、データ管理プログラムを実行するコンピュータ1000を示す図である。図14に例示するように、コンピュータ1000は、例えば、メモリ1010と、CPU1020と、ハードディスクドライブインタフェース1030と、ディスクドライブインタフェース1040と、シリアルポートインタフェース1050と、ビデオアダプタ1060と、ネットワークインタフェース1070とを有し、これらの各部はバス1080によって接続される。   FIG. 14 is a diagram illustrating a computer 1000 that executes a data management program. As illustrated in FIG. 14, the computer 1000 includes, for example, a memory 1010, a CPU 1020, a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These units are connected by a bus 1080.

メモリ1010は、図14に例示するように、ROM(Read Only Memory)1011及びRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、図14に例示するように、ハードディスクドライブ1031に接続される。ディスクドライブインタフェース1040は、図14に例示するように、ディスクドライブ1041に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブに挿入される。シリアルポートインタフェース1050は、図14に例示するように、例えばマウス1051、キーボード1052に接続される。ビデオアダプタ1060は、図14に例示するように、例えばディスプレイ1061に接続される。   The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012 as illustrated in FIG. The ROM 1011 stores a boot program such as BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1031 as illustrated in FIG. The disk drive interface 1040 is connected to the disk drive 1041 as illustrated in FIG. For example, a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive. The serial port interface 1050 is connected to, for example, a mouse 1051 and a keyboard 1052 as illustrated in FIG. The video adapter 1060 is connected to a display 1061, for example, as illustrated in FIG.

ここで、図14に例示するように、ハードディスクドライブ1031は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、上記のデータ管理プログラムは、コンピュータ1000によって実行される指令が記述されたプログラムモジュールとして、例えばハードディスクドライブ1031に記憶される。例えば、図1に例示した受付部131と同様の情報処理を実行する受付手順と、格納部132と同様の情報処理を実行する格納手順と、検索部133と同様の情報処理を実行する検索手順とが記述されたプログラムモジュール1093が、ハードディスクドライブ1031に記憶される。   Here, as illustrated in FIG. 14, the hard disk drive 1031 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. That is, the data management program is stored in, for example, the hard disk drive 1031 as a program module in which a command to be executed by the computer 1000 is described. For example, a reception procedure for executing information processing similar to that of the reception unit 131 illustrated in FIG. 1, a storage procedure for executing information processing similar to the storage unit 132, and a search procedure for executing information processing similar to that of the search unit 133 Is stored in the hard disk drive 1031.

また、上記実施例で説明した記憶部120が保持する各種データは、プログラムデータとして、例えばメモリ1010やハードディスクドライブ1031に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1031に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出し、受付手順、格納手順、検索手順を実行する。   Various data held by the storage unit 120 described in the above embodiment is stored as program data, for example, in the memory 1010 or the hard disk drive 1031. Then, the CPU 1020 reads the program module 1093 and the program data 1094 stored in the memory 1010 and the hard disk drive 1031 to the RAM 1012 as necessary, and executes the reception procedure, the storage procedure, and the search procedure.

なお、データ管理プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1031に記憶される場合に限られず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ等を介してCPU1020によって読み出されてもよい。あるいは、データ管理プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶され、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。   Note that the program module 1093 and the program data 1094 related to the data management program are not limited to being stored in the hard disk drive 1031, but are stored in, for example, a removable storage medium and read out by the CPU 1020 via the disk drive or the like. Also good. Alternatively, the program module 1093 and the program data 1094 related to the data management program are stored in another computer connected via a network (LAN (Local Area Network), WAN (Wide Area Network), etc.), and the network interface 1070 is stored. Via the CPU 1020.

100 データ管理装置
120 記憶部
121 マスターデータテーブル
131 受付部
132 格納部
133 検索部
200 データ管理装置
220 記憶部
221 社員IDテーブル
222 組織履歴テーブル
223 内線履歴テーブル
224 属性管理テーブル
232 格納部
233 検索部
DESCRIPTION OF SYMBOLS 100 Data management apparatus 120 Storage part 121 Master data table 131 Reception part 132 Storage part 133 Search part 200 Data management apparatus 220 Storage part 221 Employee ID table 222 Organization history table 223 Extension history table 224 Attribute management table 232 Storage part 233 Search part

Claims (7)

所定の事物に関する属性情報と、当該属性情報が当該事物の属性に該当する期限を示す有効期限とを対応付けて記憶する記憶部と、
前記属性情報を更新する旨の更新要求を受け付けた場合に、前記記憶部に記憶されている有効期限のうち現時点が有効期限内であることを示す有効期限を、当該有効期限に対応する最新属性情報が前記事物の属性に該当しなくなった日付に更新し、前記更新要求に含まれる新たな属性情報と当該新たな属性情報が現時点で前記事物の属性に該当することを示す有効期限とを前記記憶部に格納する格納部と、
前記属性情報の検索要求を受け付けた場合に、当該検索要求に含まれる属性情報を前記記憶部から検索する検索部と
を備えたことを特徴とするデータ管理装置。
A storage unit that associates and stores attribute information related to a predetermined thing and an expiration date that indicates a time limit for which the attribute information corresponds to the attribute of the thing;
When an update request for updating the attribute information is received, an expiration date indicating that the current time is within the expiration date among the expiration dates stored in the storage unit, and the latest attribute corresponding to the expiration date Updated on the date when the information no longer corresponds to the attribute of the thing, the new attribute information included in the update request, and an expiration date indicating that the new attribute information currently corresponds to the attribute of the thing; Storing in the storage unit;
A data management apparatus comprising: a search unit that searches the storage unit for attribute information included in the search request when a search request for the attribute information is received.
前記格納部は、
前記更新要求に含まれる新たな属性情報と、前記記憶部に記憶されている前記最新属性情報とが異なる場合に、前記最新属性情報に対応する有効期限を更新するとともに、前記新たな属性情報を前記記憶部に格納する
ことを特徴とする請求項1に記載のデータ管理装置。
The storage unit
When the new attribute information included in the update request is different from the latest attribute information stored in the storage unit, the expiration date corresponding to the latest attribute information is updated, and the new attribute information is updated. The data management device according to claim 1, wherein the data management device is stored in the storage unit.
前記記憶部は、
前記事物に関する属性情報の種別毎に、当該属性情報と当該属性情報の有効期限とを対応付けて記憶する履歴記憶部を有し、
前記格納部は、
前記更新要求を受け付けた場合に、当該更新要求に含まれる新たな属性情報の種別に対応する履歴記憶部に記憶されている最新属性情報の有効期限を更新するとともに、前記新たな属性情報を当該履歴記憶部に格納し、
前記検索部は、
前記検索要求を受け付けた場合に、当該検索要求に含まれる属性情報の種別に対応する履歴記憶部から当該属性情報を検索する
ことを特徴とする請求項1又は2に記載のデータ管理装置。
The storage unit
For each type of attribute information related to the thing, a history storage unit that stores the attribute information and the expiration date of the attribute information in association with each other,
The storage unit
When the update request is received, the expiration date of the latest attribute information stored in the history storage unit corresponding to the new attribute information type included in the update request is updated, and the new attribute information is updated Store it in the history storage,
The search unit
The data management apparatus according to claim 1 or 2, wherein when the search request is received, the attribute information is searched from a history storage unit corresponding to a type of attribute information included in the search request.
前記記憶部は、
前記有効期限として、前記属性情報が前記事物の属性に該当することとなった最初の日付と、前記属性情報が前記事物の属性に該当する最終の日付とを記憶し、
前記格納部は、
前記新たな属性情報と当該新たな属性情報が前記事物の属性に該当する最初の日付である有効日付とを含む更新要求を受け付けた場合に、前記記憶部に記憶されている最新属性情報に対応する有効期限における最終の日付を前記有効日付の前日の日付に更新し、前記新たな属性情報を前記記憶部に格納するとともに、当該新たな属性情報の有効期限における最初の日付に前記有効日付を格納する
ことを特徴とする請求項1〜3のいずれか一つに記載のデータ管理装置。
The storage unit
As the expiration date, storing the first date when the attribute information corresponds to the attribute of the thing, and the last date when the attribute information corresponds to the attribute of the thing,
The storage unit
When receiving an update request including the new attribute information and an effective date that is the first date when the new attribute information corresponds to the attribute of the thing, the latest attribute information stored in the storage unit The last date in the corresponding effective date is updated to the date before the effective date, the new attribute information is stored in the storage unit, and the effective date is the first date in the effective date of the new attribute information. The data management device according to any one of claims 1 to 3, wherein the data management device is stored.
前記属性情報の種別と当該種別に対応する属性情報とを記憶する履歴記憶部を識別するための識別情報とを対応付けて記憶する属性管理記憶部をさらに備え、
前記格納部は、
前記更新要求を受け付けた場合に、当該更新要求に含まれる新たな属性情報の種別に対応する履歴記憶部の識別情報を前記属性管理記憶部から取得し、取得した識別情報によって特定される履歴記憶部に記憶されている最新属性情報の有効期限を更新するとともに、前記新たな属性情報を当該履歴記憶部に格納し、
前記検索部は、
前記検索要求を受け付けた場合に、当該検索要求に含まれる属性情報の種別に対応する履歴記憶部の識別情報を前記属性管理記憶部から取得し、取得した識別情報によって特定される履歴記憶部から当該属性情報を検索する
ことを特徴とする請求項1〜4のいずれか一つに記載のデータ管理装置。
An attribute management storage unit that stores the identification information for identifying the history storage unit that stores the type of the attribute information and the attribute information corresponding to the type in association with each other;
The storage unit
When the update request is received, the history storage unit acquires the identification information of the history storage unit corresponding to the new attribute information type included in the update request from the attribute management storage unit, and is specified by the acquired identification information Update the expiration date of the latest attribute information stored in the unit, store the new attribute information in the history storage unit,
The search unit
When the search request is accepted, identification information of the history storage unit corresponding to the type of attribute information included in the search request is acquired from the attribute management storage unit, and from the history storage unit specified by the acquired identification information The data management apparatus according to claim 1, wherein the attribute information is searched.
データ管理装置が実行するデータ管理方法であって、
所定の事物に関する属性情報と当該属性情報が当該事物の属性に該当する期限を示す有効期限とを対応付けて記憶する記憶部に記憶されている属性情報を更新する旨の更新要求を受け付ける受付工程と、
前記受付工程において前記更新要求が受け付けられた場合に、前記記憶部に記憶されている有効期限のうち現時点が有効期限内であることを示す有効期限を、当該有効期限に対応する最新属性情報が前記事物の属性に該当しなくなった日付に更新し、前記更新要求に含まれる新たな属性情報と当該新たな属性情報が現時点で前記事物の属性に該当することを示す有効期限とを前記記憶部に格納する格納工程と、
前記属性情報の検索要求を受け付けた場合に、当該検索要求に含まれる属性情報を前記記憶部から検索する検索工程と
を含んだことを特徴とするデータ管理方法。
A data management method executed by a data management device,
An accepting step of accepting an update request for updating attribute information stored in a storage unit that stores attribute information related to a predetermined thing and an expiration date indicating an expiration date corresponding to the attribute of the thing in question. When,
When the update request is accepted in the accepting step, the latest attribute information corresponding to the expiration date indicates an expiration date indicating that the current time is within the expiration date among the expiration dates stored in the storage unit. Update to a date that no longer corresponds to the attribute of the thing, the new attribute information included in the update request and an expiration date indicating that the new attribute information currently corresponds to the attribute of the thing A storage step of storing in the storage unit;
And a search step of searching the storage unit for attribute information included in the search request when a search request for the attribute information is received.
所定の事物に関する属性情報と当該属性情報が当該事物の属性に該当する期限を示す有効期限とを対応付けて記憶する記憶部に記憶されている属性情報を更新する旨の更新要求を受け付ける受付手順と、
前記受付手順において前記更新要求が受け付けられた場合に、前記記憶部に記憶されている有効期限のうち現時点が有効期限内であることを示す有効期限を、当該有効期限に対応する最新属性情報が前記事物の属性に該当しなくなった日付に更新し、前記更新要求に含まれる新たな属性情報と当該新たな属性情報が現時点で前記事物の属性に該当することを示す有効期限とを前記記憶部に格納する格納手順と、
前記属性情報の検索要求を受け付けた場合に、当該検索要求に含まれる属性情報を前記記憶部から検索する検索手順と
をコンピュータに実行させることを特徴とするデータ管理プログラム。
Accepting procedure for accepting an update request for updating attribute information stored in a storage unit that associates and stores attribute information related to a predetermined thing and an expiration date indicating a deadline corresponding to the attribute of the thing When,
When the update request is received in the reception procedure, the latest attribute information corresponding to the expiration date indicates an expiration date indicating that the current time is within the expiration date among the expiration dates stored in the storage unit. Update to a date that no longer corresponds to the attribute of the thing, the new attribute information included in the update request and an expiration date indicating that the new attribute information currently corresponds to the attribute of the thing A storage procedure for storing in the storage unit;
A data management program that, when receiving a search request for attribute information, causes a computer to execute a search procedure for searching for attribute information included in the search request from the storage unit.
JP2012036002A 2012-02-22 2012-02-22 Data management device, data management method and data management program Pending JP2013171495A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012036002A JP2013171495A (en) 2012-02-22 2012-02-22 Data management device, data management method and data management program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012036002A JP2013171495A (en) 2012-02-22 2012-02-22 Data management device, data management method and data management program

Publications (1)

Publication Number Publication Date
JP2013171495A true JP2013171495A (en) 2013-09-02

Family

ID=49265373

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012036002A Pending JP2013171495A (en) 2012-02-22 2012-02-22 Data management device, data management method and data management program

Country Status (1)

Country Link
JP (1) JP2013171495A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776709A (en) * 2016-11-15 2017-05-31 山东浪潮云服务信息科技有限公司 A kind of processing method and processing device of company information
CN112541385A (en) * 2019-09-20 2021-03-23 东芝泰格有限公司 Feature amount management device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776709A (en) * 2016-11-15 2017-05-31 山东浪潮云服务信息科技有限公司 A kind of processing method and processing device of company information
CN112541385A (en) * 2019-09-20 2021-03-23 东芝泰格有限公司 Feature amount management device and storage medium

Similar Documents

Publication Publication Date Title
US10783213B2 (en) Flexible graph system for accessing organization information
US9251157B2 (en) Enterprise node rank engine
US8898198B2 (en) Graphical user interface (GUI) to associate information with an object
US9875272B1 (en) Method and system for designing a database system for high event rate, while maintaining predictable query performance
US8620946B2 (en) Storage and searching of temporal entity information
US9336286B2 (en) Graphical record matching process replay for a data quality user interface
US20220083618A1 (en) Method And System For Scalable Search Using MicroService And Cloud Based Search With Records Indexes
US20120310918A1 (en) Unique join data caching method
US20150100510A1 (en) Finding suitable jobs using a job website
JP2017102878A (en) Corporation number search device, system, method, program, and corporation number addition program
US8271493B2 (en) Extensible mechanism for grouping search results
CN103809915B (en) The reading/writing method of a kind of disk file and device
JP2013171495A (en) Data management device, data management method and data management program
JP2009217529A (en) Knowledge management system
US20200097485A1 (en) Selective synchronization of linked records
US10324991B2 (en) Search promotion systems and method
CN112685572B (en) Heterogeneous data fusion method and device
US9659059B2 (en) Matching large sets of words
CN115185973A (en) Data resource sharing method, platform, device and storage medium
US9946784B2 (en) Data cache architecture
US11301482B2 (en) Assist system and assist method
JP5068350B2 (en) Data processing apparatus, method and program
JP2019086939A (en) Search system, search method and search program
US20220188367A1 (en) System and method for analyzing, organizing, and presenting data stored on a mobile communication device
US20230297596A1 (en) Mutual Exclusion Data Class Analysis in Data Governance