JP4081236B2 - Database processing method - Google Patents
Database processing method Download PDFInfo
- Publication number
- JP4081236B2 JP4081236B2 JP2000396198A JP2000396198A JP4081236B2 JP 4081236 B2 JP4081236 B2 JP 4081236B2 JP 2000396198 A JP2000396198 A JP 2000396198A JP 2000396198 A JP2000396198 A JP 2000396198A JP 4081236 B2 JP4081236 B2 JP 4081236B2
- Authority
- JP
- Japan
- Prior art keywords
- compression
- item
- computer
- data
- key value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000003672 processing method Methods 0.000 title claims description 14
- 230000006835 compression Effects 0.000 claims description 86
- 238000007906 compression Methods 0.000 claims description 86
- 230000006837 decompression Effects 0.000 claims description 34
- 238000000034 method Methods 0.000 description 25
- 238000010586 diagram Methods 0.000 description 5
- 230000002776 aggregation Effects 0.000 description 3
- 238000004220 aggregation Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000011156 evaluation Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 239000004615 ingredient Substances 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【0001】
【産業上の利用分野】
本発明は、データベースの高速処理、とくに検索エンジンや膨大なキー項目を備えるクロス集計データ管理システムに適用可能なデータ処理技術に関する。
【0002】
【技術の背景】
汎用コンピュータを用いたデータベース作成とその運営は、近年とくにデータ件数の増大から、従来公知の基本的な処理方式では対応が難しくなっており、より高速な演算処理を可能とする技術が望まれている。
【0003】
膨大なデータを取り扱う際の技術的な困難性は、例えば、▲1▼取り扱うデータの種類によって処理すべきアルゴリズムが異なること、▲2▼多次元処理をするか否かによって処理方式の基本原理を異にすること、▲3▼使用すべきアルゴリズム(原理)はコンピュータの性能に依存すること、等の点にある。
【0004】
▲1▼に関して云えば、取り扱うデータが文字列を主とするか、数字を主とするかによって処理技術を異にする。例えば人事データのように、部署名、氏名、性別、趣味、家族構成、社内評価内容の詳細など、主として文字(ひらがな、漢字、カタカナ)をもってレコード・データを作成し必要に応じて加工する場合と、チェーン店の各店舗における品名ごとの売り上げ台数、売上金額といった数字データを扱うケースでは、コンピュータ内部における処理アルゴリズムを異にすることは当然である。これはデータベースの基本であり、例えば階層型、関係型、網型などのデータの基本レコードの格納方法からしても構築方法を異にする。
【0005】
▲2▼の点は、膨大なデータファイルのレコードを、どのように取り扱うかの問題である。例えば、データ作成時に数値の加減乗除といった演算処理を行い、単純なレコード・ファイルとしてメモリに格納した後は、随時当該レコード・ファイルを呼び出して確認する等の処理をするだけで良いならば、その場合の課題はデータ作成時の処理の高速化に絞られる。一方、どのような加工をするかを前提とせず、とりあえず事実(ファクト;主として数字)データだけをレコードし、この事実ファイルに基づいて後日の多様な加工(射影/選択/結合等)を施すのであれば、データの処理のための原理は自ずから異なり、より高速なキー項目の検索と数値集計を実現し、任意の項目次元において自由な集計結果を高速で取得する点に絞られる。その場合には、基本となるレコード・ファイルの作成はより単純であることが望まれる。
【0006】
▲3▼の点は、従来提案された特許技術および今後期待されるデータベース処理との相関に於いて重要である。データ種別がどのような種類であれ、データの加工処理速度は高速の並列型CPUを多数搭載したり巨大なメモリを搭載した大型コンピュータを使用すれば、ほぼ問題なく解決できる。しかしながら、いわゆるスーパーコンピュータはきわめて高額であり、一般の実用レベルではそれを常時使用する環境は期待できない。むしろ現在の汎用コンピュータを利用し、膨大なレコード・ファイル(オリジナルデータ)を応答性の高いレベルで加工し、任意の要求に応答する自在な多次元加工結果を得ることが望まれる。
【0007】
【従来の技術】
本発明は、例えば100万件を越える膨大なオリジナルのデータファイルを自在に加工して任意の次元におけるクロス集計結果を短時間で得ることを目的とする。この場合、処理すべきデータファイルは、文字を主とするキー項目(本明細書においてキー値;店舗名等である)と、数字を主とするキー項目(本明細書において項目;数字を主とするファクト)を扱うことになる。
【0008】
つまり店舗名や商品名といった文字列から構成されるキー項目と、売上台数、金額といった数字から構成されるキー項目を、自由な形式で記録ファイルとして蓄積し、蓄積した膨大なファイルを自由な次元で加工して集計結果を即時に得ることが目的である。
【0009】
このような技術傾向をもったデータベースの処理方式は、もちろん、従来においてもいくつかの提案がある。第一に、クロス集計処理に目的を絞った処理方式としては、重みコードを使用して処理の高速化を図る技術がある(特開平8−77266号)。これは、あるテーブルのデータの意味を包含する他のテーブルに相対的に低いレベルの重みコードを付与しておき、検索条件が与えられたときに重みコードを利用して必要なファクトを抽出する。具体的には、集団の中で、誰が、いつ、なにを食べ、その材料は何であったか、その値段はいくらであったか、といったデータを集計するときに、人名、日付、メニュー、その金額、材料、その金額、といった具合に、データの意味を階層化し、それらを事実データとして格納しておき、必要に応じて適当な階層領域のデータを重みコードを用いて抽出するものである。
【0010】
しかし、この技術はデータの意味に上下の関連づけを行うため、システム設計者の主観に起因する勝手な上下関係が発生したり、もともと関連づけの出来ない項目についての処理が出来なくなる等、汎用システムとして利用しにくい面が残る。
【0011】
第二に、クロス集計処理を直接の目的とするものではないが、膨大な文字データの中からキーワードを高速検索する技術は、多数存在する。例えば、
▲1▼特開平11−031096号
インデックスを作成することなくデータを検索する技術
▲2▼特開平11−003354号
項目の従属関係を作り、従属関係から検索を行う技術
▲3▼特開平10−143538号
インデックス・キー値をデータの識別子に関連づける方式
▲4▼特開平10−003414号
利用頻度の高いキー値を予め定義し格納しておく方式
▲5▼特開平9−167111号
重複するインデックスのキー値をクラスタリング処理する技術
等である。しかしながら、これらの技術は、例えばインターネット上に存在する膨大な文字データから検索キーを用いて、効率の良い結果を得るには適しているが、階層化されたデータファイルのすべてを検索するといった深度検索の能力はないし、オペレータの主観操作によるデータ保存がなされている場合は、非常に使い勝手の悪いシステムとなりやすい。
【0012】
これらのデータ処理技術をふまえて、オリジナルデータを自在に加工しうる従来の公知技術を検討すると、特開平5−257774号を挙げることが出来る。これは、検索キー値と圧縮されたIRN(インデックス・レコード番号)をメモリ上に保有し、検索条件(キー項目の指定)に基づいて、検索キー値からIRNを抽出し、圧縮されたIRNを復元するものである。
【0013】
【発明が解決しようとする課題】
問題は、項目の検索やクロス集計処理を行う場合の処理時間である。
たしかに特開平5−257774号の技術によれば、数千件〜1万件程度の比較的少ない件数のオリジナルデータを扱う場合には、圧縮したIRNを用いて任意の項目を比較的高速で検索し、項目に対応する数字の加減乗除演算も比較的高速で処理できる。しかしながら、オリジナルデータが膨大な数になったとき、例えば各チェーン店からリアルタイムで刻々と報告される多数の商品の売り上げデータを長期に渡って継続管理するようなケースを考える場合、単にIRNを圧縮するだけでは、処理能力には限界が生ずる。IRNの圧縮は、主としてファクト(数字)の圧縮であり、新商品の名称など、膨大に広がる可能性のある文字データ(項目)の部分については圧縮処理を施さないからである。
【0014】
もちろん文字データの圧縮は容易であるし、特開平5−257774号の発明においても文字データを圧縮することも可能である。しかし、その場合の問題は、圧縮した文字データを高速で検索し且つ復元する手段が存在しない点にある。従って、この特開平5−257774号の発明では、数千件単位の少ないレコードを管理できるにとどまり、例えば100万件を越えるような膨大な数のオリジナルデータを自由な視点で高速処理するパワーをもたない。
【0015】
そこで本発明の目的は、第一に、多数のキー値と項目からなる膨大なオリジナルデータを効率よく格納する点、第二に、格納したデータに基づいて高速でオリジナルデータを復元可能とする点にある。
【0016】
【課題を解決するための手段】
前記目的を達成するため、本発明に係るデータベースの処理方法は、第一に、オリジナルデータに基づき、項目毎にキー値を圧縮して圧縮復元インデックスを作成し保存する段階と、圧縮復元インデックスに基づき、項目毎に圧縮キーを書き込んだ圧縮結果セットキャッシュを作成し保存する段階とを備える。
第二に、検索条件が与えられたときに、前記圧縮結果セットキャッシュに基づいて圧縮キーを検索(探索)する段階と、検索した圧縮キーに基づいて前記圧縮復元インデックスからオリジナルのキー値を読み出す段階とを備える。尚、圧縮結果セットキャッシュに基づいて圧縮キーを検索する段階において、圧縮キーの階層構造を作成すれば多次元のクロス集計をきわめて高速で処理することが出来る。
【0017】
【作用】
本発明は、刻々追加/更新されるような膨大なオリジナルデータを、効率よく格納し、随時高速検索(または集計)可能とするため以下の処理を行う。
【0018】
▲1▼ オリジナルデータに基づき、キー値を項目毎に圧縮して圧縮復元インデックスを作成し保存する段階。これは実際の多次元集計時に絶対に必要となるオリジナルのキー値を、検索可能な状態で加工圧縮し、高速検索と復元が可能な状態で保存しておくための処理である。この圧縮復元インデックスは、検索用の階層構造としては例えばP木階層構造、B木階層構造、T木階層構造、ハッシュ階層構造など、従来公知のいずれの階層手段でも構わない。次段処理および検索の高速のという点で云えばP木構造が好ましい。
【0019】
▲2▼ 圧縮復元インデックスに基づき、項目毎に圧縮キーを書き込んだ圧縮結果セットキャッシュを作成し保存する段階。これは、▲1▼の圧縮復元インデックスで得られた圧縮キー値を項目毎に書き込んでおき、爾後における演算の自由性と検索の高速を実現するための処理段階である。多数の項目(店舗名、商品名、日付、金額等)を、▲1▼の処理段で得た圧縮キー(ノードID)を用いて保存しておくことにより、データ容量を著しく減らし、保存効率を最適化する。また、これらの処理によって、検索効率も飛躍的に向上する。
【0020】
▲3▼ 検索条件が与えられたときには、前記▲1▼および▲2▼の処理に加えて、以下の処理を行う。すなわち、▲2▼の圧縮結果セットキャッシュに基づいて圧縮キーを検索する段階。圧縮キーの検索は高速に行うことが出来るため、単一のまたは複数の項目の検索は非常に容易であり、簡単な構成で検索エンジンを生み出すことが出来る。また、この処理段において、検索するべき圧縮キーを階層構造をもって処理したときには(請求項2)、後段処理と相俟って任意次元の集計を高速で行うことが可能となる。圧縮結果セットキャッシュのデータは圧縮キー(ノードID)なので、検索用階層手段を作成する所要時間は現在の汎用コンピュータにおいてもせいぜい1秒以下である。尚、▲1▼の圧縮復元インデックスや▲2▼の圧縮結果セットキャッシュからダイレクトにオリジナルデータを復元させることも原理的には可能であるが、圧縮データとオリジナルデータとの間の呼び出し回数が増加するなど、高速処理は困難となる。
【0021】
▲4▼ 探索した圧縮キーに基づいて、圧縮復元インデックスからオリジナルのキー値を読み出す段階。▲1▼の圧縮復元インデックスに含まれるオリジナルのキー値は、▲3▼の圧縮キーの検索によって随時復元可能なデータとして処理できる。圧縮復元インデックスは項目毎に作成されているので、項目が指定されればオリジナルのキー値は直ちに復元さるからである。
【0022】
以上のように本発明は、各項目毎にの圧縮キーを格納した圧縮結果セットキャッシュを必須の条件として、その前段にキー値を項目毎に圧縮した圧縮復元インデックスを備えてなる。検索時には、圧縮キーを検索した上で、圧縮復元インデックスからオリジナルのキー値を復元する。このような処理方法は、従来の多次元クロス集計等の処理方法に較べると処理段が増加するが、大量データを効率よく保存し、実行時における演算処理速度を確実に高速化できる。二段階の圧縮処理と、各段における生成ファイルの関係が汎用コンピュータの処理能力範囲内において実現でき、検索時に扱うデータ量が飛躍的に減少するからである。
【0023】
【発明の実施の形態】
図1は、本発明に係るデータベースの高速処理方法の全体の原理を示すものである。
【0024】
1は、多数の項目を含んだオリジナルデータ、10は、オリジナルデータに基づいて作成する圧縮復元インデックス、20は、圧縮復元インデックス10に基づいて作成した圧縮結果セットキャッシュ、30は、検索条件Cが与えられたときに、圧縮結果セットキャッシュ20に基づいて作成される検索用階層構造である。
【0025】
図2は、オリジナルデータ1と、圧縮復元インデックス10との関係を例示するものである。この実施形態では、オリジナルデータ1は、店舗、日付、商品、数量、金額という5つの項目(カラム)をもっており、それぞれの項目は、それぞれユニークな値(キー値;カラム値)をもつ。また、この実施形態では例えば店舗を項目1、日付を項目2、商品を項目3・・として項目を区別してある。そして項目1の店舗Aを例にとると、このキー値は文字「A」である。さらに具体的に云えば店舗名が「霞が関商店」の場合、この項目のキー値は文字「霞が関商店」である。同様に、店舗「A」の日付(項目2)のキー値は数字列「00,04,01」、商品(項目3)のキー値は文字「1」である。この例では商品1としてあるが実際には具体的な商標名を構成する文字/数字等がキー値となる。尚、オリジナルデータ1は、例えば各種の記録媒体やオンライン転送データの形式で受けとる。必要に応じてデータ形式を整えるための通常の前処理を施す。
【0026】
オリジナルデータ1に基づいて作成する圧縮復元インデックス10は、項目毎に作成する。つまり項目1であれば店舗、項目2であれば日付について、オリジナルのキー値を圧縮し保存する。ここで作成する圧縮復元インデックス10は、少なくとも、オリジナルのキー値と圧縮キーを備え、復元時の高速性を確保するために適宜の階層構造をもっていることが望まれる。例えばP木構造、B木構造、T木構造、ハッシュ構造等である。これらの作成原理は公知であが、高速性の点ではP木構造が望ましい。作成した圧縮復元インデックスは、サーバ装置の適宜の格納場所(メモリ)にデータ保存しておく。書き換え可能としておくことが望ましい。
【0027】
ところで、検索用の各種のツリー構造は従来公知であるが、任意データ長のオリジナルキーを検索用階層構造に配置するための手段は従来知られていない。しかし例えば、オリジナルのキー値をビット添字評価手法に基づいて各ノードに圧縮格納すると同時に、ビット添字の評価順序をビットストリームのLSBからMSBに向かって昇順で処理することにより無限ビット長の処理が可能になる。勿論、扱う各項目のビット長が十分短い場合には、このような処理を行う必要はない。
【0028】
図3は、圧縮復元インデックス10と、圧縮結果セットキャッシュ20との関係を例示する図である。圧縮結果セットキャッシュ20は、圧縮復元インデックス10の作成段階で取得できる圧縮キー値を、項目毎に格納する手段である。図示した圧縮結果セットキャッシュ20の項目1のファイルには、項目1の圧縮キー値が書き込まれている。例えば圧縮キー値「0」が「店舗A」に該当し、圧縮キー値「1」が「店舗B」に該当する。この項目1のファイルデータは、項目1だけを格納しているものであるが、他のファイルには項目2、項目3・・・が同様の手法で書き込まれている。この圧縮結果セットキャッシュ20は、サーバ装置等の適宜の格納フィールドに永久保存しておく。尚、書き換え可能とすることが望ましい。
【0029】
図4は、ある検索条件が与えられた場合に、圧縮結果セットキャッシュ20に基づいて作成する検索用階層構造30を例示するものである。この検索用階層構造30は、実行時演算方式を採用する本発明において必須の処理段階である。
【0030】
検索用階層構造30は、圧縮結果セットキャッシュ20を構成する各項目の圧縮キーに基づいて、任意の次元で検索用階層構造を作成する。ここで用いる圧縮キーは、オリジナルのキー値を前段処理において格段に圧縮させたものであるから、階層構造(30)の作成は通常瞬時(1秒以下)で行うことが出来る。
【0031】
検索用階層構造30も、圧縮復元インデックス10と同様に、検索の信頼性と高速性の条件を満たす限り構造の原理を問わない。例えばP木構造、B木構造、T木構造、ハッシュ構造等が利用できる。但し、作成処理と検索効率を考慮すると現在のところはP木構造が優れる。
【0032】
また検索用階層構造30は、当該項目(例えば店舗)の圧縮キーに基づいて、指定条件に含まれる他項目(例えば日付と商品)の圧縮キーを同時に呼び出す機能を備えることが望ましい。勿論、検索用階層構造30の本質的機能は、作成された階層構造(30)から圧縮復元インデックス10にアクセスし、オリジナルのキー値を復元させることであるから、他の項目は時分割処理等によって別途に行うことも可能であり、同時処理を絶対の条件とするものではない。
【0033】
しかし、検索用階層構造30の作成時に取り扱うデータ量は極めて少ないので、指定条件に含まれる他の次元項目を同時に呼び出して階層構造内に配置し(総合圧縮項目値)、圧縮復元インデックス10から必要なオリジナルのキー値を得ることは極めて容易である。
【0034】
従って、かかる多次元データベースの高速処理方法によれば、刻々増加する多数の項目とキー値を、圧縮結果セットキャッシュ20の作成段階を経て集積し、随時、任意の次元で高速に集計できる。本発明の特徴は、オリジナルデータから圧縮復元インデックス10を作成し、これに基づいて項目毎の圧縮結果セットキャッシュを作成する点、および、検索条件が与えられた時には圧縮結果セットキャッシュを用いて適宜の検索用階層を作成し、これを介してオリジナルのキー値を備える圧縮復元インデックス10にアクセスして、高速でオリジナルのキー値を再現する点にある。
【0035】
これらの処理の流れは、すべて本発明の要旨を構成するが、圧縮キー値を項目毎にファイルする圧縮結果セットキャッシュ20の処理を除けば、他の処理段階における具体的手法は特に限定されない。例えば圧縮復元インデックス10は、オリジナルのユニークなキー値を適宜の形式でデータ圧縮できれば良く、検索用階層構造30も、圧縮結果セットキャッシュ20に含まれる圧縮キー値の性質に応じて適宜の検索構造をとることが出来る。
【0036】
尚、本発明において圧縮加工の処理を施すべきオリジナルデータ1のフォーム(データ形式)が統一されていない場合には、圧縮復元インデックス10の作成に先立って、データ形式を本発明に係る処理システムにおいて取り扱い可能な形式に変換処理しておくことが望ましい。
【0037】
【発明の効果】
以上説明したように本発明によれば、膨大な件数のレコードファイルを効率よく保存し、高速検索および任意次元でのクロス集計を高速で実現できる。
【図面の簡単な説明】
【図1】 本発明に係る処理方法の全体の原理を示す図である。
【図2】本発明に係る圧縮復元インデックスの作成を例示する図である。
【図3】本発明に係る圧縮結果セットキャッシュの作成を例示する図である。
【図4】本発明に係る検索用階層構造の作成を例示する図である。
【符号の説明】
1 オリジナルデータ
10 圧縮復元インデックス
20 圧縮結果セットキャッシュ
30 検索用階層構造[0001]
[Industrial application fields]
The present invention relates to high-speed database processing, and more particularly to a data processing technique applicable to a search engine and a cross tabulation data management system having a large number of key items.
[0002]
[Technical background]
The creation and management of databases using general-purpose computers has become difficult to handle with the conventionally known basic processing methods due to the increase in the number of data in recent years, and a technology that enables higher-speed arithmetic processing is desired. Yes.
[0003]
The technical difficulties in handling huge amounts of data are, for example, (1) the algorithm to be processed differs depending on the type of data to be handled, and (2) the basic principle of the processing method depending on whether or not to perform multidimensional processing. The difference is that (3) the algorithm (principle) to be used depends on the performance of the computer.
[0004]
Regarding (1), the processing technique differs depending on whether the data handled is mainly a character string or a number. For example, record data is created mainly with characters (Hiragana, Kanji, Katakana) such as department data, department name, name, gender, hobby, family structure, details of internal evaluation contents, etc. In the case of handling numerical data such as the number of units sold for each product name and the sales amount at each chain store, it is natural that the processing algorithm inside the computer is different. This is the basis of a database. For example, the construction method differs depending on the storage method of the basic record of data such as hierarchical type, relational type, and network type.
[0005]
The point {circle around (2)} is how to handle a huge data file record. For example, after performing arithmetic processing such as addition, subtraction, multiplication and division at the time of data creation and storing it in a memory as a simple record file, if you only need to perform processing such as calling and checking the record file at any time, The problem in this case is limited to speeding up the processing at the time of data creation. On the other hand, since it is not premised on what kind of processing is performed, only fact (facts; mainly numbers) data is recorded for the time being, and various processing (projection / selection / combination, etc.) is performed at a later date based on this fact file. If there is, the principle for data processing is naturally different, and it can be narrowed down to achieve faster key item retrieval and numerical aggregation, and to obtain free aggregation results at any item dimension at high speed. In that case, the creation of the basic record file is desired to be simpler.
[0006]
The point (3) is important in the correlation with the conventionally proposed patent technology and the database processing expected in the future. Regardless of the type of data, the data processing speed can be solved almost without any problem by using a large computer equipped with a large number of high-speed parallel CPUs or a huge memory. However, so-called supercomputers are extremely expensive, and an environment where they are always used cannot be expected at a general practical level. Rather, it is desired to use a current general-purpose computer to process a huge amount of record files (original data) at a highly responsive level and obtain a free multidimensional processing result that responds to any request.
[0007]
[Prior art]
An object of the present invention is to obtain a cross tabulation result in an arbitrary dimension in a short time by freely processing, for example, an enormous amount of original data files exceeding 1 million cases. In this case, the data file to be processed includes key items mainly including characters (in this specification, key values; store names, etc.) and key items mainly including numbers (in this specification, items; Will be handled.
[0008]
In other words, key items composed of character strings such as store names and product names, and key items composed of numbers such as the number of units sold and the amount of money are stored as recording files in a free format. The purpose is to obtain the total results immediately after processing.
[0009]
There are, of course, several proposals for database processing methods with such technical trends. First, as a processing method focused on the cross tabulation process, there is a technique for speeding up the process using a weight code (Japanese Patent Laid-Open No. 8-77266). This is because a weight code of a relatively low level is assigned to another table including the meaning of data of a certain table, and a necessary fact is extracted using the weight code when a search condition is given. . Specifically, when collecting data such as who, what, what was eaten, what the ingredients were, and how much the price was in the group, the name, date, menu, amount, material The meaning of the data is hierarchized and stored as fact data, and data in an appropriate hierarchical area is extracted using a weight code as necessary.
[0010]
However, since this technology associates the meaning of data up and down, as a general-purpose system, such as a self-reliable vertical relationship caused by the system designer's subjectivity, or the processing of items that cannot be associated originally becomes impossible It remains difficult to use.
[0011]
Secondly, although there is no direct purpose of cross tabulation processing, there are many techniques for high-speed keyword search from a large amount of character data. For example,
(1) Japanese Patent Laid-Open No. 11-031096 A technique for retrieving data without creating an index (2) A technique for creating a subordinate relationship of items of Japanese Patent Laid-Open No. 11-003354 and performing a search from the subordinate relationship (3) Japanese Patent Laid-Open No. 10- No. 143538 Index key value associating with data identifier (4) Japanese Patent Laid-Open No. 10-003414 A method for predefining and storing key values that are frequently used (5) Japanese Patent Laid-Open No. 9-167111 A technique for clustering key values. However, these techniques are suitable for obtaining an efficient result using a search key from a large amount of character data existing on the Internet, for example, but the depth of searching all hierarchical data files. There is no search capability, and if data is stored by the subjective operation of the operator, the system tends to be very inconvenient.
[0012]
Considering these data processing techniques, a conventional publicly known technique capable of freely processing original data can be cited as disclosed in JP-A-5-257774. This holds the search key value and the compressed IRN (index record number) in the memory, extracts the IRN from the search key value based on the search condition (key item specification), and uses the compressed IRN It is something to restore.
[0013]
[Problems to be solved by the invention]
The problem is the processing time when searching for items and performing cross tabulation processing.
Certainly, according to the technique disclosed in Japanese Patent Laid-Open No. 5-257774, when handling a relatively small number of original data of about several thousand to 10,000, any item can be searched at a relatively high speed using a compressed IRN. In addition, addition / subtraction / multiplication / division calculation of numbers corresponding to items can be processed at a relatively high speed. However, when there is a huge amount of original data, for example, when considering the case of continuously managing sales data for a large number of products reported in real time from each chain store over a long period of time, simply compress the IRN. Simply doing this will limit your processing power. This is because compression of IRN is mainly compression of facts (numbers), and compression processing is not performed on portions of character data (items) that may spread enormously, such as names of new products.
[0014]
Of course, the compression of the character data is easy, and the character data can also be compressed in the invention of JP-A-5-257774. However, the problem in that case is that there is no means for searching and restoring compressed character data at high speed. Therefore, in the invention of Japanese Patent Laid-Open No. 5-257774, only a few thousand records can be managed. For example, the power to process a huge number of original data exceeding 1 million at high speed from a free viewpoint. There is no waste.
[0015]
Therefore, the object of the present invention is to firstly store an enormous amount of original data consisting of a large number of key values and items efficiently, and secondly to be able to restore the original data at high speed based on the stored data. It is in.
[0016]
[Means for Solving the Problems]
In order to achieve the above object, a database processing method according to the present invention includes firstly a step of compressing a key value for each item based on original data, creating a compressed decompression index, and storing the compressed decompression index. And generating and storing a compression result set cache in which a compression key is written for each item.
Second, when a search condition is given, a step of searching (searching) a compression key based on the compression result set cache, and reading an original key value from the compression / decompression index based on the searched compression key. Stages. Note that, when a compression key is searched based on the compression result set cache, a multi-dimensional cross tabulation can be processed at a very high speed by creating a hierarchical structure of the compression keys.
[0017]
[Action]
The present invention performs the following processing in order to efficiently store a large amount of original data that is constantly added / updated and enable high-speed search (or aggregation) as needed.
[0018]
(1) A step of creating and storing a compression / decompression index by compressing a key value for each item based on original data. This is a process for processing and compressing original key values that are absolutely necessary at the time of actual multidimensional tabulation in a state where they can be searched and stored in a state where they can be quickly searched and restored. The compression / decompression index may be any conventionally known hierarchical means such as a P-tree hierarchical structure, a B-tree hierarchical structure, a T-tree hierarchical structure, or a hash hierarchical structure as a search hierarchical structure. A P-tree structure is preferable in terms of high-speed subsequent processing and retrieval.
[0019]
(2) A step of creating and storing a compression result set cache in which a compression key is written for each item based on a compression / decompression index. This is a processing stage for writing the compression key value obtained with the compression / decompression index of (1) for each item to realize the freedom of computation and the high speed of retrieval after the operation. By storing a large number of items (store name, product name, date, amount, etc.) using the compression key (node ID) obtained in the processing stage (1), the data capacity is significantly reduced and the storage efficiency is reduced. To optimize. In addition, the search efficiency is greatly improved by these processes.
[0020]
(3) When a search condition is given, the following processing is performed in addition to the processing of (1) and (2). That is, a step of retrieving a compression key based on the compression result set cache of (2). Since the search for the compression key can be performed at high speed, searching for a single item or a plurality of items is very easy, and a search engine can be created with a simple configuration. Further, in this processing stage, when the compressed key to be searched is processed with a hierarchical structure (claim 2), it becomes possible to perform summarization in an arbitrary dimension at a high speed in combination with the subsequent stage processing. Since the data of the compression result set cache is a compression key (node ID), the time required for creating the search hierarchy means is at most 1 second even in the current general-purpose computer. Although it is theoretically possible to restore the original data directly from the compression / decompression index (1) or the compression result set cache (2), the number of calls between the compressed data and the original data increases. For example, high-speed processing becomes difficult.
[0021]
(4) A step of reading the original key value from the compression / decompression index based on the searched compression key. The original key value included in the compression / decompression index (1) can be processed as data that can be restored at any time by searching the compression key (3). This is because the compression / decompression index is created for each item, and if the item is specified, the original key value is immediately restored.
[0022]
As described above, the present invention is provided with a compression / decompression index in which the key value is compressed for each item in the preceding stage, with the compression result set cache storing the compression key for each item as an essential condition. At the time of retrieval, the original key value is restored from the compression / decompression index after retrieving the compression key. Such a processing method increases the number of processing steps as compared with a conventional processing method such as multidimensional cross tabulation, but can efficiently store a large amount of data and reliably increase the processing speed at the time of execution. This is because the relationship between the two-stage compression processing and the generated file at each stage can be realized within the processing capability range of the general-purpose computer, and the amount of data handled at the time of search is dramatically reduced.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 shows the overall principle of a high-speed database processing method according to the present invention.
[0024]
1 is original data including many items, 10 is a compression / decompression index created based on the original data, 20 is a compression result set cache created based on the compression /
[0025]
FIG. 2 illustrates the relationship between the
[0026]
The compression /
[0027]
By the way, various tree structures for search are conventionally known, but means for arranging an original key having an arbitrary data length in a search hierarchical structure has not been known. However, for example, the original key value is compressed and stored in each node based on the bit index evaluation method, and at the same time, the process of infinite bit length is achieved by processing the bit index evaluation order in ascending order from the LSB to the MSB of the bit stream. It becomes possible. Of course, when the bit length of each item to be handled is sufficiently short, it is not necessary to perform such processing.
[0028]
FIG. 3 is a diagram illustrating the relationship between the compression /
[0029]
FIG. 4 illustrates a search
[0030]
The search
[0031]
Similar to the compression /
[0032]
The search
[0033]
However, since the amount of data handled at the time of creating the search
[0034]
Therefore, according to such a high-speed processing method for a multi-dimensional database, a large number of items and key values that increase every time are accumulated through the creation stage of the compression result set
[0035]
The flow of these processes constitutes the gist of the present invention, but the specific technique in other processing stages is not particularly limited except for the process of the compression result set
[0036]
If the form (data format) of the
[0037]
【The invention's effect】
As described above, according to the present invention, a huge number of record files can be efficiently stored, and high-speed search and cross tabulation in an arbitrary dimension can be realized at high speed.
[Brief description of the drawings]
FIG. 1 is a diagram showing the overall principle of a processing method according to the present invention.
FIG. 2 is a diagram illustrating creation of a compression / decompression index according to the present invention.
FIG. 3 is a diagram illustrating creation of a compressed result set cache according to the present invention.
FIG. 4 is a diagram illustrating creation of a search hierarchical structure according to the present invention.
[Explanation of symbols]
1
Claims (2)
前記コンピュータが、記録媒体から又はオンライン転送データとして、複数のキー値を有する少なくとも1以上の項目を有する、複数のレコードからなるオリジナルデータを取得し、前記オリジナルデータに対し、前記項目における前記複数のキー値にIDを一意に割り当て、前記キー値と前記IDとを1つのノードとし、前記各ノードから構成される階層構造を作成し、さらに、前記各ノードへのポインタを有するノードIDリストを作成し、前記ノードIDリスト及び前記階層構造からなる圧縮復元インデックスを前記コンピュータの記憶媒体に記憶する、圧縮復元インデックスを作成及び保存する段階と、
前記コンピュータが、前記圧縮復元インデックスに基づき、前記オリジナルデータの項目毎に該項目中の前記キー値をそれぞれ対応する前記IDで置き換え、圧縮結果セットキャッシュを作成し、前記圧縮結果セットキャッシュを記憶媒体に記憶する、圧縮結果セットキャッシュを作成及び保存する段階とを備え、
前記コンピュータに、検索条件が任意のIDで与えられたときに、前記コンピュータが、前記圧縮結果セットキャッシュにおいて一致するIDを検索する段階と、
前記コンピュータが、前記一致したIDに基づいて、前記圧縮復元インデックスを検索し、対応する前記オリジナルのキー値を読み出す段階と
を備えることを特徴とするデータベースの処理方法。In a database processing method executed by a computer,
The computer acquires original data including a plurality of records having at least one item having a plurality of key values from a recording medium or as online transfer data, and the original data includes the plurality of items in the item. An ID is uniquely assigned to a key value, the key value and the ID are set as one node, a hierarchical structure composed of the nodes is created, and a node ID list having pointers to the nodes is created. Storing and storing a compressed / decompressed index comprising the node ID list and the hierarchical structure in a storage medium of the computer;
The computer replaces the key value in the item with the corresponding ID for each item of the original data based on the compression / decompression index, creates a compression result set cache, and stores the compression result set cache in a storage medium And storing and storing a compressed result set cache,
When the computer is given a search condition with an arbitrary ID, the computer searches for a matching ID in the compressed result set cache; and
The database processing method comprising: the computer searching the compression / decompression index based on the matched ID and reading the corresponding original key value.
前記コンピュータが、前記検索されたレコードに基づいて、前記圧縮復元インデックスを検索し、対応する前記オリジナルのキー値を読み出す段階とを備える
ことを特徴とする請求項1に記載のデータベースの処理方法。When a search condition is given to the computer to call a plurality of key values at the same time, the computer uniquely assigns an ID to the plurality of keys, and all IDs corresponding to the plurality of key values to be called at the same time are all assigned. Searching for the records we have,
The database processing method according to claim 1, further comprising: searching the compressed decompression index based on the retrieved record and reading the corresponding original key value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000396198A JP4081236B2 (en) | 2000-12-26 | 2000-12-26 | Database processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000396198A JP4081236B2 (en) | 2000-12-26 | 2000-12-26 | Database processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002197099A JP2002197099A (en) | 2002-07-12 |
JP4081236B2 true JP4081236B2 (en) | 2008-04-23 |
Family
ID=18861534
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000396198A Expired - Lifetime JP4081236B2 (en) | 2000-12-26 | 2000-12-26 | Database processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4081236B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5544118B2 (en) | 2009-06-30 | 2014-07-09 | 株式会社日立製作所 | Data processing apparatus and processing method |
JP5337745B2 (en) | 2010-03-08 | 2013-11-06 | 株式会社日立製作所 | Data processing device |
JP5727258B2 (en) * | 2011-02-25 | 2015-06-03 | ウイングアーク1st株式会社 | Distributed database system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62131348A (en) * | 1985-12-04 | 1987-06-13 | Panafacom Ltd | Multi-index file access system |
-
2000
- 2000-12-26 JP JP2000396198A patent/JP4081236B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2002197099A (en) | 2002-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6035303A (en) | Object management system for digital libraries | |
Wang et al. | Discovering structural association of semistructured data | |
KR100414236B1 (en) | A search system and method for retrieval of data | |
CN101079070B (en) | Computer and method for response of information query | |
US6895550B2 (en) | Computer-implemented PDF document management | |
JP3849279B2 (en) | Index creation method and search method | |
JP4039488B2 (en) | Multi-frequency pattern extraction apparatus, multi-frequency pattern extraction method, program thereof and recording medium | |
US20040133581A1 (en) | Database management system, data structure generating method for database management system, and storage medium therefor | |
US7103536B1 (en) | Symbol dictionary compiling method and symbol dictionary retrieving method | |
US8266150B1 (en) | Scalable document signature search engine | |
CN101105795A (en) | Network behavior based personalized recommendation method and system | |
US8316041B1 (en) | Generation and processing of numerical identifiers | |
JP3452531B2 (en) | Method and system for data mining | |
EP1315103B1 (en) | File search method and apparatus, and index file creation method and device | |
KR20180129001A (en) | Method and System for Entity summarization based on multilingual projected entity space | |
JPH04124774A (en) | Data storage method for hierarchical construction in related data base | |
JPH05189490A (en) | Method and apparatus for saving and retrieving function results | |
dite Gassama et al. | S-FPG: A parallel version of FP-Growth algorithm under Apache Spark™ | |
JP4081236B2 (en) | Database processing method | |
JPH0550774B2 (en) | ||
JP2001022766A (en) | Method and device for high speed processing for multidimensional database | |
CN117312486A (en) | Dictionary division two-layer structure encryption index creation method supporting quick encryption document ordering retrieval | |
CN105786916B (en) | Storage method and system for a hierarchical directory based on a large-capacity table | |
EP1116137A1 (en) | Database, and methods of data storage and retrieval | |
JP3202341B2 (en) | Database system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20040720 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20040720 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20040720 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040907 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20041001 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070205 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070406 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071105 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071214 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20080128 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080208 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110215 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4081236 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120215 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130215 Year of fee payment: 5 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140215 Year of fee payment: 6 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |