JP3552339B2 - Database system - Google Patents

Database system Download PDF

Info

Publication number
JP3552339B2
JP3552339B2 JP13245495A JP13245495A JP3552339B2 JP 3552339 B2 JP3552339 B2 JP 3552339B2 JP 13245495 A JP13245495 A JP 13245495A JP 13245495 A JP13245495 A JP 13245495A JP 3552339 B2 JP3552339 B2 JP 3552339B2
Authority
JP
Japan
Prior art keywords
data
database
aggregation
search
data table
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
Application number
JP13245495A
Other languages
Japanese (ja)
Other versions
JPH08329101A (en
Inventor
良一 佐和田
史郎 玉谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP13245495A priority Critical patent/JP3552339B2/en
Publication of JPH08329101A publication Critical patent/JPH08329101A/en
Application granted granted Critical
Publication of JP3552339B2 publication Critical patent/JP3552339B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【産業上の利用分野】
本発明は、データベースシステムにおいて、複数の索引項目と数値項目を有するデータテーブルから指定された索引項目に対する数値項目の集計値(例えば総和)を求める処理に関するものである。
【0002】
【従来の技術】
前記のような、複数の索引項目と数値項目を有するデータテーブルからデータの集計値を求める場合、頻繁に行う集計処理であっても、一つのデータテーブルから同じ検索を再度実行していた。
【0003】
【発明が解決しようとしている課題】
どの項目が頻繁に集計処理に使用されるか、予め操作者にはわかっていることから、頻繁に使用される項目の集計処理を高速に行うようにすることが望まれている。
【0004】
【課題を解決するための手段】
上記の課題は、複数の索引項目と数値データ項目からなる集約元データテーブルに対して、該データテーブルの複数の索引項目のうち任意の索引項目を用いて集約度の異なる集約先データテーブルを記憶するデータベース記憶部と、前記複数のデータテーブルにおける索引項目の関係を記憶するデータベース定義情報記憶部と、前記索引項目をキーにした前記数値データ項目の検索要求に対して、前記データベース定義情報記憶部に基づいて、前記データベース記憶部に記憶されているデータテーブルの検索ルートを求める検索ルート決定手段と前記検索ルート決定手段で指定された検索ルート情報に基づいて、前記データテーブルを検索する検索手段により解決される。

【0005】
【作用】
よく使用される索引項目をキーにした集約度の異なるデータテーブルを予め作成しておき、その集約度の異なる複数個のテーブルとその定義情報をテーブル(ファイル)として記憶しておき、検索ルート決定手段が、この定義情報に基づいて、最適な検索ルートを求めて、データベースの検索を行うようするした。
【0006】
【実施例】
第1図は本発明の一実施例の構成図を示す図である。1は処理装置、3は入力装置、4は表示装置である。2はデータベース等を記憶した外部記憶装置であり、この中には、組織マスタテーブル200、売上データ1テーブル211、売上データ2テーブル212、売上データテーブル213、データベース定義情報ファイル220が格納されている。組織マスタテーブル200には、組織の定義情報が格納されている。売上データ1テーブル211は、組織情報の索引項目と数値項目からなるデータテーブルであり、売上データ2テーブル212および売上データ3テーブル213は売上データ1テーブル211を元に作成された集約度の異なるデータテーブルである。データベース定義情報ファイル220には、各索引項目との関係と各売上データテーブルとの関係が格納されている。
【0007】
また、11は前記データベース定義情報ファイルを作成/更新する手段であり、12は外部記憶装置2内に集約度の異なるテーブルを生成する集約データ生成手段であり、13はデータベース定義情報ファイル220に記憶されている情報に基づいて、最適な検索ルートを求める検索ルート決定手段であり、14は前記検索ルート決定手段13で指定された検索ルート情報に基づいて、データベース(売上データテーブル等)を検索する検索手段である。また、5は外部記憶装置2内のデータベースをアクセスするアプリケーションプログラムであり、データベースへのアクセスは、必要となるデータ項目の項目名を用いて検索の依頼をするものである。本実施例のデータベー スシステムは、アプリケーションから項目名をキーにした集計の要求を受けテ、その項目名から、データベースのアクセスにおいて処理対象となるデータテーブルおよび処理動作を求めて、該当するSQLコマンドを生成し、そのSQLコマンドを用いて、データベースにアクセスする。そして、集計を依頼したアプリケーションプログラムにその結果を通知する。
【0008】
図2は、組織マスタ/売上データテーブルのデータ形式を説明する図である。211は図2の集約元の売上データである売上データ1テーブルであり、担当毎の売上データが格納されており、各担当と売上データ以外に担当の所属する課、支店、支社の識別情報が売上データの同一レコード内に格納されている。担当、課、支店、支社の関係は組織マスタテーブル200に格納されているとおり、支社、支店、課、担当は階層的な関係になっている。すなわち、支社「101」には支店「2001」、「2002」があり、支店「2001」には課「301」、「302」があり、課「301」には担当「401」、「402」、「403」がいることを示している。
【0009】
また、212および213は売上データ1テーブル211を集約した売上データ2テーブルと売上データ3テーブルである。売上データ2テーブル212は支社毎および課毎に、集約元の売上データ1テーブル211を集約したものである。また、集約先データテーブル213は支店毎および課毎に集約したものである。
【0010】
図3は、本発明の一実施例における動作フローを示している。すなわち、最初に集約前のデータテーブル(売上データ1テーブル211)からどの索引項目を用いて集約データテーブルを使用するかを、操作者に入力させ、そして、操作者が入力した情報をデータベース定義情報ファイル220に格納する(S41)。この場合、操作者はよく使用する索引項目を選択する。
【0011】
次に作成されたこのデータベース定義情報ファイル220に基づいて、集約データテーブルを作成する(S42)。また、集約前のデータテーブルの構造に変更が発生した時も、S41と同様に、データベース定義情報ファイルを更新し、再度集約データテーブルを作成しなおす。
次に、アプリケーションプログラムや、キーボード等からのデータベースの検索指示を受信する。データベースの検索指示は集約前データテーブルのどの索引項目名に対応するどの数値項目が欲しいかが指定される(S43)。指定された索引項目名をキーにして、データベース定義情報ファイルを参照し、可能性のある検索ルートのうち、最も早く検索できるルートを決定する(S44)。そして、S44で決定した検索ルートでデータベースを検索する(S45)。
【0012】
図6は、図2中の組織マスタテーブル200とデータテーブル(売上データ1データテーブル211、売上データ2データテーブル212、売上データ3データテーブル213)との関係を記憶したデータベース定義情報ファイル220のデータ形式である。
図6の左から1番目の欄はテーブルを名称の格納している。2番目の欄は各テーブル(組織マスタテーブル以外)の行数を記憶しており、集約前データテーブル211は7500行(レコード)あり、集約後データテーブル212および213は250行あることを示している。この欄は、データ創成時又は、データ更新時に自動的に更新されるものである。
【0013】
3番目以降の欄は、各テーブル内の項目毎の情報であり、3番目は項目名、4番目は組織マスタテーブルの項目のうち、下位情報を有するものか否かを示す。5番目の「カラム」は各テーブルにおける各項目の位置を示している。
6番目の「経由先」の欄はその項目が組織マスタテーブルのどの項目から間接的に求めることができるかを示しており、例えば支社のデータは支店情報(「C2」)から求められることが示されている。
【0014】
7番目の「リンク先」の欄はその項目のデータ(売上データ)を抽出する時に使用可能なテーブル名およびカラム名が格納されており、例えば、第1行目は、支社毎の売上データが集約前データテーブルのカラムC1に基づいて、抽出できることが示されている。この欄の情報は、売上データの項目名と組織マスタテーブルの項目名と比較をしていき、同一のものがあった時に対応するテーブル名とカラム名を格納する処理により作成されるものである。また、このように自動的に設定せずに、操作者が自ら設定しても良い。
【0015】
8番目の「タイプ」の欄は各データ項目のデータタイプを示しているおり、「X」は文字項目であることを示し、「9」は数値項目であることを示している。9番目の欄は各データ項目の桁数が格納されており、例えば、第1行目の支社情報は3桁のデータであることを示す。
集約後データテーブルの定義については、操作者が、図7にある画面を用いて、どの索引項目について集約先のデータテーブルを作成するかの定義をした際に、格納される。
【0016】
図7は、どの索引項目を用いて集約データテーブルを作成するかを操作者に指定させる処理における、その指定画面を示している。図6に示したデータベース定義情報ファイル220内に格納されている集約元のデータテーブルに対応して、指定可能な項目が表示され、すでに定義されている集約データテーブルがあれば、指定した項目に「○」が付されて表示される。
【0017】
図中の横のカラムは集約データテーブルの識別番号を示しており、「01」は集約元のデータテーブルである売上データ1テーブル211を示しており、「02」、「03」はそれぞれ、は集約先のデータテーブルである売上データ2テーブル212、と売上データ3テーブル213を示している。例えば、「02」では「支社」、「課」の項目で「売上金額」の集約データを作成することを示している。ここで指定された内容は図6のデータベース定義情報ファイル220に格納される。
【0018】
操作者の指定により、作成または更新されたデータベース定義情報ファイル220に基づいて、データテーブル作成の処理(図3のS42)を、図4のデータテーブル作成処理のフローチャートを用いて説明する。作成また更新されたデータテーブルの定義情報(データベース定義情報ファイル220内)があるかを判定しあれば次の処理を行う。作成またさ更新されたデータテーブルの定義情報を取り出し、すなわち、どの項目で集計すべきかの情報を取り出す。そして、取り出した項目で集約元のデータテーブル(売上データ1テーブル211)内のレコードをソートし、ソートしたレコードを順に読み出し、同じ項目で同じデータを有するレコードの売上データの合計をしていくことで、新たなデータテーブル(集約先のデータテーブル)のレコードを作成していく。
【0019】
次に、図3におけるS43以降の処理を説明する。支店毎の売上データを求める場合について説明する。支店毎の売上データの要求を受けると、図6で詳細を示したデータベース定義情報ファイル220を参照して、探索可能なルートを算出する。
まず、データベース定義情報ファイル220の中において、組織マスタテーブルに関係するレコードで、支店を定義したレコードを求める。
【0020】
そして、このレコード中の「リンク先テーブル名/カラム名」の欄から2つの検索ルート(「売上データ1/C2」と「売上データ3/C1」)を求める。これから、図8の(a) と(b) のSQLコマンドが求められる。
つぎには、「経由先」の欄から間接的に求めることができる項目名を求める。「経由先」には「C3」とあることから「課」の項目が選択され、この選択した項目の「リンク先テーブル名/カラム名」の欄から3つの検索ルート(「売上データ1/C3」と「売上データ2/C2」と「売上データ3/C2」)を求める。これから、図8の(c) 、(d) 、(e) のSQLコマンドが求められる。
【0021】
さらに、「課」の「経由先」の欄から間接的に求めることができる項目名を求める。「経由先」には「C4」とあることから「担当」の項目が選択され、この選択した項目の「リンク先テーブル名/カラム名」の欄から1つの検索ルート(「売上データ1」)を求める。これから、図8の(f) のSQLコマンドが求めれる。
【0022】
更に、組織マスタテーブルに関係するレコードで支店を定義したレコードの『リンク先テーブル名/カラム名』の欄に記述されたテーブル名とカラム名に一致するものをデータベース定義情報ファイル220の中から探すと、双方の項目名が一致する。すなわち、一致する場合には、組織マスタを用いる必要がないため、売上データテーブルからのみ集計データの抽出が可能と
なる。この例では、図8の(a) および(b) より、図8の(g) および(h) が求まる。
【0023】
この求められた検索ルートのうち、以下の基準で最適なルートを決定する。
以下は基準の優先順位が高い順に並べてある。(但し、優先順位はデータベースの構造、データ量、コードの特性等により変更可能であり、データ ベースの特性を生かせる様になっている)
(1)直接検索である。
【0024】
(2)テーブル間のリンク数が少ない
(3)テーブルのカラム数が少ない
(4)行数が少ないテーブル
(5)行長の短いテーブル
(6)テーブルの容量が少ない
(7)テーブル上のキー項目が少ないテーブルを使用している
(8)使用するマスタ項目の中で最下位に位置するマスタ項目より下位の キー項目の数が少ないテーブルを使用している。
以下に各基準について説明する。
(1)直接検索である
直接検索とは組織マスタを使用せずにデータテーブルのみで検索可能かという意味である。この図5の例では(g) と(h) が該当する。
(2)テーブル間のリンクの数が少ない
例えば、図8の(a) の『組織マスタ・支店→売上データ1・支店』の『→』がリンクに該当し、図5の(a) 、(b) は1個であり、(c) 、(d) 、(e) は2個、(f) は3個、(g) 、(h) は0となる、(1)で選択された(g) と(h) ではリンク数では1つに絞りこむことができない。
(3)テーブルのカラム数が少ない
データベース定義情報ファイル220の項目名の欄を参照し、各テーブルで項目が幾つあるかにより求めることができる。この例では、(g) のカラムは5で(h) は3であるため、(h) が検索ルートとして選択される。
(4)行数が少ないテーブル
この基準についても、データベース定義情報ファイル220の行数の欄を参照し、各テーブルが何行のレコードより構成されるかを見る。売上データ1テーブル211の場合は、7500行であり、売上データ2テーブル212の場合は250行である。
(5)行長の短いテーブル
データベース定義情報ファイル220の桁数の欄を参照し、各テーブルで各項目の桁数の総和を算出する。
(6)テーブルの容量が少ない
(4)および(5)の結果を掛け算することより、テーブルの容量を求める。
(7)テーブル上のキー項目が少ないテーブルを使用している
また、図5の例ではキー項目(索引項目)は複数あるが数値項目が1個しかない例であるが、数値項目が複数個ある場合を考慮したものであり、(3)は全体の項目数であるのに対し、これは、キー項目の数である。
(8)使用するマスタ項目の中で最下位に位置するマスタ項目より下位のキ ー項目の数が少ないテーブルを使用している。
複数の集約テーブルが、検索対象と成り得る事が判明したとき、使用するマスタ項目(この例では支店)より下位のキー項目数が少ない方が集約度が高い(テーブル上のレコード件数が少ない)可能性が多分にある為、その テーブルを使用して検索を行う様にするものである。
【0025】
【発明の効果】
以上説明したように、データべース構造を定義したファイルの修正のみで、従来のアプリケーションプログラムの修正を行う必要がなく、最適な検索ルートでデータ抽出を行うことができる。
【図面の簡単な説明】
【図1】本発明の一実施例の構成図
【図2】組織マスタ/売上データテーブルのテータ形式
【図3】本発明の一実施例における動作フロー
【図4】データテーブル作成処理のフローチャート
【図5】検索ルート決定処理のフローチャート
【図6】データベース定義情報ファイルのデータ形式
【図7】集約テーブルの指定画面の例
【図8】生成されるSQLコマンドを説明する図
【符号の説明】
1 処理装置
2 外部記憶装置
3 入力装置
4 表示装置
5 アプリケーションプログラム
11 データベース定義手段
12 集約データ作成手段
13 検索ルート決定手段
14 検索手段
200 組織マスタテーブル
211 売上データ1テーブル
212 売上データ2テーブル
213 売上データ3テーブル
220 データベース定義情報ファイル
[0001]
[Industrial applications]
The present invention relates to a process for obtaining a total value (for example, a sum) of numerical items for a specified index item from a data table having a plurality of index items and numerical items in a database system.
[0002]
[Prior art]
As described above, when calculating a total value of data from a data table having a plurality of index items and numerical values, the same search is executed again from one data table even in a frequently performed totaling process.
[0003]
[Problems to be solved by the invention]
Since the operator knows in advance which items are frequently used in the tallying process, it is desired to perform the tallying process for frequently used items at high speed.
[0004]
[Means for Solving the Problems]
The above-described problem is that, for an aggregation source data table including a plurality of index items and numerical data items, an aggregation destination data table having a different degree of aggregation is stored using an arbitrary index item among the plurality of index items of the data table. A database definition information storage unit that stores a relationship between index items in the plurality of data tables; and a database definition information storage unit that responds to a search request for the numerical data item using the index item as a key. Search route determining means for obtaining a search route of the data table stored in the database storage unit based on the search route, and a search means for searching the data table based on the search route information designated by the search route determining means. Will be resolved.

[0005]
[Action]
Data tables with different degrees of aggregation are created in advance using frequently used index items as keys, and a plurality of tables with different degrees of aggregation and their definition information are stored as a table (file) to determine a search route. The means searches the database for the optimum search route based on the definition information.
[0006]
【Example】
FIG. 1 is a diagram showing the configuration of an embodiment of the present invention. 1 is a processing device, 3 is an input device, and 4 is a display device. Reference numeral 2 denotes an external storage device storing a database and the like, in which an organization master table 200, a sales data 1 table 211, a sales data 2 table 212, a sales data table 213, and a database definition information file 220 are stored. . The organization master table 200 stores organization definition information. The sales data 1 table 211 is a data table including index items and numerical values of organization information. The sales data 2 table 212 and the sales data 3 table 213 are data created based on the sales data 1 table 211 and having different degrees of aggregation. It is a table. The database definition information file 220 stores the relationship between each index item and each sales data table.
[0007]
Reference numeral 11 denotes a unit for creating / updating the database definition information file, reference numeral 12 denotes an aggregated data generation unit for generating tables having different degrees of aggregation in the external storage device 2, and reference numeral 13 denotes a unit stored in the database definition information file 220. Search route determining means for finding an optimal search route based on the information entered is searched for in a database (sales data table or the like) based on the search route information specified by the search route determining means 13. Search means. Reference numeral 5 denotes an application program for accessing a database in the external storage device 2, and for accessing the database, a search request is made using an item name of a necessary data item. The database system according to the present embodiment receives a request for aggregation using an item name as a key from an application, obtains a data table to be processed in a database access and a processing operation from the item name, and obtains a corresponding SQL. A command is generated, and the database is accessed using the SQL command. Then, the result is notified to the application program requesting the tally.
[0008]
FIG. 2 is a diagram illustrating the data format of the organization master / sales data table. Reference numeral 211 denotes a sales data 1 table which is sales data of the aggregation source in FIG. 2, and stores sales data for each charge. Stored in the same record of sales data. As the relationship among the responsible, section, branch, and branch is stored in the organization master table 200, the branch, branch, section, and responsible are in a hierarchical relationship. That is, the branch office “101” has branches “2001” and “2002”, the branch “2001” has sections “301” and “302”, and the section “301” is responsible for “401” and “402”. , "403".
[0009]
Reference numerals 212 and 213 denote a sales data 2 table and a sales data 3 table in which the sales data 1 table 211 is consolidated. The sales data 2 table 212 is a collection of the aggregation source sales data 1 table 211 for each branch office and each section. The aggregation destination data table 213 is an aggregation for each branch and each section.
[0010]
FIG. 3 shows an operation flow in one embodiment of the present invention. That is, first, the operator is required to input which index item is to be used from the data table (sales data 1 table 211) before aggregation to use the aggregated data table, and the information input by the operator is entered into the database definition information. It is stored in the file 220 (S41). In this case, the operator selects a frequently used index item.
[0011]
Next, an aggregate data table is created based on the created database definition information file 220 (S42). Also, when a change occurs in the structure of the data table before aggregation, similarly to S41, the database definition information file is updated, and the aggregated data table is created again.
Next, a database search instruction from an application program or a keyboard is received. The database search instruction specifies which numerical item corresponding to which index item name in the pre-aggregation data table is desired (S43). Using the specified index item name as a key, the database definition information file is referred to, and a search route that can be searched earliest among the possible search routes is determined (S44). Then, the database is searched using the search route determined in S44 (S45).
[0012]
FIG. 6 shows the data of the database definition information file 220 storing the relationship between the organization master table 200 and the data tables (sales data 1 data table 211, sales data 2 data table 212, sales data 3 data table 213) in FIG. Format.
The first column from the left in FIG. 6 stores the name of the table. The second column stores the number of rows of each table (other than the organization master table), indicating that the pre-aggregation data table 211 has 7,500 rows (records) and the post-aggregation data tables 212 and 213 have 250 rows. I have. This column is automatically updated when data is created or data is updated.
[0013]
The third and subsequent columns are information for each item in each table, the third indicates the item name, and the fourth indicates whether or not the item in the organization master table has lower-level information. The fifth “column” indicates the position of each item in each table.
The sixth “transit-to” column indicates from which item of the organization master table the item can be obtained indirectly. For example, data of a branch office may be obtained from branch information (“C2”). It is shown.
[0014]
The seventh “link destination” column stores table names and column names that can be used when extracting data (sales data) of the item. For example, the first line contains sales data for each branch office. This indicates that extraction can be performed based on the column C1 of the pre-aggregation data table. The information in this column is created by comparing the item name of the sales data with the item name of the organization master table, and storing the corresponding table name and column name when there is the same item. . Further, instead of the automatic setting, the operator may set the information by himself.
[0015]
The eighth “type” column indicates the data type of each data item, “X” indicates a character item, and “9” indicates a numerical item. The ninth column stores the number of digits of each data item, and indicates, for example, that the branch information in the first row is three-digit data.
The definition of the post-aggregation data table is stored when the operator uses the screen shown in FIG. 7 to define which index item should be used to create the aggregation destination data table.
[0016]
FIG. 7 shows a designation screen in a process of causing the operator to designate which index item is used to create the aggregated data table. Items that can be specified are displayed corresponding to the aggregation source data table stored in the database definition information file 220 shown in FIG. 6, and if there is an already defined aggregation data table, the specified item is displayed. "O" is displayed.
[0017]
The horizontal column in the figure indicates the identification number of the aggregated data table, “01” indicates the sales data 1 table 211 that is the data table of the aggregation source, and “02” and “03” indicate A sales data 2 table 212 and a sales data 3 table 213, which are data tables at the aggregation destination, are shown. For example, “02” indicates that consolidated data of “sales amount” is created in the items of “branch office” and “section”. The contents specified here are stored in the database definition information file 220 of FIG.
[0018]
The data table creation process (S42 in FIG. 3) will be described with reference to the data table creation process flowchart in FIG. 4 based on the database definition information file 220 created or updated by the operator's designation. If it is determined whether there is definition information (in the database definition information file 220) of the created or updated data table, the following processing is performed. The definition information of the created or updated data table is extracted, that is, information on which items should be totaled. Then, the records in the data table of the aggregation source (sales data 1 table 211) are sorted by the extracted items, the sorted records are sequentially read, and the sum of the sales data of the records having the same data in the same items is calculated. Then, records of a new data table (data table of an aggregation destination) are created.
[0019]
Next, processing after S43 in FIG. 3 will be described. A case in which sales data for each branch is obtained will be described. When a request for sales data for each branch is received, a searchable route is calculated with reference to the database definition information file 220 shown in detail in FIG.
First, in the database definition information file 220, a record related to the organization master table that defines a branch is obtained.
[0020]
Then, two search routes (“sales data 1 / C2” and “sales data 3 / C1”) are obtained from the “link destination table name / column name” column in this record. From this, the SQL commands shown in FIGS. 8A and 8B are obtained.
Next, an item name that can be obtained indirectly is obtained from the “transit destination” column. The item “section” is selected because “C3” is included in the “transit destination”, and three search routes (“sales data 1 / C3”) are selected from the “link destination table name / column name” column of the selected item. , “Sales data 2 / C2” and “sales data 3 / C2”). From this, the SQL commands (c), (d), and (e) of FIG. 8 are obtained.
[0021]
Further, an item name that can be obtained indirectly is obtained from the column of “section” of “section”. Since "C4" is displayed in "Destination", the item "Responsible" is selected, and one search route ("Sales data 1") is selected from the "Link destination table name / column name" column of the selected item. Ask for. From this, the SQL command shown in FIG. 8 (f) is obtained.
[0022]
Further, the database definition information file 220 is searched for a record corresponding to the organization master table that matches the table name and column name described in the “link destination table name / column name” column of the record defining the branch. And both item names match. That is, if they match, it is not necessary to use the organization master, so that the total data can be extracted only from the sales data table. In this example, (g) and (h) in FIG. 8 are obtained from (a) and (b) in FIG.
[0023]
An optimum route is determined from the obtained search routes based on the following criteria.
The following are arranged in descending order of reference priority. (However, the priority can be changed according to the structure of the database, the amount of data, the characteristics of the code, etc., so that the characteristics of the database can be used.)
(1) Direct search.
[0024]
(2) The number of links between tables is small (3) The number of columns in the table is small (4) The table with few rows (5) The table with short row length (6) The capacity of the table is small (7) The key on the table Uses a table with a small number of items (8) Uses a table with a small number of key items below the lowest master item among the master items used.
Hereinafter, each standard will be described.
(1) The direct search, which is a direct search, means whether or not a search can be performed using only the data table without using the organization master. In the example of FIG. 5, (g) and (h) correspond.
(2) The number of links between tables is small. For example, “→” in “organization master / branch → sales data 1 / branch” in FIG. 8A corresponds to the link, and FIG. b) is one, (c), (d), and (e) are two, (f) is three, and (g) and (h) are zero. In (g) and (h), the number of links cannot be reduced to one.
(3) The number of items in each table can be determined by referring to the item name column of the database definition information file 220 having a small number of columns in the table. In this example, since the column of (g) is 5 and (h) is 3, (h) is selected as the search route.
(4) Tables with a Small Number of Rows Also for this criterion, refer to the row number row of the database definition information file 220 to see how many rows each table is composed of. The sales data 1 table 211 has 7,500 rows, and the sales data 2 table 212 has 250 rows.
(5) Refer to the column of the number of digits in the table database definition information file 220 having a short line length, and calculate the total number of digits of each item in each table.
(6) The capacity of the table is obtained by multiplying the results of (4) and (5) where the capacity of the table is small.
(7) A table with a small number of key items is used. In the example of FIG. 5, there are a plurality of key items (index items) but only one numerical item. Considering a certain case, (3) is the total number of items, whereas this is the number of key items.
(8) A table is used in which the number of lower-level key items is lower than that of the lowest-ranked master item.
When it is found that multiple aggregation tables can be searched, the lower the number of key items below the used master item (in this example, the branch), the higher the degree of aggregation (the number of records on the table is small) Since there is a lot of possibility, search is performed using the table.
[0025]
【The invention's effect】
As described above, it is not necessary to modify the conventional application program only by modifying the file defining the database structure, and the data can be extracted with the optimal search route.
[Brief description of the drawings]
FIG. 1 is a block diagram of an embodiment of the present invention. FIG. 2 is a data format of an organization master / sales data table. FIG. 3 is an operation flow in an embodiment of the present invention. FIG. 5 is a flowchart of a search route determination process. FIG. 6 is a data format of a database definition information file. FIG. 7 is an example of a designation screen of an aggregation table. FIG. 8 is a diagram for explaining generated SQL commands.
REFERENCE SIGNS LIST 1 processing device 2 external storage device 3 input device 4 display device 5 application program 11 database definition means 12 aggregated data creation means 13 search route determination means 14 search means 200 organization master table 211 sales data 1 table 212 sales data 2 table 213 sales data 3 table 220 Database definition information file

Claims (3)

複数の索引項目と数値データ項目からなる集約元データテーブルと、該集約元データテーブルの複数の索引項目のうち少なくとも一つ以上の索引項目を有し、該集約元データテーブルと集約度の異なる集約先データテーブルとを記憶するデータベース記憶部と、
前記データベース記憶部に記憶された複数のデータテーブルと索引項目の関係を記憶するデータベース定義情報記憶部と、
前記索引項目をキーにした前記数値データ項目の検索要求に対して、前記データベース定義情報記憶部に基づいて、前記データベース記憶部に記憶されているデータテーブルの検索ルートのうち最適なものを求める検索ルート決定手段と
前記検索ルート決定手段で指定された検索ルート情報に基づいて、データテーブルを検索する検索手段とを備えたことを特徴とするデータベースシステム。
An aggregation source data table including a plurality of index items and numeric data items, and at least one or more index items among the plurality of index items of the aggregation source data table, and aggregation having a different aggregation degree from the aggregation source data table. A database storage unit for storing a destination data table;
A database definition information storage unit that stores a relationship between a plurality of data tables and index items stored in the database storage unit,
In response to a search request for the numerical data item using the index item as a key, a search for finding an optimal search route among search routes of a data table stored in the database storage unit based on the database definition information storage unit Route determination means and
A search unit for searching a data table based on the search route information specified by the search route determination unit .
前記データベース定義情報記憶部は、前記複数の索引項目間の関係を記憶し、該情報に基づいて、前記検索ルート決定手段が検索ルートを決定することを特徴とする請求項1記載のデータベースシステム。2. The database system according to claim 1, wherein the database definition information storage unit stores a relationship between the plurality of index items, and the search route determination unit determines a search route based on the information. 入力装置からの前記集約元データとその索引項目の指定に基づいて、前記集約先データテーブルを生成し、この生成する集約先データテーブルの構成情報を前記データベース定義記憶部に登録する集約データ生成手段を備えたことを特徴とする請求項1乃至2記載のデータベースシステム。Aggregate data generation means for generating the aggregation destination data table based on the specification of the aggregation source data and its index item from the input device, and registering the configuration information of the generated aggregation destination data table in the database definition storage unit The database system according to claim 1, further comprising:
JP13245495A 1995-05-30 1995-05-30 Database system Expired - Fee Related JP3552339B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13245495A JP3552339B2 (en) 1995-05-30 1995-05-30 Database system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13245495A JP3552339B2 (en) 1995-05-30 1995-05-30 Database system

Publications (2)

Publication Number Publication Date
JPH08329101A JPH08329101A (en) 1996-12-13
JP3552339B2 true JP3552339B2 (en) 2004-08-11

Family

ID=15081739

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13245495A Expired - Fee Related JP3552339B2 (en) 1995-05-30 1995-05-30 Database system

Country Status (1)

Country Link
JP (1) JP3552339B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10301935A (en) * 1997-04-22 1998-11-13 Mitsubishi Electric Corp Data processing method
JP2000137748A (en) * 1998-11-04 2000-05-16 Akuatekku:Kk Integration system management device
JP2001155028A (en) * 1999-11-29 2001-06-08 Hitachi Ltd Aggregate calculation processing method and device for relational database, and computer readable recording medium recorded with aggregate arithmetic processing program
JP2001256242A (en) * 2000-03-08 2001-09-21 Information Services International Dentsu Ltd Data processing supporting system, system and method for processing data
US7584205B2 (en) * 2005-06-27 2009-09-01 Ab Initio Technology Llc Aggregating data with complex operations
JP2012104987A (en) * 2010-11-09 2012-05-31 Fuji Xerox Co Ltd Log arrangement device and program
EP2490135A1 (en) 2011-02-21 2012-08-22 Amadeus S.A.S. Method and system for providing statistical data from a data warehouse

Also Published As

Publication number Publication date
JPH08329101A (en) 1996-12-13

Similar Documents

Publication Publication Date Title
EP1393206B1 (en) Data structure for information systems
US5765167A (en) Data file update processing apparatus
US5933796A (en) Data extracting system based on characteristic quantities of data distribution
JPH0475170A (en) Data base operation system
US20040078355A1 (en) Information management system
JP3552339B2 (en) Database system
JP2842487B2 (en) Data editing method
JPH08305724A (en) Device for managing design supporting information document
US20070255746A1 (en) Method for Processing Associated Software Data
WO2000014654A1 (en) Database, and methods of data storage and retrieval
JP2939841B2 (en) Database search device
EP1815439A2 (en) Method and apparatus for interface for graphic display of data from a kstore
JPH10177584A (en) Document retrieval system
JP2760755B2 (en) Method of storing and redisplaying the operation button history for computer processing
JP2775637B2 (en) Transaction data processing device
JPH0330069A (en) File managing device
JP3031944B2 (en) Data processing device
JP2022150482A (en) Data retrieval device, data retrieval method and data retrieval program
JPH04559A (en) Data retrieving system
JPH04337867A (en) Data base retrieval system
JPH03166647A (en) Function index control system
JPH04230576A (en) Method for retrieving record
JPH07192012A (en) Multi-stage list data handling device
JPH0224715A (en) Film processor
JPH0444166A (en) Retrieval management system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040304

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040426

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080514

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090514

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees