JP3844914B2 - Information processing apparatus and method for inserting record into database - Google Patents
Information processing apparatus and method for inserting record into database Download PDFInfo
- Publication number
- JP3844914B2 JP3844914B2 JP18236999A JP18236999A JP3844914B2 JP 3844914 B2 JP3844914 B2 JP 3844914B2 JP 18236999 A JP18236999 A JP 18236999A JP 18236999 A JP18236999 A JP 18236999A JP 3844914 B2 JP3844914 B2 JP 3844914B2
- Authority
- JP
- Japan
- Prior art keywords
- record
- database
- interval
- page
- processing unit
- 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 - Fee Related
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、例えばコンピュータなどの情報処理装置及びデータベースへのレコード挿入方法に関する。
【0002】
【従来の技術】
従来から、データベース(DB)、例えばリレーショナルデータベース(RDB)等は、蓄積(登録)したデータをキーワード検索するといった用途で利用されているが、RDBに登録されているデータ量が多くなると、データベースそのものの検索処理に時間がかかるためアクセス性能を向上することが望まれている。
【0003】
従来、RDBはデータベース管理システム(Database Management System,DBMS)により管理されている。DBMSには、RDBのアクセス性能を向上させることを目的としてクラスタリング機能が備えられている。このクラスタリング機能はデータを所定単位毎に区分して格納する機能である。
【0004】
通常、DBMSでは、ユーザ側、つまりアプリケーション側からインデックスは定義できるものの、それはあくまでも論理的な定義であって、データベース内のどの位置にレコードを挿入するかといったDB内の物理的なレコードの挿入位置の指定はできない。
【0005】
DBにレコードを格納する形態としては追加型と挿入型があり、追加型とは、新規レコードを現格納レコードの後に格納する形態である。また挿入型とは、新規レコードをクラスターキーの順序に従って格納する形態である。
【0006】
【発明が解決しようとする課題】
ところで、従来のDBMSでは、レコードを挿入する場合にクラスタリング機能によって、新たなレコードは関係するレコードの近傍に格納されるため、導入初期には、論理的に別ページとすべきレコードが同じページに混在してしまい、競合が発生しやすい状況になるという問題があった。
【0007】
そこで、この状況を回避するために、従来はデータベースの監視を行い、データベースの再編成を随時行って、記憶間隔を広めるような運用を行っている。
【0008】
しかし、データベースに蓄積されるデータ量が多くなってくると、データベースの監視及び運用を行って競合を回避するだけでは、データベースの検索速度が遅くなる一方であり、今後のさらなるデータの増加に対応できないという問題がある。
【0009】
本発明はこのような課題を解決するためになされたもので、データベースアクセス時の競合をなくし検索性能を向上すると共に、データベース運用時の作業を軽減することのできる情報処理装置及びデータベースへのレコード挿入方法を提供することを目的としている。
【0010】
【課題を解決するための手段】
上記した目的を達成するために、請求項1記載の発明は、データベースに対してレコードの挿入、変更及び削除を行う情報処理装置であって、前記データベースにレコードを挿入するためのレコードの挿入ページとページ内の論理的な挿入位置とページ内に挿入可能なレコードの件数とが設定された間隔情報保持手段と、前記データベースにレコードを挿入、変更及び削除する指示をレコード名で発行する手段と、前記データベースへのレコード挿入指示が発行された場合、前記間隔情報保持手段に設定されている初めのレコードと異なるレコードについて、前記データベース上の挿入対象の該当レコードのページの最初の位置に、挿入指示されたレコードを挿入する手段とを具備したことを特徴としている。
【0011】
請求項2記載の発明は、請求項1記載の情報処理装置において、前記間隔情報保持手段に対してレコードの挿入ページとページ内の論理的な挿入位置とページ内に挿入可能なレコードの件数とを設定する間隔情報設定手段をさらに具備したことを特徴としている。
【0013】
請求項3記載の発明は、データベースに対してレコードの挿入するデータベースへのレコード挿入方法であって、前記データベースにレコードを挿入する指示がレコード名で発行された場合、間隔情報保持手段に設定されている初めのレコードと同じレコードについて、前記データベース上の初めのレコードのページの挿入済みのレコードの次の位置にレコードを挿入する一方、前記間隔情報保持手段に設定されている初めのレコードに対する次のレコードについては、前記データベース上の初めのレコードに設定されている件数分の間隔をおいた次のレコードの最初の位置にレコードを挿入することを特徴としている。
【0014】
請求項1,3記載の発明では、データベースにレコードを挿入する指示が発行されると、間隔情報保持手段に保持されている初めのレコードと同じレコードについて、データベース上の初めのレコードのページにおける挿入済みのレコードの次の位置にレコードを挿入する一方、前記間隔情報保持手段に設定されている初めのレコードに対する次のレコードについては、前記データベース上の初めのレコードに設定されている件数分の間隔をおいた次のレコードの最初の位置にレコードを挿入するので、データベース内が論理的にも物理的にも区分されるようになり、データベースの検索性能を向上することができる。また、従来行っていたデータベースの監視や記憶間隔を広めるようなデータベースの再編成作業が不要になり、データベース運用時の作業を軽減することができる。
【0015】
請求項2記載の発明では、間隔情報保持手段に対してレコードの挿入ページとページ内の挿入位置とページ内に挿入可能なレコードの件数とを設定する間隔情報設定手段を持つことで、よりフレキシブルに間隔設定を行うことができる。
【0016】
また、レコード名とこのレコード名のページ数で間隔情報を設定することで、予めページ数が決められた業務などに適したデータベースをを構築できる。また、レコード名とこのレコード名のページに挿入可能な件数とで間隔情報を設定することで、インデックスを持つ辞書を検索するようにデータベースを検索できるようになり、データベースの検索性能を向上することができる。
【0018】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照して詳細に説明する。
図1は本発明の情報処理装置及びデータベースへのレコード挿入方法に係る第1実施形態のデータベース検索システムの構成を示す図である。
【0019】
同図に示すように、このデータベース検索システムは、SQL発行処理部1aを有する業務処理部1とデータベース管理システム(Database Management System:DBMS)2とから構成されている。
【0020】
DBMS2は、ロード処理部3、SQL判定処理部4、挿入処理部5、更新処理部6、削除処理部7、インターバル設定処理部8、インターバルテーブル9、インターバル判定処理部10、レコード挿入処理部11及びデータベース12などから構成されている。
【0021】
ロード処理部3は格納対象のデータをロードするときに動作する処理部である。SQL判定処理部4はSQLを判断し、挿入処理であるか、更新処理であるか、あるいは削除処理であるかを判定する。インターバルテーブル9はインターバルが設定されるテーブルである。インターバル設定処理部8は業務内容に応じたインターバルデータをインターバルテーブル9に設定する。業務処理部1は一つの業務プログラムであり、コンピュータのハードディスク装置などにインストールされている。SQL発行処理部1aは業務処理部1の一つのモジュールであり、SQLを発行する処理を行う。挿入処理部5はレコードの挿入処理を行う。更新処理部6はレコードの更新処理を行う。削除処理部7はレコードの削除処理を行う。インターバル判定処理部10は挿入処理で必要とするインターバルを判断する。データベース12はデータを物理的に関連づけて格納する部分である。レコード挿入処理部11はインターバル判定処理部10によって起動され、起動すると、データベース12に対してレコードの挿入処理を実行する。レコード挿入処理部11はレコードインターバル機能、ページインターバル機能、簡易インターバル機能などを有している。これら各機能については後述する。
【0022】
図2のフローチャートを参照して、このデータベース検索システムの動作を説明する。図2はこのデータベース検索システムの動作を示すフローチャートである。
【0023】
同図に示すように、インターバル設定処理部8は予め業務内容に応じたインターバルデータを生成し、それをインターバルテーブル9へ設定する。インターバルデータとはレコード挿入時にその基本となる情報である。
【0024】
業務処理部1にてSQL発行処理部1aが起動されてSQL発行処理が行われ、SQLが発行されると(図2のS101)、そのSQLを受け取ったSQL判定処理部4によりレコードの挿入処理かそれ以外の処理かがまず判定される(S102)。
【0025】
この判定結果、レコードの更新処理、あるいは削除処理であれば(S102のNo)、更新処理部6あるいは削除処理部7がデータベース格納部12に対してレコードの更新処理あるいは削除処理を行う(S103)。
【0026】
一方、上記判定結果、挿入処理と判定された場合は(S102のYes)、SQL判定処理部4によって挿入処理部5が起動されてレコードの挿入処理に移り、インターバル判定処理部10がインターバル判定処理を行う。
【0027】
インターバル判定処理部10では、既に設定されているインターバルテーブル9からレコード挿入時の情報、つまりインターバルデータを取得し、レコード挿入処理部11を起動する。
【0028】
起動したレコード挿入処理部11は、インターバルテーブルを検索し(S104)、インターバルデータを発見(存在)すると(S105)、レコードインターバル機能、ページインターバル機能、簡易インターバル機能などで、データベース12へのレコードの挿入位置を決定し(S106)、データベース12に対して物理的なレコードの挿入処理を実行し(S107)、データベース12にレコードを挿入した後、処理を終了する。
【0029】
以下に、上記レコード挿入処理部11におけるレコード挿入動作の具体例を説明する。
【0030】
まず、図3を参照してレコードインターバル機能によるレコード挿入動作について説明する。
このレコードインターバル機能では、レコードの挿入ページとページ内の挿入位置とページ内に挿入可能なレコードの件数とがインターバルテーブル9に設定される。
【0031】
図3に示すように、例えばデータベース12にこれから挿入する初めのレコードをレコードA、次に挿入するレコードをBとすると、インターバルテーブル9には、レコード名としてA−*、件数としてmを設定し、レコード名としてB−*、件数としてnを設定する。
【0032】
このようにインターバルテーブル9に、データベース12へ挿入するレコードについてそれぞれm件、n件と設定し、例えばレコードA−1の挿入を指示すると、レコード挿入処理部11はインターバルテーブル9を参照し、データベース12のレコードAのページの最初の位置にレコードA−1を挿入する。
【0033】
次に、レコードA−2の挿入を指示すると、レコード挿入処理部11はインターバルテーブル9を参照し、レコードAのページのレコードA−1の次の位置にレコードA−2を挿入する。
【0034】
さらに、レコードB−1の挿入を指示すると、レコード挿入処理部11はインターバルテーブル9を参照し、レコードBのページの最初の位置にレコードB−1を挿入する。
【0035】
このようにインターバルテーブル9に、ページ毎にレコードを挿入する件数までの情報を事前に設定しておくことで、論理的に別ページにすべきレコードがデータベース12の同一ページ内に物理的に混在することがなくなる。つまり、論理的にも物理的にもレコードが区分されてデータベース12にデータを登録できるようになる。
【0036】
例えばデータベース12に数万件のデータを記録するような場合、事前に1ページ内に登録可能な件数を設定しておき、その範囲でページ単位に論理的に同じレコードを整理して挿入し、データを登録してゆくことで、各レコードに登録したデータが何万件であってもデータベース12をページ単位で検索することでデータベース12の検索及びアクセス速度を向上することができる。
【0037】
より具体的には、例えばレコードAのページを東京都のページ、レコードA−1を品川区、レコードA−2を足立区、レコードBのページを大阪府のページ、レコードB−1を大阪市などとすると、東京都のページAには、23区、27市分の件数(領域)を確保しておけばよく、このような間隔でレコードがデータベース12に挿入される。したがって、データベース12に、新たに豊島区などのレコードを挿入する場合は、空いている東京都のページA内に豊島区としてのレコードが挿入されることになる。
【0038】
このようにレコードが挿入されたデータベース12を検索する場合、東京都のデータを検索する処理と大阪府のデータを検索する処理との競合がなくなり、データベース検索性能の向上を図ることができる。
【0039】
続いて、図4を参照してページインターバル機能によるレコード挿入動作について説明する。
【0040】
このページインターバル機能では、挿入するレコードの名称とこのレコードを挿入するページ数がインターバルデータとしてインターバルテーブル9に設定される。
【0041】
図4に示すように、例えばこれから挿入する初めのレコードをレコードA、次に挿入するレコードをBとすると、インターバルテーブル9には、レコード名としてA−*、ページとして“1”を設定し、レコード名としてB−*、ページとして“2”を設定する。
【0042】
この場合、データベース12にはm件のレコードが収容可能であり、nページ分のレコードが挿入されるものとする。
【0043】
このようにインターバルテーブル9に、データベース12へ挿入するレコードについてそれぞれの挿入ページを設定しておくことで、例えばレコードA−1の挿入を指示すると、レコード挿入処理部11はインターバルテーブル9を参照し、レコードAのページ、つまり1ページ目にレコードA−1を挿入する。
【0044】
次に、レコードA−2の挿入を指示すると、レコード挿入処理部11はインターバルテーブル9を参照し、レコードAのページ(1ページ目のレコードA−1の後)にレコードA−2を挿入する。
【0045】
さらに、レコードB−1の挿入を指示すると、レコード挿入処理部11はインターバルテーブル9を参照し、レコードBのページ、つまり2ページ目にレコードB−1を挿入する。
【0046】
このようにインターバルテーブル9に、レコードを挿入するページを事前に設定しておくことで、データベースの同一ページに論理的に別ページとすべきレコードが混在することがなくなる。
【0047】
このページインターバル機能は、ページ数が予め決まっている業務、例えば1年分12枚のページに月報を作るといったときに有効である。
【0048】
さらに、図5を参照して簡易インターバル機能によるレコード挿入動作について説明する。
【0049】
この簡易インターバル機能では、レコードの挿入間隔情報として一定のインターバル(ページ単位という情報)がインターバルテーブル9に設定される。
【0050】
したがって、すべてのレコードを挿入する場合、レコード挿入処理部11はインターバルテーブル9を参照するが、ページ指定はあるものの、ページ内における挿入位置の指定がないので、ページ内の空いている領域にレコードを挿入する。つまり、1つのページ内であれば、その中のどの位置にでもレコードが挿入される。
【0051】
この簡易インターバル機能は、1ページに挿入されるレコードの件数が固定で決まっているような業務、例えば1年のデータであれば12件と決まっているような場合に有効である。
【0052】
このようにこの第1実施形態のデータベース検索システムでは、データベース12へのレコード挿入時に、物理的なレコードの挿入間隔情報であるインターバルをインターバルテーブルにて指定することにより、論理的に別ページにすべきレコードが同一ページ内に混在する状態がなくなり、データ検索時の競合をなくすことができる。
【0053】
また、論理的に別ページにすべきレコードが同一ページ内に混在する状態を回避するために従来行われていたDB監視および再編成の作業が不要となり、作業性も向上することができる。
【0054】
すなわち、業務内容を分析し、データベース12に挿入するレコードのインターバルデータをDBMS2に設定しておくことによって、データベース12の検索性能を向上すると共に、このデータベース検索システムの運用における作業性を大幅に向上することができる。
【0055】
次に、図6を参照して本発明のデータベース検索システムに係る第2実施形態について説明する。図6は第2実施形態のデータベース検索システムの構成を示す図である。
【0056】
このデータベース検索システムは、上記第1実施形態の変形例であり業務処理部30とデータベース管理システム(Database Management System:DBMS)40とから構成されている。
【0057】
業務処理部30はSQL発行処理部1a、SQL判定処理部4、インターバル設定処理部8などの各モジュールを有するアプリケーションである。
【0058】
DBMS40は、ロード処理部3、挿入処理部5、更新処理部6、削除処理部7、インターバルテーブル9、インターバル判定処理部10、レコード挿入処理部11及びデータベース12などから構成されている。
【0059】
すなわち、この第2実施形態は、業務処理部(アプリケーション)30側にSQL発行処理部1a、SQL判定処理部4、インターバル設定処理部8などを設け、アプリケーション側でレコードの挿入位置を決定可能にしたものである。
【0060】
この場合、SQL発行処理部1aによりSQL発行処理が行われた段階で、挿入処理を行うか否かが判定される。
【0061】
ここで、挿入処理を行う場合は、SQL発行処理部1aがインターバル設定処理部8に指示し、この指示により、インターバル設定処理部8がインターバルテーブル9にインターバルデータを設定する。
【0062】
そして、インターバルテーブル9にインターバルデータが設定された時点で、業務処理部30からDBMS40に挿入指示が行われて、DBMS40の挿入処理部5が起動される。
【0063】
すると、起動した挿入処理部5が挿入処理を行うと、インターバル判定処理部10がインターバルテーブル9を検索し、インターバル判定処理を行い、この判定結果に基づいてデータベース12へレコードの挿入を行う。
【0064】
なお、SQL発行処理部4によって変更されたインターバルテーブル9は、挿入処理が完全に終了した段階で初期設定値へ戻される。
【0065】
このようにこの第2実施形態のデータベース検索システムによれば、上記第1実施形態と同様な効果がえられると共に、アプリケーション(業務処理部30)側にSQL発行、SQL判定及びインターバル設定の各処理部を持たせたことで、アプリケーション単位(プログラム単位)で、インターバルを適時設定が可能になり、あるレコードを特定のページのみに挿入するといったような特殊な業務処理にも対応でき、よりカスタム化した細かなレコードの挿入処理を行うことができる。
【0066】
上記実施形態に記載のアプリケーション(プログラム)は、フロッピーディスクなどのコンピュータが読み出し可能な記憶媒体に記憶されていても良く、この場合、記憶媒体に記憶されたプログラムをコンピュータが読み出すことにより、各実施形態における処理が可能になる。
【0067】
なお、記憶媒体としては、磁気ディスク、フロッピーディスク、ハードディスク、光ディスク(CD−ROM、CD−R、DVDなど)、光磁気ディスク(MOなど)、半導体メモリなど、プログラムを記憶でき、かつコンピュータが読み取り可能な記憶媒体であれば、その記憶形式はいずれの形態であっても良い。
【0068】
また、記憶媒体からコンピュータにインストールされたアプリケーション(プログラム)の指示に基づきDBMSや、コンピュータ上で稼動しているOS(オペレーティングシステム)、ネットワークソフトなどのMW(ミドルウェア)が本実施形態を実現するための各処理の一部を実行しても良い。
【0069】
さらに、記憶媒体は、コンピュータと独立した媒体に限らず、LANやインターネットなどにより伝送されたプログラムをダウンロードして記憶または一時記憶した記憶媒体も含まれる。
【0070】
また、記憶媒体は一つに限らず、複数の媒体から本実施形態における処理が実行される場合も本発明における記録媒体に含まれ、媒体構成はいずれの構成であっても良い。
【0071】
なお、コンピュータは、記憶媒体に記憶されたプログラムに基づき、本実施形態における各処理を実行するものであって、パソコンなどの一つからなる装置、複数の装置がネットワーク接続されたシステムなどのいずれの構成であっても良い。
【0072】
また、コンピュータとは、パソコンに限らず、情報処理機器に含まれる演算処理装置、マイコンなども含み、プログラムによって本発明の機能を実現することが可能な機器、装置を総称している。
【0073】
【発明の効果】
以上説明したように本発明によれば、データベースにレコードを挿入する指示が発行されると、間隔情報保持手段に保持されている間隔情報に基づいて、前記データベースにレコードを挿入するので、データベース内が論理的にも物理的にも区分されるようになり、データベースの検索性能を向上することができる。
【0074】
また、従来行っていたDBの監視や記憶間隔を広めるようなデータベースの再編成作業が不要になり、データベース運用時の作業を軽減することができる。
【図面の簡単な説明】
【図1】本発明の第1実施形態のデータベース検索システムの構成を示す図。
【図2】このデータベース検索システムの動作を示すフローチャート。
【図3】このデータベース検索システムのレコードインターバル機能を説明するための図。
【図4】このデータベース検索システムのページインターバル機能を説明するための図。
【図5】このデータベース検索システムの簡易インターバル機能を説明するための図。
【図6】本発明の第2実施形態のデータベース検索システムの構成を示す図。
【符号の説明】
1…業務処理部、2…Database Management System(DBMS)、3…ロード処理部、4…SQL判定処理部、5…挿入処理部、6…更新処理部、7…削除処理部、8…インターバル設定処理部、9…インターバルテーブル、10…インターバル判定処理部、11…レコード挿入処理部、12…データベース。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an information processing apparatus such as a computer and a method for inserting a record into a database.
[0002]
[Prior art]
Conventionally, a database (DB), such as a relational database (RDB), has been used for a keyword search of stored (registered) data, but if the amount of data registered in the RDB increases, the database itself Therefore, it is desired to improve the access performance.
[0003]
Conventionally, the RDB is managed by a database management system (DBMS). The DBMS has a clustering function for the purpose of improving the access performance of the RDB. This clustering function is a function for storing data by dividing it into predetermined units.
[0004]
Normally, in DBMS, an index can be defined from the user side, that is, from the application side, but it is only a logical definition, and the physical record insertion position in the DB, such as where in the database the record is to be inserted. Cannot be specified.
[0005]
There are an addition type and an insertion type as a form for storing records in the DB. The addition type is a form in which a new record is stored after the current storage record. The insertion type is a form in which new records are stored in the order of cluster keys.
[0006]
[Problems to be solved by the invention]
By the way, in the conventional DBMS, when a record is inserted, a new record is stored in the vicinity of the related record by the clustering function. There was a problem that it was mixed and it was easy for competition to occur.
[0007]
Therefore, in order to avoid this situation, conventionally, the database is monitored, and the database is reorganized as needed to increase the storage interval.
[0008]
However, as the amount of data stored in the database increases, the database search speed will only slow down by simply monitoring and operating the database to avoid contention. There is a problem that you can not.
[0009]
The present invention has been made to solve such a problem. An information processing apparatus and a database record capable of improving search performance by eliminating contention during database access and reducing work during database operation. It aims to provide an insertion method.
[0010]
[Means for Solving the Problems]
In order to achieve the above object, the invention according to
[0011]
According to a second aspect of the present invention, in the information processing apparatus according to the first aspect, a record insertion page, a logical insertion position in the page, and the number of records that can be inserted in the page are stored in the interval information holding unit. It further has an interval information setting means for setting.
[0013]
The invention according to
[0014]
In the first and third aspects of the invention, when an instruction to insert a record into the database is issued , the same record as the first record held in the interval information holding means is inserted into the page of the first record on the database. While inserting a record at the next position of the already- recorded record, for the next record with respect to the first record set in the interval information holding means, an interval corresponding to the number of records set in the first record on the database Since the record is inserted at the first position of the next record with a mark, the database is partitioned logically and physically, and the database search performance can be improved. In addition, the database reorganization work that increases the database monitoring and storage interval, which has been conventionally performed, is unnecessary, and the work during the database operation can be reduced.
[0015]
The invention according to
[0016]
In addition, by setting interval information with the record name and the number of pages of the record name, a database suitable for a business in which the number of pages is determined in advance can be constructed. In addition, by setting interval information with the record name and the number of records that can be inserted into the page of this record name, the database can be searched like a dictionary with an index, and the database search performance is improved. Can do.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a diagram showing a configuration of a database search system according to a first embodiment relating to an information processing apparatus and a record insertion method for a database according to the present invention.
[0019]
As shown in the figure, this database search system is composed of a
[0020]
The DBMS 2 includes a
[0021]
The
[0022]
The operation of this database search system will be described with reference to the flowchart of FIG. FIG. 2 is a flowchart showing the operation of this database search system.
[0023]
As shown in the figure, the interval setting
[0024]
When the SQL processing unit 1a is activated in the
[0025]
If the determination result is a record update process or a delete process (No in S102), the update processor 6 or the delete processor 7 performs a record update process or a delete process on the database storage unit 12 (S103). .
[0026]
On the other hand, if it is determined that the insertion process is the result of the determination (Yes in S102), the
[0027]
The interval
[0028]
The activated record
[0029]
A specific example of the record insertion operation in the record
[0030]
First, a record insertion operation by the record interval function will be described with reference to FIG.
In the record interval function, the record insertion page, the insertion position in the page, and the number of records that can be inserted in the page are set in the interval table 9.
[0031]
As shown in FIG. 3, for example, if the first record to be inserted into the
[0032]
As described above, when the record to be inserted into the
[0033]
Next, when the insertion of the record A-2 is instructed, the record
[0034]
Further, when the insertion of the record B-1 is instructed, the record
[0035]
Thus, by setting information up to the number of records to be inserted for each page in the interval table 9 in advance, the records that should be logically separated from each other are physically mixed in the same page of the
[0036]
For example, when tens of thousands of data is recorded in the
[0037]
More specifically, for example, the record A page is the Tokyo page, the record A-1 is the Shinagawa ward, the record A-2 is the Adachi ward, the record B page is the Osaka prefecture page, and the record B-1 is the Osaka city. For example, page A in Tokyo only needs to secure the number of 23 wards and 27 cities (areas), and records are inserted into the
[0038]
When searching the
[0039]
Next, a record insertion operation by the page interval function will be described with reference to FIG.
[0040]
In this page interval function, the name of the record to be inserted and the number of pages to insert this record are set in the interval table 9 as interval data.
[0041]
As shown in FIG. 4, for example, assuming that the first record to be inserted is record A and the next record to be inserted is B, A- * is set as the record name and “1” is set as the page in the interval table 9. Set B- * as the record name and “2” as the page.
[0042]
In this case, m records can be stored in the
[0043]
In this way, by setting the insertion page for each record to be inserted into the
[0044]
Next, when the insertion of the record A-2 is instructed, the record
[0045]
Further, when the insertion of the record B-1 is instructed, the record
[0046]
In this way, by setting in advance in the interval table 9 the page into which records are to be inserted, records that should be logically separated from the same page in the database are not mixed.
[0047]
This page interval function is effective when the number of pages is predetermined, for example, when monthly reports are made on 12 pages for one year.
[0048]
Further, a record insertion operation by the simple interval function will be described with reference to FIG.
[0049]
In this simple interval function, a certain interval (information called page unit) is set in the interval table 9 as record insertion interval information.
[0050]
Therefore, when all the records are inserted, the record
[0051]
This simple interval function is effective in a business where the number of records to be inserted in one page is fixed, for example, in the case of 12 data for one year.
[0052]
As described above, in the database search system according to the first embodiment, when a record is inserted into the
[0053]
In addition, DB monitoring and reorganization work conventionally performed to avoid a state where records that should be logically separated on the same page are mixed are not required, and workability can be improved.
[0054]
That is, by analyzing the business contents and setting interval data of records to be inserted into the
[0055]
Next, a second embodiment according to the database search system of the present invention will be described with reference to FIG. FIG. 6 is a diagram showing the configuration of the database search system of the second embodiment.
[0056]
This database search system is a modification of the first embodiment, and includes a
[0057]
The
[0058]
The DBMS 40 includes a
[0059]
That is, in the second embodiment, the SQL processing unit 1a, the SQL
[0060]
In this case, it is determined whether or not to perform the insertion process when the SQL issuance processing unit 1a performs the SQL issuance process.
[0061]
Here, when performing the insertion processing, the SQL issuing processing unit 1 a instructs the interval setting
[0062]
When the interval data is set in the interval table 9, an insertion instruction is issued from the
[0063]
Then, when the inserted
[0064]
The interval table 9 changed by the SQL
[0065]
As described above, according to the database search system of the second embodiment, the same effects as those of the first embodiment can be obtained, and each process of SQL issuance, SQL determination, and interval setting is performed on the application (business processing unit 30) side. By having a section, it is possible to set the interval in a timely manner in application units (program units), and it can handle special business processing such as inserting a certain record only on a specific page, making it more customizable. This makes it possible to perform detailed record insertion processing.
[0066]
The application (program) described in the above embodiment may be stored in a computer-readable storage medium such as a floppy disk. In this case, each program is read by the computer reading out the program stored in the storage medium. Processing in the form becomes possible.
[0067]
As storage media, programs such as magnetic disk, floppy disk, hard disk, optical disk (CD-ROM, CD-R, DVD, etc.), magneto-optical disk (MO, etc.), semiconductor memory, etc. can be stored and read by a computer. As long as it is a possible storage medium, the storage format may be any form.
[0068]
Further, in order to realize this embodiment, a DBMS, an OS (operating system) operating on the computer, network software, or other MW (middleware) based on an instruction of an application (program) installed in the computer from the storage medium. A part of each process may be executed.
[0069]
Furthermore, the storage medium is not limited to a medium independent of the computer, but also includes a storage medium in which a program transmitted via a LAN or the Internet is downloaded and stored or temporarily stored.
[0070]
Further, the number of storage media is not limited to one, and the case where the processing in the present embodiment is executed from a plurality of media is also included in the recording medium in the present invention, and the media configuration may be any configuration.
[0071]
The computer executes each process in the present embodiment based on a program stored in a storage medium, and includes any one device such as a personal computer or a system in which a plurality of devices are connected to a network. It may be configured as follows.
[0072]
The computer is not limited to a personal computer, but includes an arithmetic processing device, a microcomputer, and the like included in an information processing device, and is a generic term for devices and devices that can realize the functions of the present invention by a program.
[0073]
【The invention's effect】
As described above, according to the present invention, when an instruction to insert a record into the database is issued, the record is inserted into the database based on the interval information held in the interval information holding means. Are logically and physically separated, and the database search performance can be improved.
[0074]
In addition, the database reorganization work that increases the database monitoring and storage interval, which has been conventionally performed, is no longer necessary, and the work during database operation can be reduced.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of a database search system according to a first embodiment of this invention.
FIG. 2 is a flowchart showing the operation of the database search system.
FIG. 3 is a diagram for explaining a record interval function of the database search system.
FIG. 4 is a diagram for explaining a page interval function of the database search system.
FIG. 5 is a diagram for explaining a simple interval function of the database search system.
FIG. 6 is a diagram showing a configuration of a database search system according to a second embodiment of this invention.
[Explanation of symbols]
DESCRIPTION OF
Claims (3)
前記データベースにレコードを挿入するためのレコードの挿入ページとページ内の論理的な挿入位置とページ内に挿入可能なレコードの件数とが設定された間隔情報保持手段と、
前記データベースにレコードを挿入、変更及び削除する指示をレコード名で発行する手段と、
前記データベースへのレコード挿入指示が発行された場合、前記間隔情報保持手段に設定されている初めのレコードと同じレコードについて、前記データベース上の初めのレコードのページにおける挿入済みのレコードの次の位置にレコードを挿入する一方、前記間隔情報保持手段に設定されている初めのレコードに対する次のレコードについては、前記データベース上の初めのレコードに設定されている件数分の間隔をおいた次のレコードの最初の位置にレコードを挿入する手段と
を具備したことを特徴とする情報処理装置。An information processing apparatus for inserting, changing, and deleting records in a database,
Interval information holding means in which a record insertion page for inserting records into the database, a logical insertion position in the page, and the number of records that can be inserted in the page are set,
Means for issuing an instruction to insert, change and delete a record in the database by a record name;
When an instruction to insert a record into the database is issued , the same record as the first record set in the interval information holding unit is placed at the position next to the inserted record on the page of the first record on the database. While the record is inserted, for the next record with respect to the first record set in the interval information holding means, the first of the next record with an interval of the number set in the first record on the database An information processing apparatus comprising: means for inserting a record at a position .
前記間隔情報保持手段に対してレコードの挿入ページとページ内の論理的な挿入位置とページ内に挿入可能なレコードの件数とを設定する間隔情報設定手段をさらに具備したことを特徴とする情報処理装置。The information processing apparatus according to claim 1,
Information processing further comprising interval information setting means for setting a record insertion page, a logical insertion position in the page, and the number of records that can be inserted in the page with respect to the interval information holding means. apparatus.
前記データベースにレコードを挿入する指示がレコード名で発行された場合、間隔情報保持手段に設定されている初めのレコードと同じレコードについて、前記データベース上の初めのレコードのページにおける挿入済みのレコードの次の位置にレコードを挿入する一方、前記間隔情報保持手段に設定されている初めのレコードに対する次のレコードについては、前記データベース上の初めのレコードに設定されている件数分の間隔をおいた次のレコードの最初の位置にレコードを挿入することを特徴とするデータベースへのレコード挿入方法。A method for inserting a record into a database, wherein the record is inserted into the database,
When an instruction to insert a record into the database is issued with a record name, for the same record as the first record set in the interval information holding means, next to the inserted record in the first record page on the database For the next record for the first record set in the interval information holding means, the next record with the number of records set in the first record on the database is inserted . A method for inserting a record into a database, wherein the record is inserted at the first position of the record .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP18236999A JP3844914B2 (en) | 1999-06-28 | 1999-06-28 | Information processing apparatus and method for inserting record into database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP18236999A JP3844914B2 (en) | 1999-06-28 | 1999-06-28 | Information processing apparatus and method for inserting record into database |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2001014195A JP2001014195A (en) | 2001-01-19 |
JP3844914B2 true JP3844914B2 (en) | 2006-11-15 |
Family
ID=16117117
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP18236999A Expired - Fee Related JP3844914B2 (en) | 1999-06-28 | 1999-06-28 | Information processing apparatus and method for inserting record into database |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3844914B2 (en) |
-
1999
- 1999-06-28 JP JP18236999A patent/JP3844914B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2001014195A (en) | 2001-01-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5806058A (en) | Index managing method in database managing system | |
CA2281287C (en) | Method and system for efficiently searching for free space in a table of a relational database having a clustering index | |
JP3554459B2 (en) | Text data registration search method | |
JP4716635B2 (en) | Selective auditing of access to rows in a relational database at the database server | |
JPS63298626A (en) | Managing method for data base | |
JP3844914B2 (en) | Information processing apparatus and method for inserting record into database | |
JPH10312396A (en) | Data base system and computer-readable record medium where data base retrieval program is recorded | |
JP2624170B2 (en) | Logical deletion data physical deletion method | |
Hong et al. | Associative hardware and software techniques for integrity control | |
US20020062305A1 (en) | Database management systems | |
JP4306281B2 (en) | Hierarchical data mapping program, apparatus and method in relational database | |
JP3578501B2 (en) | Document search method and apparatus | |
JP2901543B2 (en) | Magnetic disk file relocation method | |
JP3563600B2 (en) | Method of executing method and recording medium recording method execution program | |
JP2721034B2 (en) | Clustering control system | |
JP2844885B2 (en) | Library type file directory extension method | |
JPH05151056A (en) | Data controller | |
JPH05158777A (en) | Data management system | |
JP3226891B2 (en) | Distributed database system and method for extending distributed database system | |
JP2000066933A (en) | Time series data management system | |
JPH08328929A (en) | Database split management system | |
JPH04336340A (en) | Disk cache access control system | |
JPS61103242A (en) | High-speed retrieval system | |
JPH0465427B2 (en) | ||
JPH02222044A (en) | Data processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050630 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050705 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050905 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060228 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060419 |
|
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: 20060815 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060817 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100825 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |