JP6480495B2 - Data management apparatus, data management method, and program - Google Patents
Data management apparatus, data management method, and program Download PDFInfo
- Publication number
- JP6480495B2 JP6480495B2 JP2017050997A JP2017050997A JP6480495B2 JP 6480495 B2 JP6480495 B2 JP 6480495B2 JP 2017050997 A JP2017050997 A JP 2017050997A JP 2017050997 A JP2017050997 A JP 2017050997A JP 6480495 B2 JP6480495 B2 JP 6480495B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- column
- oriented
- converted
- item
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 23
- 238000013523 data management Methods 0.000 title claims description 20
- 238000006243 chemical reaction Methods 0.000 claims description 34
- 238000013500 data storage Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 24
- 230000006870 function Effects 0.000 description 15
- 230000008569 process Effects 0.000 description 8
- 238000007726 management method Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Description
本発明は、データ管理装置、データ管理方法、およびプログラムに関する。 The present invention relates to a data management device, a data management method, and a program.
従来、中国、日本、および韓国の言語のための名前を検出する方法が知られている(特許文献1参照)。この方法では、構造化されたデータを扱っている。 Conventionally, a method for detecting names for Chinese, Japanese, and Korean languages is known (see Patent Document 1). This method deals with structured data.
ところで、データベースにおけるデータ構造には、行指向型のデータ構造と列指向型のデータ構造がある。行指向型のデータ構造とは、ひとつのレコードを、ひとまとまりの論理構造として保持するデータ構造である。これに対し、列指向型のデータ構造が知られている。列指向型のデータ構造とは、同じインデックス(ユーザの属性データであれば、名前、年齢、性別といったもの)に対応するデータを、ひとまとまりの論理構造として保持するデータ構造である。論理構造とは、データを検索する際に使用される、キー、LBA(Logical Block Addressing)、論物変換テーブル上のラベル、その他の論理的な情報をいう。行指向型のデータ構造は、データの追加や削除などが容易であるのに対し、列指向型のデータ構造は、インデックスごとの統計処理に向いているといった違いがある。 By the way, the data structure in the database includes a row-oriented data structure and a column-oriented data structure. A row-oriented data structure is a data structure that holds one record as a group of logical structures. On the other hand, a column-oriented data structure is known. The column-oriented data structure is a data structure that holds data corresponding to the same index (name, age, sex, etc. in the case of user attribute data) as a group of logical structures. The logical structure means a key, an LBA (Logical Block Addressing), a label on a logical / physical conversion table, and other logical information used when searching for data. The row-oriented data structure is easy to add or delete data, while the column-oriented data structure is suitable for statistical processing for each index.
ここで、行指向型のデータ構造を扱うJSONなどの機能では、データのツリー構造を自動生成することができるが、ネットワーク、記憶装置、ソフトウェア処理の面でコストが大きい。特に、列指向型のデータ構造を有するデータベースから統計処理のためのデータを読み出す際の処理時間は長くなってしまう。 Here, a function such as JSON that handles row-oriented data structures can automatically generate a tree structure of data, but the cost is high in terms of network, storage device, and software processing. In particular, the processing time for reading data for statistical processing from a database having a column-oriented data structure is long.
一方、列指向型のデータ構造でデータを格納した場合、採用され得る全てのインデックスの管理と、データの追加や削除などが困難である。特に、Stream形式でデータが入力される場合、レコードごとにデータを処理することが想定されるが、レコードごとの処理から直接的に列指向型に書き込むことはできない。また、列指向型においては、書き込み失敗時の管理や重複排除を行う有効な方法が開発されていない。 On the other hand, when data is stored in a column-oriented data structure, it is difficult to manage all indexes that can be employed and to add or delete data. In particular, when data is input in the Stream format, it is assumed that the data is processed for each record, but cannot be directly written in a column-oriented manner from the process for each record. Further, in the column-oriented type, an effective method for performing management at the time of writing failure and deduplication has not been developed.
本発明は、このような事情を考慮してなされたものであり、非構造な入力データを、データ項目ごとに高速に読み出し可能な態様で保存すると共に、入力データの追加や削除を容易に行うことができるデータ管理装置、データ管理方法、およびプログラムを提供することを目的の一つとする。 The present invention has been made in view of such circumstances, and saves unstructured input data in a form that can be read at high speed for each data item, and easily adds or deletes input data. Another object is to provide a data management device, a data management method, and a program that can be used.
本発明の一態様は、入力されたデータ格納要求を解釈して抽象表現に変換する解釈部と、前記解釈部により抽象表現に変換されたデータを、予め配列が確保されていない列指向型のデータ構造で管理しながら記憶部に記憶させる変換部と、を備えるデータ管理装置である。 According to one aspect of the present invention, an interpretation unit that interprets an input data storage request and converts it into an abstract representation, and a column-oriented type in which data that has been converted into an abstract representation by the interpretation unit is not secured in advance. And a conversion unit that stores the data in the storage unit while managing the data structure.
本発明の一態様によれば、非構造な入力データを、データ項目ごとに高速に読み出し可能な態様で保存すると共に、入力データの追加や削除を容易に行うことができる。 According to one aspect of the present invention, unstructured input data can be stored in a manner that can be read at high speed for each data item, and input data can be easily added or deleted.
以下、図面を参照し、本発明のデータ管理装置、データ管理方法、およびプログラムの実施形態について説明する。データ管理装置は、クライアントから受信したデータを記憶装置に保管すると共に、データ送信元のクライアント、或いは他のクライアントからの要求に応じたデータを記憶装置から読み出して提供する装置である。データ管理装置をDBMS(データベース管理システム)と称してもよい。クライアントには、エンドユーザの使用する端末装置において動作するアプリケーションプログラムと協調して動作するアプリケーションサーバ(以下、フロントエンドサーバと称する)、蓄積されたデータを統計データなどとして利用するデータ利用者サーバなどが含まれる。 Hereinafter, embodiments of a data management device, a data management method, and a program according to the present invention will be described with reference to the drawings. The data management apparatus is an apparatus that stores data received from a client in a storage device, and reads and provides data in response to a request from a data transmission source client or another client from the storage device. The data management apparatus may be referred to as a DBMS (database management system). The client includes an application server (hereinafter referred to as a front-end server) that operates in cooperation with an application program that operates on a terminal device used by an end user, a data user server that uses accumulated data as statistical data, and the like. Is included.
先に、本発明の概念的側面について説明する。近年のHadoopはhiveやprestoに代表される"SQL on Hadoop"でRDB的にhdfsにアクセスすることが主流であり、過去に言われていた「非構造な大量のデータ」のファイルを直接扱うケースはまれになってきた。一方、格納されるデータは、取得時には非構造な「ログ」であることがほとんどである。そこで、多くの場合「規則性のある非構造データ」としてデータを取得・加工することになる。この、「規則性のある非構造データ」の代表がjsonやxmlであり、これは「ネストを含むkey value形式」で表現でき、これは木構造として見ることができる。図1は、jsonフォーマットによるログの一例を示す図であり、図2は図1のログを木構造で表現した図である。木構造による表現は「ネストを含むkey value形式」の抽象化に適している。図3は、jsonフォーマットによるログの他の一例を示す図であり、図4は図3のログを木構造で表現した図である。 First, a conceptual aspect of the present invention will be described. In recent years, Hadoop is mainly accessing RDB-like hdfs with "SQL on Hadoop" represented by hive and presto, and directly handling "unstructured large amount of data" files that were said in the past Has become rare. On the other hand, the stored data is mostly an unstructured “log” at the time of acquisition. Therefore, in many cases, data is acquired and processed as “regular unstructured data”. The representative of “regular unstructured data” is json or xml, which can be expressed in “key value format including nest”, which can be viewed as a tree structure. FIG. 1 is a diagram showing an example of a log in json format, and FIG. 2 is a diagram representing the log of FIG. 1 in a tree structure. The representation by tree structure is suitable for the abstraction of "key value format including nesting". FIG. 3 is a diagram showing another example of the log in the json format, and FIG. 4 is a diagram expressing the log of FIG. 3 in a tree structure.
図4で示すように、「ネストを含むkeyvalue」は(x, z)平面で、配列に関してはy方向に次元を拡張する事が可能であり、多次元空間での木構造は「ネストを含むkeyvalue形式」、すなわちschemaを表現するのに適している事がわかる。この「多次元空間での木構造」をデータフォーマット(json, xml, avro, message pack等)から切り離して抽象化したオブジェクトにしたものが「schemaobject」である。 As shown in Fig. 4, "keyvalue including nest" is (x, z) plane, the dimension can be expanded in the y direction with respect to the array, and the tree structure in multidimensional space includes "nest includes" You can see that it is suitable for expressing "keyvalue format", that is, schema. “Schemaobject” is an object obtained by separating this “tree structure in a multidimensional space” from the data format (json, xml, avro, message pack, etc.) and abstracting it.
一方、Hadoopに代表される分散型ストレージは、当初は大量の非構造データに対し高スループット高レイテンシでアクセスすることを主眼に設計・開発されたが、近年では、高スループットかつ低レイテンシを実現するために、データを構造化して配置するケースが増えてきている。hdfs上に構造化する際はカラムナーと呼ばれる、RDB的なデータを永続化するファイルフォーマットが一般的であり、代表的なものとしてhive ORC file、apache parquetがある。カラムナーファイルのデータを木構造で表現すると、図5に示すような「root直下のみの階層しかない2次元木」で描くことができる。図5は、カラムナーファイルのデータを木構造で表現した図である。 On the other hand, distributed storage represented by Hadoop was originally designed and developed to access a large amount of unstructured data with high throughput and high latency, but in recent years it has achieved high throughput and low latency. For this reason, cases where data is structured and arranged are increasing. When structuring on hdfs, a file format called columnar that persists RDB-like data is common, and typical examples include hive ORC file and apache parquet. If the data of the columnar file is expressed in a tree structure, it can be drawn with a “two-dimensional tree having only a hierarchy directly under the root” as shown in FIG. FIG. 5 is a diagram representing the data of the columner file in a tree structure.
カラムナーファイルフォーマットの利点は、「カラム毎にアクセスすることによる省コスト可」であり、メモリ・CPU・IOどの観点でも、Hadoopで馴染みのある他の非構造データ用のファイルフォーマットを凌駕する。一方で、カラムナーファイルには「データに構造化を強制する」という弱点がある。前述のとおり、データは取得時には非構造な「ログ」であり、構造化しようにも「多次元的な木構造」という高度な表現は不可能である。 The advantage of the columnar file format is “cost savings by accessing each column”, and outperforms other unstructured data file formats that are familiar to Hadoop in terms of memory, CPU, and IO. On the other hand, the columnar file has a weakness of "force data structuring". As described above, data is an unstructured “log” at the time of acquisition, and a high-level expression “multi-dimensional tree structure” is impossible even if it is structured.
この問題を解決するのが、本発明で採用する方式である。これは、多次元的な(木構造で言うと深さ方向の)広がりをもつデータを永続化することができるファイルフォーマットである。前述したschemaobjectをそのまま記述する形式を取るので、「ネストを含むkey valueの配列」という表現力を保ったままデータを保持することができる。 The system adopted in the present invention solves this problem. This is a file format that can perpetuate data having a multidimensional spread (in the depth direction in the case of a tree structure). Since the schemaobject described above is used as it is, the data can be retained while maintaining the expressive power of "key value array including nesting".
一般に、データのカラムナフォーマットの弱点は「データの構造化」の部分であり、多次元的なデータを二次元へ次元圧縮するロジックと処理をどこかで実装する必要がでてきてしまい、それが俗にいう「スキーマ」である。スキーマの管理や変更には大きなコストが伴う。本発明の方式では、次元圧縮処理が不要であるため、データの保存においては、この「スキーマ問題」から解放される。また、カラムナファイルでは構造上不可能な、配列やStruct型の「特定の値」へのアクセスも、そのカラムを全展開することなく木の探索としてアクセスできる点でも大きな利点がある。 In general, the weakness of the columnar format of data is the "data structuring" part, and it has become necessary to implement logic and processing somewhere that compresses multidimensional data into two dimensions. Is a common “schema”. Schema management and modification is costly. In the method of the present invention, since dimension compression processing is not required, data storage frees you from this “schema problem”. In addition, access to a “specific value” of an array or Struct type, which is impossible in the structure of a columner file, has a great advantage in that it can be accessed as a tree search without fully expanding the column.
以下、具体的な構成および機能について説明する。図6は、データ管理装置の一例であるデータベースサーバ100の使用環境と構成の一例を示す図である。エンドユーザの使用する一以上の端末装置10は、フロントエンドサーバ20と通信する。端末装置10では、アプリケーションプログラムが動作し、アプリケーションプログラムの実行に必要なデータをフロントエンドサーバ20との間で送受信する。フロントエンドサーバ20は、端末装置10から取得したデータのうち保存が必要なデータを、プロキシサーバ30を介してデータベースサーバ100に送信して保管させる。また、フロントエンドサーバ20は、アプリケーションプログラムの実行に必要なデータをデータベースサーバ100から読み出し、端末装置10に送信する。このような、一以上の端末装置10とフロントエンドサーバ20との組み合わせが複数存在する。それぞれのフロントエンドサーバ20は、JSON(JavaScript(登録商標) Object Notation)、MySQLなどの任意の形式で、データベースサーバ100に対してデータの書き込み要求または読み出し要求を行う。
Hereinafter, a specific configuration and function will be described. FIG. 6 is a diagram illustrating an example of the usage environment and configuration of the
一方、データ利用者サーバ50は、フロントエンドサーバ20から収集されたデータのうち、利用規約によって統計処理などに利用することが許可されているデータを、データベースサーバ100から取得する。なお、フロントエンドサーバ20とデータ利用者サーバ50の区別は厳密なものである必要はなく、フロントエンドサーバ20の一部がデータ利用者サーバ50として動作することがあってもよい。また、データ利用者サーバ50は、プロキシサーバ30を介してデータベースサーバ100と通信してもよい。図6に示す各装置は、インターネット、WAN(Wide Area Network)、LAN(Local Area Network)などのネットワークを介して相互に通信可能に接続されている。
On the other hand, the
データベースサーバ100は、例えば、図示しないNIC(Network Interface Card)などの通信インターフェースの他、フロントエンドインターフェース110と、データ利用者インターフェース120と、記憶部150とを備える。フロントエンドインターフェース110およびデータ利用者インターフェース120は、それぞれ、CPU(Central Processing Unit)などのプロセッサがプログラム(ソフトウェア)を実行することにより実現される。また、これらの機能部のうち一方または双方は、LSI(Large Scale Integration)やASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)などのハードウェアにより実現されてもよいし、ソフトウェアとハードウェアが協働することで実現されてもよい。
The
フロントエンドインターフェース110は、例えば、解釈部112と、変換部114とを備える。解釈部112は、フロントエンドサーバ20から取得されるデータを抽象化する。また、解釈部112は、フロントエンドサーバ20にデータを提供する際には、抽象化されたデータを、フロントエンドサーバ20に対応した形式に変換する。変換部114は、行指向型のデータを列指向型のデータに変換して記憶部150に記憶部150に記憶させる。データ利用者インターフェース120は、データ利用者サーバ50から取得した要求に応じたデータを記憶部150から読み出し、データ利用者サーバ50に送信する。これらの機能の詳細については後述する。
The
記憶部150は、例えば、キャッシュメモリ152と、不揮発性メモリ154とを備える。キャッシュメモリ152は、RAM(Random Access Memory)、レジスタ、フラッシュメモリなどで実現される。また、不揮発性メモリ154は、HDD(Hard Disk Drive)、フラッシュメモリなどで実現される。不揮発性メモリ154には、クライアントデータ154Aとスキーマ情報154Bとが格納される。スキーマ情報154Bは、参照情報の一例である。記憶部150は、データベースサーバ100がネットワークを介してアクセス可能なNAS(Network Attached Storage)であってもよい。
The
[フロントエンドインターフェース]
以下、フロントエンドインターフェース110の機能について説明する。フロントエンドインターフェース110の解釈部112は、フロントエンドサーバ20ごとに定義が異なるデータを、一つの共通する形式に変換する。図7は、解釈部112の機能について説明するための図である。ここでは、aaaaaというユーザ名(name)を有するユーザの年齢(age)が24才であるというデータを示している。以下、このnameやageなどの情報をインデックスと称する。これに対し、図7の下図は、データベースサーバ100が扱うことのできる抽象化されたデータを模式的に示している。解釈部112は、図7に例示したように、フロントエンドサーバ20から取得されたデータ格納要求を解釈し、抽象化する処理を行って、データを変換部114に渡す。
[Front-end interface]
Hereinafter, functions of the
フロントエンドインターフェース110により抽象化されたデータは、特に処理を加えなければ、行指向型のデータ構造を有するものとなるのが通常である。変換部114は、抽象化したデータを更に、列指向型のデータ構造に変換し、クライアントデータ154Aとして記憶部150の不揮発性メモリ154に記憶させる。
The data abstracted by the front-
図8は、変換部114の機能について説明するための図(その1)である。ここでは、レコード1〜レコード3の3つのレコードがフロントエンドサーバ20から取得され、解釈部112によって抽象化されたものとする。レコード1は、データ項目としてid(識別情報)、name(ユーザ名)、sex(性別)を含んでいる。図では、レコード1のidという意味でid(1)などと表記している。他のデータ項目に関しても同様である。また、レコード2は、データ項目としてid、name、age(年齢)を含んでおり、レコード3は、データ項目としてid、nameを含んでいる。これらの抽象化されたレコードは、キャッシュメモリ152に格納される。
FIG. 8 is a diagram (No. 1) for explaining the function of the
キャッシュメモリ152に一定量のデータが格納されると、変換部114は、これらを予め配列が確保されていない列指向型のデータ構造で管理しながら不揮発性メモリ154に記憶させる。図8の例では、[id(1)、id(2)、id(3)]、[name(1)、name(2)、name(3)]、[sex(1)]、および[age(2)]のそれぞれが、ひとまとまりの論理構造を有するように管理される。
When a certain amount of data is stored in the
ここで、変換部114は、後に行方向への検索が可能となるように、スキーマ情報154Bを不揮発性メモリ154に格納しておく(一時的にキャッシュメモリ152に格納してもよい)。図9は、スキーマ情報154Bの一例を示す図(その1)である。図示するように、スキーマ情報154Bは、ログを木構造で表現した情報である。この情報に基づいて、例えばレコード2の情報を読み出す要求がフロントエンドサーバ20から取得された場合、木の探索としてアクセスすることができる。なお、スキーマ情報154Bの形式は図9に示すものに限らず、任意の形式を採用してよい。
Here, the
更に別のレコードを記憶する要求が取得された場合、変換部114は、以下の手法でデータを管理する。変換部114は、(手法1)既に管理されているデータ構造に追加する形でデータを管理してもよいし、(手法2)キャッシュメモリ152から不揮発性メモリ154にデータを移すごとに管理するデータを区分してもよい。
When a request for storing another record is acquired, the
(手法1)
図10は、変換部114の機能について説明するための図(その2)である。ここでは、更に、レコード4〜レコード6の3つのレコードがフロントエンドサーバ20から取得され、解釈部112によって抽象化されたものとする。レコード4は、データ項目としてname、age、jobを含んでいる。また、レコード5は、データ項目としてid、name、sexを含んでおり、レコード6は、データ項目としてid、name、jobを含んでいる。これらの抽象化されたレコードは、キャッシュメモリ152に格納される。
(Method 1)
FIG. 10 is a diagram (No. 2) for describing the function of the
キャッシュメモリ152に一定量のデータが格納されると、変換部114は、これらを列指向型のデータ構造で管理しながら不揮発性メモリ154に記憶させる。ここで、レコード4〜6には、レコード1〜3には含まれていなかったjob(職業)というデータ項目が含まれている。この場合、変換部114は、新たな列を設定し、データを管理する。図10の例では、[id(1)、id(2)、id(3)、id(5)、id(6)]、[name(1)、name(2)、name(3)、name(4)、name(5)、name(6)]、[sex(1)、sex(5)]、[age(2)、age(4)]、および[job(4)、job(6)]のそれぞれが、ひとまとまりの論理構造を有するように管理される。この場合、スキーマ情報154Bは、図11に示すような内容となる。図11は、スキーマ情報154Bの一例を示す図(その2)である。
When a certain amount of data is stored in the
(手法2)
図12は、変換部114の機能について説明するための図(その3)である。ここでは、図12で例示したレコード1〜3に対する処理をセッション1、続いて取得されたレコード4〜6に対する処理をセッション2と称する。図12の例では、セッション1として、[id(1)、id(2)、id(3)]、[name(1)、name(2)、name(3)]、[sex(1)]、および[age(2)]のそれぞれが、ひとまとまりの論理構造を有するように管理されると共に、セッション2として、[id(5)、id(6)]、[name(4)、name(5)、name(6)]、[sex(5)]、[age(4)]、および[job(4)、job(6)]のそれぞれが、ひとまとまりの論理構造を有するように管理される。この場合、スキーマ情報154Bは、図13に示すような内容となる。図13は、スキーマ情報154Bの一例を示す図(その3)である。
(Method 2)
FIG. 12 is a diagram (No. 3) for explaining the function of the
このようにデータを管理することで、例えば、「全ユーザのjobを取得したい」といった要求がデータ利用者サーバ50から取得された場合、データベースサーバ100は、他のデータ項目(id、name、age、sex、…)を参照せずに、データ項目「job」のデータを読み出すことができる。この結果、読み出しに要する時間を短縮し、データ利用のニーズに迅速に対応することができる。なお、不揮発性メモリ154がHDDである場合、シーク時間が短くなるように、ひとまとまりの論理構造を、例えば同じトラック内に保持するようにすると好適であるが、これに限定されるものではない。
By managing the data in this way, for example, when a request such as “I want to acquire jobs for all users” is acquired from the
図14は、変換部114により実行される処理の流れの一例を示すフローチャートである。まず、変換部114は、不揮発性メモリ154への書き込みタイミングが到来するまで待機する(S100)。不揮発性メモリ154への書き込みタイミングとは、前述したようにキャッシュメモリ152に一定量のデータが格納されたタイミング、データベースサーバ100がシャットダウンされるタイミング、直近までの集計処理が依頼されたタイミングなど、任意に定義することができる。
FIG. 14 is a flowchart illustrating an example of the flow of processing executed by the
不揮発性メモリ154への書き込みタイミングが到来すると、変換部114は、キャッシュメモリ152に格納されたレコードを一つ選択し(S102)、そのレコードに含まれるデータ項目を一つ選択する(S104)。そして、変換部114は、選択したデータ項目が、既に管理済のデータ項目であるか否かを判定する(S106)。
When the write timing to the
選択したデータ項目が、既に管理済のデータ項目である場合、変換部114は、そのデータ項目の末尾にデータを追加する(S108)。一方、選択したデータ項目が、既に管理済のデータ項目でない場合、変換部114は、列を新たに設定(定義)し、設定した列にデータを書き込む(S110)。また、変換部114は、書き込んだデータ項目に関する情報をスキーマ情報154Bに追加する(S112)。
When the selected data item is a data item that has already been managed, the
次に、変換部114は、選択されているレコードの全てのデータ項目を選択したか否かを判定する(S114)。選択されているレコードの全てのデータ項目を選択していない場合、S104に処理が戻される。選択されているレコードの全てのデータ項目を選択した場合、変換部114は、キャッシュメモリ152に格納されている全てのレコードを選択したか否かを判定する(S116)。キャッシュメモリ152に格納されている全てのレコードを選択していない場合、S102に処理が戻される。キャッシュメモリ152に格納されている全てのレコードを選択した場合、本フローチャートの1ルーチンの処理が終了する。
Next, the
[データ利用者インターフェース]
以下、データ利用者インターフェース120の機能について説明する。データ利用者インターフェース120は、例えば、データ利用者サーバ50からの要求に応じて、表形式のデータ(配列データ)を提供する。データ利用者サーバ50からの要求は、任意のデータ項目を指定して行われる。この際に、データ利用者インターフェース120は、指定されたデータ項目を含まないレコードに関しては、そのデータ項目に対応するデータを「null」(或いはブランクなど、「該当データ無し」を示す任意の形態であってよい)とした表形式のデータを生成してデータ利用者サーバ50に提供する。また、データ利用者インターフェース120は、指定されたデータ項目が既に管理されているデータ項目の中に無い場合、エラーを返すのではなく、そのデータ項目についてのデータを全て「null」(或いはブランクなど、「該当データ無し」を示す任意の形態であってよい)とした表形式のデータを生成してデータ利用者サーバ50に提供する。なお、データ利用者サーバ50からの要求は、例えば所定の拡張子を指定することで行われてよい。
[Data user interface]
Hereinafter, functions of the
例えば、図10に示すようなデータがクライアントデータ154Aとして不揮発性メモリ154に格納されている状態で、データ項目[sex、age、job、hobby(趣味)]を指定したデータの要求があったとする。この場合、データ利用者インターフェース120による出力データのイメージは、図15のようになる。図15は、データ利用者インターフェース120による出力データのイメージを示す図である。図示するように、データ利用者インターフェース120による出力データは、データの有無に拘わらず、レコードごと且つデータ項目ごとにデータを配列化して表したデータである。これによって、データベースサーバ100は、データ利用者サーバ50のニーズに応じた形式でデータを提供することができる。
For example, when data as shown in FIG. 10 is stored in the
図16は、データ利用者インターフェース120により実行される処理の流れの一例を示すフローチャートである。まず、データ利用者インターフェース120は、データの要求を取得するまで待機する(S200)。データの要求を取得すると、データ利用者インターフェース120は、スキーマ情報154Bから、現時点でのレコードの最大数を取得する(S202)。この最大数をnとする。次に、データ利用者インターフェース120は、データの要求に含まれるデータ項目数×nの配列を定義する(S204)。この配列が、出力データの枠組みとなる。
FIG. 16 is a flowchart showing an example of the flow of processing executed by the
次に、データ利用者インターフェース120は、データの要求からデータ項目を一つ選択し(S206)、選択したデータ項目が、既にクライアントデータ154Aに設定済であるか否かを判定する(S208)。データ利用者インターフェース120は、選択したデータ項目が、既にクライアントデータ154Aに設定済でない場合、当該データ項目のデータを全てnullにする(S210)。
Next, the
一方、選択したデータ項目が、既にクライアントデータ154Aに設定済である場合、データ利用者インターフェース120は、クライアントデータ154Aから、現在選択されているデータ項目のデータを一つ読み出す(S212)。次に、データ利用者インターフェース120は、S212において読み出し可能なデータが存在しなかったか否かを判定する(S214)。S212において読み出し可能なデータが存在した場合、データ利用者インターフェース120は、その読み出しに至るまでにレコード番号が飛ばされたか否かを判定する(S216)。レコード番号が飛ばされた場合、データ利用者インターフェース120は、飛ばされたレコード番号のデータをnullにする(S218)。そして、データ利用者インターフェース120は、クライアントデータ154Aから読み出したデータをS204で設定した配列に含める(S220)。
On the other hand, if the selected data item has already been set in the
S210の処理を行った後、或いは、S214において肯定的な判定を得た後、データ利用者インターフェース120は、繰り返しS206が行われる中で全てのデータ項目を選択したか否かを判定する(S222)。全てのデータ項目を選択していない場合、S206に処理が戻される。一方、全てのデータ項目を選択した場合、データを出力する(S224)。この段階で、配列における全てのデータに、クライアントデータ154Aから読み出されたデータ、或いはnullが格納されている筈である。
After performing the process of S210 or obtaining a positive determination in S214, the
データベースサーバ100が管理するクライアントデータ154Aは、一つのデータ項目の中に、更に階層的なデータを含んでもよい。例えば、hobbyのように、複数のデータが該当するようなデータ項目が存在する。この場合、図17に示すようなデータが変換部114に渡される場合がある。図17は、変換部114による他の機能について説明するための図である。図中、hobby(1−h)はレコード1におけるデータ項目hobbyのh番目のデータを示している。変換部114は、これらを同様に列指向型のデータ構造で管理すると共に、同一のレコードに含まれるデータであることをスキーマ情報154Bに残しておく。図18は、図17の例に対応したスキーマ情報154Bの一例を示す図である。
The
以上説明した本発明のデータ管理装置、データ管理方法、およびプログラムによれば、入力された書き込み要求を解釈して抽象表現に変換する解釈部112と、解釈部112により抽象表現に変換されたデータを、予め配列が確保されていない列指向型のデータ構造に変換して、記憶部150に記憶させる変換部114と、を備えることにより、非構造な入力データを、データ項目ごとに高速に読み出し可能な態様で保存すると共に、入力データの追加や削除を容易に行うことができる。
According to the data management device, data management method, and program of the present invention described above, the interpretation unit 112 that interprets an input write request and converts it into an abstract representation, and the data that is converted into an abstract representation by the interpretation unit 112 Is converted into a column-oriented data structure in which an array is not secured in advance and stored in the
以上、本発明を実施するための形態について実施形態を用いて説明したが、本発明はこうした実施形態に何等限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の変形及び置換を加えることができる。 As mentioned above, although the form for implementing this invention was demonstrated using embodiment, this invention is not limited to such embodiment at all, In the range which does not deviate from the summary of this invention, various deformation | transformation and substitution Can be added.
10 端末装置
20 フロントエンドサーバ
30 プロキシサーバ
50 データ利用者サーバ
100 データベースサーバ
110 フロントエンドインターフェース
112 解釈部
114 変換部
120 データ利用者インターフェース
150 記憶部
152 キャッシュメモリ
154 不揮発性メモリ
154A クライアントデータ
154B スキーマ情報
DESCRIPTION OF
Claims (7)
前記オブジェクトに変換されたデータを、前記変換されたデータとは別のデータ構造であって、予め配列が確保されていない列指向型のデータ構造で管理されるクライアントデータに変換して記憶部に記憶させると共に、前記オブジェクトに含まれる、前記列指向型のデータ構造で管理されるデータを行方向に読み出し可能にするための参照情報を前記記憶部に記憶させる変換部と、
を備えるデータ管理装置。 An object that interprets the input data storage request, abstracts the tree structure in multidimensional space from the data format including json, xml, avro, or message pack, and can expand the dimension to the array An interpreter to convert to
The data converted into the object is converted into client data managed in a column-oriented data structure having a data structure different from that of the converted data, and an array is not secured in advance, and stored in the storage unit. causes stored, and the included in the object, conversion unit for storing reference information for the data managed by the data structure of the column-oriented reading is enabled in the row direction in the memory unit,
A data management device comprising:
前記変換部は、前記データ格納要求に含まれるデータ項目が、前記列指向型のデータ構造に設定されていないデータ項目である場合、新たな列を追加する、
請求項1記載のデータ管理装置。 The column-oriented data structure is a data structure in which data included in a record included in the data storage request is grouped into a logical structure for each data item,
The conversion unit adds a new column when the data item included in the data storage request is a data item not set in the column-oriented data structure;
The data management apparatus according to claim 1.
請求項1または2記載のデータ管理装置。 A data user interface that reads and outputs data managed in the column-oriented data structure from the storage unit for each data item included in the input data request;
The data management apparatus according to claim 1 or 2.
請求項3記載のデータ管理装置。 The data user interface fills the data corresponding to the data item with any form of data indicating that the corresponding data does not exist for a record that does not include the specified data item.
The data management apparatus according to claim 3.
請求項3または4記載のデータ管理装置。 When the specified data item is a data item not set in the column-oriented data structure, the data user interface indicates that there is no corresponding data for all the data items. Fill in any form of data,
The data management apparatus according to claim 3 or 4.
入力されたデータ格納要求を解釈し、多次元空間での木構造を、json, xml, avro, 又はmessage packを含むデータフォーマットから切り離して抽象化し、配列に対して次元を拡張可能な形式のオブジェクトに変換し、
前記オブジェクトに変換されたデータを、前記変換されたデータとは別のデータ構造であって、予め配列が確保されていない列指向型のデータ構造で管理されるクライアントデータに変換して記憶部に記憶させると共に、前記オブジェクトに含まれる、前記列指向型のデータ構造で管理されるデータを行方向に読み出し可能にするための参照情報を前記記憶部に記憶させる、
データ管理方法。 Computer
An object that interprets the input data storage request, abstracts the tree structure in multidimensional space from the data format including json, xml, avro, or message pack, and can expand the dimension to the array Converted to
The data converted into the object is converted into client data managed in a column-oriented data structure having a data structure different from that of the converted data, and an array is not secured in advance, and stored in the storage unit. causes stored, the included in the object, and stores the reference information for the data managed by the data structure of the column-oriented reading is enabled in the row direction in the memory unit,
Data management method.
入力されたデータ格納要求を解釈し、多次元空間での木構造を、json, xml, avro, 又はmessage packを含むデータフォーマットから切り離して抽象化し、配列に対して次元を拡張可能な形式のオブジェクトに変換させ、
前記オブジェクトに変換されたデータを、前記変換されたデータとは別のデータ構造であって、予め配列が確保されていない列指向型のデータ構造で管理されるクライアントデータに変換して記憶部に記憶させると共に、前記オブジェクトに含まれる、前記列指向型のデータ構造で管理されるデータを行方向に読み出し可能にするための参照情報を前記記憶部に記憶させる処理を行わせる、
プログラム。 On the computer,
An object that interprets the input data storage request, abstracts the tree structure in multidimensional space from the data format including json, xml, avro, or message pack, and can expand the dimension to the array Converted to
The data converted into the object is converted into client data managed in a column-oriented data structure having a data structure different from that of the converted data, and an array is not secured in advance, and stored in the storage unit. Storing the reference information for allowing the data managed in the column-oriented data structure included in the object to be read in a row direction, and storing the reference information in the storage unit.
program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017050997A JP6480495B2 (en) | 2017-03-16 | 2017-03-16 | Data management apparatus, data management method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017050997A JP6480495B2 (en) | 2017-03-16 | 2017-03-16 | Data management apparatus, data management method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018156233A JP2018156233A (en) | 2018-10-04 |
JP6480495B2 true JP6480495B2 (en) | 2019-03-13 |
Family
ID=63716612
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017050997A Active JP6480495B2 (en) | 2017-03-16 | 2017-03-16 | Data management apparatus, data management method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6480495B2 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005535947A (en) * | 2002-05-31 | 2005-11-24 | インターナショナル・ビジネス・マシーンズ・コーポレーション | System and method for accessing different types of back-end data stores |
US8108361B2 (en) * | 2008-07-31 | 2012-01-31 | Microsoft Corporation | Efficient column based data encoding for large-scale data storage |
WO2014144889A2 (en) * | 2013-03-15 | 2014-09-18 | Amazon Technologies, Inc. | Scalable analysis platform for semi-structured data |
JP2014191593A (en) * | 2013-03-27 | 2014-10-06 | Nec Corp | Column store type database management system |
JP6287441B2 (en) * | 2014-03-26 | 2018-03-07 | 日本電気株式会社 | Database device |
-
2017
- 2017-03-16 JP JP2017050997A patent/JP6480495B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018156233A (en) | 2018-10-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6550448B2 (en) | DATA MANAGEMENT DEVICE, DATA MANAGEMENT METHOD, AND PROGRAM | |
US11475034B2 (en) | Schemaless to relational representation conversion | |
EP3602351B1 (en) | Apparatus and method for distributed query processing utilizing dynamically generated in-memory term maps | |
US11256852B2 (en) | Converting portions of documents between structured and unstructured data formats to improve computing efficiency and schema flexibility | |
US9218350B2 (en) | Searching and placeholders | |
JP7018516B2 (en) | Data query | |
US11030242B1 (en) | Indexing and querying semi-structured documents using a key-value store | |
KR20200103543A (en) | Knowledge-driven federated big data query and analytics platform | |
KR20200103542A (en) | Knowledge-driven federated big data query and analytics platform | |
Banane et al. | Storing RDF data into big data NoSQL databases | |
US11468031B1 (en) | Methods and apparatus for efficiently scaling real-time indexing | |
WO2017036348A1 (en) | Method and device for compressing and decompressing extensible markup language document | |
WO2023160137A1 (en) | Graph data storage method and system, and computer device | |
KR20200103544A (en) | Knowledge-driven federated big data query and analytics platform | |
James et al. | Hybrid database system for big data storage and management | |
US20110107198A1 (en) | Information processing apparatus, storage medium, and information processing method | |
WO2013097115A1 (en) | File directory storage method, retrieval method and device | |
Mittal et al. | Efficient random data accessing in MapReduce | |
JP6480495B2 (en) | Data management apparatus, data management method, and program | |
US10762139B1 (en) | Method and system for managing a document search index | |
Kanojia et al. | IT Infrastructure for Smart City: Issues and Challenges in Migration from Relational to NoSQL Databases | |
Klein et al. | Investigating bloom filters for web archives' holdings | |
US20130246479A1 (en) | Computer-readable recording medium, data model conversion method, and data model conversion apparatus | |
Makki et al. | Measuring the Performance of Data Placement Structures for MapReduce-based Data Warehousing Systems | |
JP5903372B2 (en) | Keyword relevance score calculation device, keyword relevance score calculation method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20170815 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20181003 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20181128 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190207 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6480495 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |