JPH08329101A - Data base system - Google Patents

Data base system

Info

Publication number
JPH08329101A
JPH08329101A JP7132454A JP13245495A JPH08329101A JP H08329101 A JPH08329101 A JP H08329101A JP 7132454 A JP7132454 A JP 7132454A JP 13245495 A JP13245495 A JP 13245495A JP H08329101 A JPH08329101 A JP H08329101A
Authority
JP
Japan
Prior art keywords
data
database
item
items
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.)
Granted
Application number
JP7132454A
Other languages
Japanese (ja)
Other versions
JP3552339B2 (en
Inventor
Riyouichi Sawada
良一 佐和田
Shiro Tamaya
史郎 玉谷
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

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE: To quickly execute totalizing processing for items to be frequently used by providing this data base system with a data base storing part, a data base definition information storing part and a retrieval route determining means. CONSTITUTION: At first which index item in an unsummarized data table (sales data 1 table 211) is used for a summarized data table is inputted by an operator and the inputted information is stored in a data base definition information file 220. Then the summarized data table is prepared based upon the file 220. At the time of receiving a data base retrieval instruction from an application program, a keyboard or the like, a retrieval route determining means 13 refers to the file 220 by using a specified index item name as a key and determines a route to be retrieved most quickly. Then a retrieving means 14 retrieves the data base based upon the determined retrieval route.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、データベースシステム
において、複数の索引項目と数値項目を有するデータテ
ーブルから指定された索引項目に対する数値項目の集計
値(例えば総和)を求める処理に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention 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】[0002]

【従来の技術】前記のような、複数の索引項目と数値項
目を有するデータテーブルからデータの集計値を求める
場合、頻繁に行う集計処理であっても、一つのデータテ
ーブルから同じ検索を再度実行していた。
2. Description of the Related Art When obtaining a total value of data from a data table having a plurality of index items and numerical items as described above, the same search is performed again from one data table even if the data is frequently aggregated. Was.

【0003】[0003]

【発明が解決しようとしている課題】どの項目が頻繁に
集計処理に使用されるか、予め操作者にはわかっている
ことから、頻繁に使用される項目の集計処理を高速に行
うようにすることが望まれている。
Since the operator knows in advance which items are frequently used in the totaling process, it is necessary to perform the totalizing process of frequently used items at high speed. Is desired.

【0004】[0004]

【課題を解決するための手段】上記の課題は、複数の索
引項目と数値データ項目からなる集約元データテーブル
に対して、該データテーブルの複数の索引項目のうち任
意の索引項目を用いて集約度の異なる集約先データテー
ブルを記憶するデータベース記憶部と、前記複数のデー
タテーブルにおける索引項目の関係を記憶するデータベ
ース定義情報記憶部と、前記索引項目をキーにした前記
数値データ項目の検索要求に対して、前記データベース
定義情報記憶部に基づいて、前記データベース記憶部に
記憶されているデータテーブルの検索ルートを求める検
索ルート決定手段により解決される。
[Means for Solving the Problems] The above-mentioned problems are solved by using an arbitrary index item of a plurality of index items of the data table for an aggregation source data table composed of a plurality of index items and numerical data items. A database storage unit that stores aggregation destination data tables with different degrees, a database definition information storage unit that stores the relationship between index items in the plurality of data tables, and a search request for the numerical data item with the index item as a key. On the other hand, the problem is solved by the search route determining means for obtaining the search route of the data table stored in the database storage unit based on the database definition information storage unit.

【0005】[0005]

【作用】よく使用される索引項目をキーにした集約度の
異なるデータテーブルを予め作成しておき、その集約度
の異なる複数個のテーブルとその定義情報をテーブル
(ファイル)として記憶しておき、検索ルート決定手段
が、この定義情報に基づいて、最適な検索ルートを求め
て、データベースの検索を行うようするした。
[Function] A data table having different degrees of aggregation is created in advance using frequently used index items as keys, and a plurality of tables having different degrees of aggregation and their definition information are stored as a table (file), The search route determining means searches the database for the optimum search route based on this definition information.

【0006】[0006]

【実施例】第1図は本発明の一実施例の構成図を示す図
である。1は処理装置、3は入力装置、4は表示装置で
ある。2はデータベース等を記憶した外部記憶装置であ
り、この中には、組織マスタテーブル200、売上デー
タ1テーブル211、売上データ2テーブル212、売
上データテーブル213、データベース定義情報ファイ
ル220が格納されている。組織マスタテーブル200
には、組織の定義情報が格納されている。売上データ1
テーブル211は、組織情報の索引項目と数値項目から
なるデータテーブルであり、売上データ2テーブル21
2および売上データ3テーブル213は売上データ1テ
ーブル211を元に作成された集約度の異なるデータテ
ーブルである。データベース定義情報ファイル220に
は、各索引項目との関係と各売上データテーブルとの関
係が格納されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a diagram showing the configuration of an embodiment of the present invention. Reference numeral 1 is a processing device, 3 is an input device, and 4 is a display device. Reference numeral 2 denotes an external storage device that stores a database and the like, and stores 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. . Organization master table 200
The definition information of the organization is stored in. Sales data 1
The table 211 is a data table including index items and numerical items of organization information, and the sales data 2 table 21.
2 and the sales data 3 table 213 are data tables created based on the sales data 1 table 211 and having different degrees of integration. The database definition information file 220 stores the relationship with each index item and the relationship with each sales data table.

【0007】また、11は前記データベース定義情報フ
ァイルを作成/更新する手段であり、12は外部記憶装
置2内に集約度の異なるテーブルを生成する集約データ
生成手段であり、13はデータベース定義情報ファイル
220に記憶されている情報に基づいて、最適な検索ル
ートを求める検索ルート決定手段であり、14は前記検
索ルート決定手段13で指定された検索ルート情報に基
づいて、データベース(売上データテーブル等)を検索
する検索手段である。また、5は外部記憶装置2内のデ
ータベースをアクセスするアプリケーションプログラム
であり、データベースへのアクセスは、必要となるデー
タ項目の項目名を用いて検索の依頼をするものである。
本実施例のデータベー スシステムは、アプリケーショ
ンから項目名をキーにした集計の要求を受けテ、その項
目名から、データベースのアクセスにおいて処理対象と
なるデータテーブルおよび処理動作を求めて、該当する
SQLコマンドを生成し、そのSQLコマンドを用い
て、データベースにアクセスする。そして、集計を依頼
したアプリケーションプログラムにその結果を通知す
る。
Reference numeral 11 is a means for creating / updating the database definition information file, 12 is an aggregate data generating means for producing tables with different degrees of integration in the external storage device 2, and 13 is a database definition information file. Reference numeral 14 is a search route determining means for obtaining an optimum search route based on the information stored in 220, and 14 is a database (sales data table or the like) based on the search route information designated by the search route determining means 13. Is a search means for searching. Reference numeral 5 is an application program for accessing a database in the external storage device 2. Accessing the database is a request for a search using the item name of a required data item.
The database system of the present embodiment receives a request for tabulation from an application using an item name as a key, obtains a data table and a processing operation to be processed in database access from the item name, and then applies the corresponding SQL. Generate a command and use the SQL command to access the database. Then, the result is notified to the application program requesting the tabulation.

【0008】図2は、組織マスタ/売上データテーブル
のデータ形式を説明する図である。211は図2の集約
元の売上データである売上データ1テーブルであり、担
当毎の売上データが格納されており、各担当と売上デー
タ以外に担当の所属する課、支店、支社の識別情報が売
上データの同一レコード内に格納されている。担当、
課、支店、支社の関係は組織マスタテーブル200に格
納されているとおり、支社、支店、課、担当は階層的な
関係になっている。すなわち、支社「101」には支店
「2001」、「2002」があり、支店「2001」
には課「301」、「302」があり、課「301」に
は担当「401」、「402」、「403」がいること
を示している。
FIG. 2 is a diagram for explaining the data format of the organization master / sales data table. Reference numeral 211 denotes a sales data 1 table, which is the sales data of the aggregation source in FIG. 2, in which sales data for each person in charge is stored. In addition to each person in charge and sales data, identification information of the section, branch, or branch to which the person in charge belongs is stored. It is stored in the same record of sales data. Responsible,
As the relationship between the division, the branch and the branch is stored in the organization master table 200, the branch, the branch, the section and the person in charge have a hierarchical relationship. That is, the branch office "101" has branch offices "2001" and "2002", and the branch office "2001".
Indicates that there are sections “301” and “302”, and that section “301” has persons “401”, “402”, and “403” in charge.

【0009】また、212および213は売上データ1
テーブル211を集約した売上データ2テーブルと売上
データ3テーブルである。売上データ2テーブル212
は支社毎および課毎に、集約元の売上データ1テーブル
211を集約したものである。また、集約先データテー
ブル213は支店毎および課毎に集約したものである。
Further, 212 and 213 are sales data 1
It is a sales data 2 table and a sales data 3 table in which the table 211 is integrated. Sales data 2 table 212
Is an aggregation source of the sales data 1 table 211 for each branch office and each section. The aggregation destination data table 213 is aggregated for each branch and each section.

【0010】図3は、本発明の一実施例における動作フ
ローを示している。すなわち、最初に集約前のデータテ
ーブル(売上データ1テーブル211)からどの索引項
目を用いて集約データテーブルを使用するかを、操作者
に入力させ、そして、操作者が入力した情報をデータベ
ース定義情報ファイル220に格納する(S41)。こ
の場合、操作者はよく使用する索引項目を選択する。
FIG. 3 shows an operation flow in one embodiment of the present invention. That is, first, the operator is made to input which index item is used from the data table before aggregation (sales data 1 table 211) to use the aggregated data table, and the information entered by the operator is used as the database definition information. It is stored in the file 220 (S41). In this case, the operator selects a frequently used index item.

【0011】次に作成されたこのデータベース定義情報
ファイル220に基づいて、集約データテーブルを作成
する(S42)。また、集約前のデータテーブルの構造
に変更が発生した時も、S41と同様に、データベース
定義情報ファイルを更新し、再度集約データテーブルを
作成しなおす。次に、アプリケーションプログラムや、
キーボード等からのデータベースの検索指示を受信す
る。データベースの検索指示は集約前データテーブルの
どの索引項目名に対応するどの数値項目が欲しいかが指
定される(S43)。指定された索引項目名をキーにし
て、データベース定義情報ファイルを参照し、可能性の
ある検索ルートのうち、最も早く検索できるルートを決
定する(S44)。そして、S44で決定した検索ルー
トでデータベースを検索する(S45)。
Next, an integrated data table is created based on the created database definition information file 220 (S42). Also, when the structure of the data table before aggregation is changed, the database definition information file is updated and the aggregated data table is created again, as in S41. Next, the application program,
Receives database search instructions from the keyboard. The database search instruction specifies which numerical item corresponding to which index item name in the data table before aggregation is desired (S43). Using the designated index item name as a key, the database definition information file is referenced to determine the earliest possible search route among the possible search routes (S44). Then, the database is searched by the search route determined in S44 (S45).

【0012】図6は、図2中の組織マスタテーブル20
0とデータテーブル(売上データ1データテーブル21
1、売上データ2データテーブル212、売上データ3
データテーブル213)との関係を記憶したデータベー
ス定義情報ファイル220のデータ形式である。図6の
左から1番目の欄はテーブルを名称の格納している。2
番目の欄は各テーブル(組織マスタテーブル以外)の行
数を記憶しており、集約前データテーブル211は75
00行(レコード)あり、集約後データテーブル212
および213は250行あることを示している。この欄
は、データ創成時又は、データ更新時に自動的に更新さ
れるものである。
FIG. 6 shows an organization master table 20 shown in FIG.
0 and data table (sales data 1 data table 21
1, sales data 2 data table 212, sales data 3
This is the data format of the database definition information file 220 that stores the relationship with the data table 213). The first column from the left in FIG. 6 stores the table names. Two
The second column stores the number of rows in each table (other than the organization master table), and the pre-aggregation data table 211 has 75 rows.
00 rows (records), data table 212 after aggregation
And 213 indicate that there are 250 lines. This field is automatically updated when the data is created or updated.

【0013】3番目以降の欄は、各テーブル内の項目毎
の情報であり、3番目は項目名、4番目は組織マスタテ
ーブルの項目のうち、下位情報を有するものか否かを示
す。5番目の「カラム」は各テーブルにおける各項目の
位置を示している。6番目の「経由先」の欄はその項目
が組織マスタテーブルのどの項目から間接的に求めるこ
とができるかを示しており、例えば支社のデータは支店
情報(「C2」)から求められることが示されている。
The third and subsequent columns are information for each item in each table, the third shows the item name and the fourth shows whether or not the item of the organization master table has lower information. The fifth “column” indicates the position of each item in each table. The sixth column of “route destination” indicates from which item of the organization master table the item can be indirectly obtained. For example, branch data may be obtained from branch information (“C2”). It is shown.

【0014】7番目の「リンク先」の欄はその項目のデ
ータ(売上データ)を抽出する時に使用可能なテーブル
名およびカラム名が格納されており、例えば、第1行目
は、支社毎の売上データが集約前データテーブルのカラ
ムC1に基づいて、抽出できることが示されている。こ
の欄の情報は、売上データの項目名と組織マスタテーブ
ルの項目名と比較をしていき、同一のものがあった時に
対応するテーブル名とカラム名を格納する処理により作
成されるものである。また、このように自動的に設定せ
ずに、操作者が自ら設定しても良い。
The 7th "link destination" column stores table names and column names that can be used when the data (sales data) for that item is extracted. For example, the first line shows each branch office. It is shown that the sales data can be extracted based on the column C1 of the data table before aggregation. The information in this column is created by comparing the item names of sales data with the item names of the organization master table and storing the corresponding table name and column name when there is the same item. . Further, the operator may set it by himself instead of setting it automatically.

【0015】8番目の「タイプ」の欄は各データ項目の
データタイプを示しているおり、「X」は文字項目であ
ることを示し、「9」は数値項目であることを示してい
る。9番目の欄は各データ項目の桁数が格納されてお
り、例えば、第1行目の支社情報は3桁のデータである
ことを示す。集約後データテーブルの定義については、
操作者が、図7にある画面を用いて、どの索引項目につ
いて集約先のデータテーブルを作成するかの定義をした
際に、格納される。
The eighth "Type" column indicates the data type of each data item, "X" indicates that it is a character item, and "9" indicates that it is a numerical item. The ninth column stores the number of digits of each data item. For example, the branch office information on the first line indicates that it is three-digit data. For the definition of the data table after aggregation,
It is stored when the operator uses the screen shown in FIG. 7 to define for which index item the data table of the aggregation destination is created.

【0016】図7は、どの索引項目を用いて集約データ
テーブルを作成するかを操作者に指定させる処理におけ
る、その指定画面を示している。図6に示したデータベ
ース定義情報ファイル220内に格納されている集約元
のデータテーブルに対応して、指定可能な項目が表示さ
れ、すでに定義されている集約データテーブルがあれ
ば、指定した項目に「○」が付されて表示される。
FIG. 7 shows the designation screen in the process of letting the operator designate which index item is used to create the aggregated data table. Items that can be specified are displayed corresponding to the data table of the aggregation source stored in the database definition information file 220 shown in FIG. 6, and if there is an already-defined aggregate data table, the items are specified. “○” is added and displayed.

【0017】図中の横のカラムは集約データテーブルの
識別番号を示しており、「01」は集約元のデータテー
ブルである売上データ1テーブル211を示しており、
「02」、「03」はそれぞれ、は集約先のデータテー
ブルである売上データ2テーブル212、と売上データ
3テーブル213を示している。例えば、「02」では
「支社」、「課」の項目で「売上金額」の集約データを
作成することを示している。ここで指定された内容は図
6のデータベース定義情報ファイル220に格納され
る。
The horizontal column in the drawing indicates the identification number of the aggregated data table, and "01" indicates the sales data 1 table 211 which is the aggregation source data table.
“02” and “03” respectively indicate the sales data 2 table 212 and the sales data 3 table 213 which are the data tables of the aggregation destination. For example, “02” indicates that aggregated data of “sales amount” is created for the items “branch” and “section”. The contents specified here are stored in the database definition information file 220 of FIG.

【0018】操作者の指定により、作成または更新され
たデータベース定義情報ファイル220に基づいて、デ
ータテーブル作成の処理(図3のS42)を、図4のデ
ータテーブル作成処理のフローチャートを用いて説明す
る。作成また更新されたデータテーブルの定義情報(デ
ータベース定義情報ファイル220内)があるかを判定
しあれば次の処理を行う。作成またさ更新されたデータ
テーブルの定義情報を取り出し、すなわち、どの項目で
集計すべきかの情報を取り出す。そして、取り出した項
目で集約元のデータテーブル(売上データ1テーブル2
11)内のレコードをソートし、ソートしたレコードを
順に読み出し、同じ項目で同じデータを有するレコード
の売上データの合計をしていくことで、新たなデータテ
ーブル(集約先のデータテーブル)のレコードを作成し
ていく。
The data table creation process (S42 of FIG. 3) based on the database definition information file 220 created or updated by the operator's designation will be described with reference to the data table creation process flowchart of FIG. . If it is determined whether or not 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 taken out, that is, the information of which item should be totaled is taken out. Then, the data table (sales data 1 table 2
The records in 11) are sorted, the sorted records are read in order, and the sales data of the records having the same data in the same item are summed up, so that the records in the new data table (the data table of the aggregation destination) are sorted. Create it.

【0019】次に、図3におけるS43以降の処理を説
明する。支店毎の売上データを求める場合について説明
する。支店毎の売上データの要求を受けると、図6で詳
細を示したデータベース定義情報ファイル220を参照
して、探索可能なルートを算出する。まず、データベー
ス定義情報ファイル220の中において、組織マスタテ
ーブルに関係するレコードで、支店を定義したレコード
を求める。
Next, the processing after S43 in FIG. 3 will be described. A case of obtaining sales data for each branch 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 that defines a branch is obtained from records related to the organization master table.

【0020】そして、このレコード中の「リンク先テー
ブル名/カラム名」の欄から2つの検索ルート(「売上
データ1/C2」と「売上データ3/C1」)を求め
る。これから、図8の(a) と(b) のSQLコマンドが求
められる。つぎには、「経由先」の欄から間接的に求め
ることができる項目名を求める。「経由先」には「C
3」とあることから「課」の項目が選択され、この選択
した項目の「リンク先テーブル名/カラム名」の欄から
3つの検索ルート(「売上データ1/C3」と「売上デ
ータ2/C2」と「売上データ3/C2」)を求める。
これから、図8の(c) 、(d) 、(e) のSQLコマンドが
求められる。
Then, two search routes (“sales data 1 / C2” and “sales data 3 / C1”) are obtained from the column of “link destination table name / column name” in this record. From this, the SQL commands of FIGS. 8A and 8B are obtained. Next, the item name that can be indirectly obtained from the "route destination" field is obtained. "Circle destination" is "C
The item "Division" is selected because there is "3", and three search routes ("Sales data 1 / C3" and "Sales data 2 /" are selected from the "Link destination table name / Column name" column of the selected item. C2 "and" sales data 3 / C2 ").
From this, the SQL commands of (c), (d), and (e) of FIG. 8 are obtained.

【0021】さらに、「課」の「経由先」の欄から間接
的に求めることができる項目名を求める。「経由先」に
は「C4」とあることから「担当」の項目が選択され、
この選択した項目の「リンク先テーブル名/カラム名」
の欄から1つの検索ルート(「売上データ1」)を求め
る。これから、図8の(f) のSQLコマンドが求めれ
る。
Furthermore, an item name that can be indirectly obtained is obtained from the "route destination" column of "section". Since there is "C4" in the "route destination", the "charge" item is selected,
"Link destination table name / column name" of this selected item
One search route (“sales data 1”) is obtained from the column. From this, the SQL command of FIG. 8 (f) is obtained.

【0022】更に、組織マスタテーブルに関係するレコ
ードで支店を定義したレコードの『リンク先テーブル名
/カラム名』の欄に記述されたテーブル名とカラム名に
一致するものをデータベース定義情報ファイル220の
中から探すと、双方の項目名が一致する。すなわち、一
致する場合には、組織マスタを用いる必要がないため、
売上データテーブルからのみ集計データの抽出が可能と
なる。この例では、図8の(a) および(b) より、図8の
(g) および(h) が求まる。
Further, in the database definition information file 220, a record that matches the table name and column name described in the "link destination table name / column name" column of the record defining the branch in the records related to the organization master table is stored in the database definition information file 220. If you search from the inside, both item names match. In other words, if they match, it is not necessary to use the organization master,
The aggregated data can be extracted only from the sales data table. In this example, from (a) and (b) of FIG.
(g) and (h) are obtained.

【0023】この求められた検索ルートのうち、以下の
基準で最適なルートを決定する。以下は基準の優先順位
が高い順に並べてある。(但し、優先順位はデータベー
スの構造、データ量、コードの特性等により変更可能で
あり、データ ベースの特性を生かせる様になってい
る) (1)直接検索である。
Of the obtained search routes, the optimum route is determined according to the following criteria. The following are listed in order of increasing priority of the criteria. (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 utilized.) (1) Direct search.

【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)行数が少ないテーブル この基準についても、データベース定義情報ファイル2
20の行数の欄を参照し、各テーブルが何行のレコード
より構成されるかを見る。売上データ1テーブル211
の場合は、7500行であり、売上データ2テーブル2
12の場合は250行である。 (5)行長の短いテーブル データベース定義情報ファイル220の桁数の欄を参照
し、各テーブルで各項目の桁数の総和を算出する。 (6)テーブルの容量が少ない (4)および(5)の結果を掛け算することより、テー
ブルの容量を求める。 (7)テーブル上のキー項目が少ないテーブルを使用し
ている また、図5の例ではキー項目(索引項目)は複数あるが
数値項目が1個しかない例であるが、数値項目が複数個
ある場合を考慮したものであり、(3)は全体の項目数
であるのに対し、これは、キー項目の数である。 (8)使用するマスタ項目の中で最下位に位置するマス
タ項目より下位のキー項目の数が少ないテーブルを使用
している。 複数の集約テーブルが、検索対象と成り得る事が判明し
たとき、使用するマスタ項目(この例では支店)より下
位のキー項目数が少ない方が集約度が高い(テーブル上
のレコード件数が少ない)可能性が多分にある為、その
テーブルを使用して検索を行う様にするものである。
(2) The number of links between tables is small (3) The number of columns in the table is small (4) The table with a small number of rows (5) The table with a short row length (6) The capacity of the table is small (7) The table Uses a table with few key items above (8) Uses a table with a lower number of key items below the lowest master item among the master items used. Each standard will be described below. (1) Direct search Direct search means that it is possible to search using only the data table without using the organization master. In this example of FIG.
(g) and (h) are applicable. (2) The number of links between tables is small For example, “→” in “Organization master / branch → sales data 1 / branch” in FIG. 8 (a) corresponds to the link, and in FIG. 5 (a),
(b) is one, (c), (d), (e) is two, (f) is three
, (G), (h) becomes 0, and (g) selected in (1)
In (h), the number of links cannot be narrowed down to one. (3) The number of columns in the table is small. It can be obtained by referring to the item name column of the database definition information file 220 and determining how many items are in each table. In this example, (g) has 5 columns and (h) has 3, so (h) is selected as the search route. (4) Table with a small number of rows Database definition information file 2
See the row number column of 20 to see how many rows each table is composed of. Sales data 1 table 211
In the case of, there are 7500 rows, and sales data 2 table 2
In the case of 12, there are 250 rows. (5) Short row length table The column of the number of digits of the database definition information file 220 is referred to, and the total number of digits of each item in each table is calculated. (6) Table capacity is small The table capacity is obtained by multiplying the results of (4) and (5). (7) A table with a small number of key items on the table is used. Further, in the example of FIG. 5, there is a plurality of key items (index items), but there is only one numerical item. In consideration of a certain case, this is the number of key items, while (3) is the total number of items. (8) Among the master items used, a table is used in which the number of lower key items is smaller than that of the master item located at the lowest position. When it is found that multiple aggregation tables can be the search target, the smaller the number of key items lower than the master item used (branch in this example), the higher the degree of aggregation (the number of records on the table is small). Since there is a lot of possibility, the table is used for searching.

【0025】[0025]

【発明の効果】以上説明したように、データべース構造
を定義したファイルの修正のみで、従来のアプリケーシ
ョンプログラムの修正を行う必要がなく、最適な検索ル
ートでデータ抽出を行うことができる。
As described above, it is not necessary to modify the conventional application program by only modifying the file that defines the database structure, and the data extraction can be performed with the optimum search route.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例の構成図FIG. 1 is a configuration diagram of an embodiment of the present invention.

【図2】組織マスタ/売上データテーブルのテータ形式[Figure 2] Organization master / sales data table data format

【図3】本発明の一実施例における動作フローFIG. 3 is an operation flow in an embodiment of the present invention.

【図4】データテーブル作成処理のフローチャートFIG. 4 is a flowchart of a data table creation process.

【図5】検索ルート決定処理のフローチャートFIG. 5 is a flowchart of search route determination processing.

【図6】データベース定義情報ファイルのデータ形式FIG. 6 Data format of database definition information file

【図7】集約テーブルの指定画面の例[Fig. 7] Example of screen for specifying aggregation table

【図8】生成されるSQLコマンドを説明する図FIG. 8 is a diagram illustrating a generated SQL command.

【符号の説明】[Explanation of symbols]

1 処理装置 2 外部記憶装置 3 入力装置 4 表示装置 5 アプリケーションプログラム 11 データベース定義手段 12 集約データ作成手段 13 検索ルート決定手段 14 検索手段 200 組織マスタテーブル 211 売上データ1テーブル 212 売上データ2テーブル 213 売上データ3テーブル 220 データベース定義情報ファイル 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 Determining 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)

【特許請求の範囲】[Claims] 【請求項1】複数の索引項目と数値データ項目からなる
集約元データテーブルと、該集約元データテーブルの複
数の索引項目のうち少なくとも一つ以上の索引項目を有
し、該集約元データテーブルと集約度の異なる集約先デ
ータテーブルとを記憶するデータベース記憶部と、 前記データベース記憶部に記憶された複数のデータテー
ブルと索引項目の関係を記憶するデータベース定義情報
記憶部と、 前記索引項目をキーにした前記数値データ項目の検索要
求に対して、前記データベース定義情報記憶部に基づい
て、前記データベース記憶部に記憶されているデータテ
ーブルの検索ルートを求める検索ルート決定手段とを備
えたことを特徴とするデータベースシステム。
1. An aggregation source data table composed of a plurality of index items and numerical data items, and at least one or more index items among the plurality of index items of the aggregation source data table. A database storage unit that stores aggregation destination data tables having different degrees of integration, a database definition information storage unit that stores the relationship between a plurality of data tables stored in the database storage unit and index items, and the index items as keys In response to the search request for the numerical data item, a search route determining means for determining a search route of the data table stored in the database storage unit is provided based on the database definition information storage unit. Database system to do.
【請求項2】前記データベース定義情報記憶部は、前記
複数の索引項目間の関係を記憶し、該情報に基づいて、
前記検索ルート決定手段が検索ルートを決定することを
特徴とする請求項1記載のデータベースシステム。
2. The database definition information storage unit stores the relationship between the plurality of index items, and based on the information,
The database system according to claim 1, wherein the search route determining means determines a search route.
【請求項3】入力装置からの前記集約元データとその索
引項目の指定に基づいて、前記集約先データテーブルを
生成し、この生成する集約先データテーブルの構成情報
を前記データベース定義記憶部に登録する集約データ生
成手段を備えたことを特徴とする請求項1乃至2記載の
データベースシステム。
3. The aggregation destination data table is generated based on the designation of the aggregation source data and its index item from an input device, and the configuration information of the generated aggregation destination data table is registered in the database definition storage unit. 3. The database system according to claim 1, further comprising an aggregated data generation unit for performing the above.
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 true JPH08329101A (en) 1996-12-13
JP3552339B2 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)

Cited By (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
JP2008547131A (en) * 2005-06-27 2008-12-25 エービー イニティオ ソフトウェア コーポレーション Data aggregation by compound operation
JP2012104987A (en) * 2010-11-09 2012-05-31 Fuji Xerox Co Ltd Log arrangement device and program
JP2014509008A (en) * 2011-02-21 2014-04-10 アマデウス エス.アー.エス. Method and system for providing statistics from a data warehouse

Cited By (8)

* 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
JP2008547131A (en) * 2005-06-27 2008-12-25 エービー イニティオ ソフトウェア コーポレーション Data aggregation by compound operation
JP2012104987A (en) * 2010-11-09 2012-05-31 Fuji Xerox Co Ltd Log arrangement device and program
JP2014509008A (en) * 2011-02-21 2014-04-10 アマデウス エス.アー.エス. Method and system for providing statistics from a data warehouse
US9710506B2 (en) 2011-02-21 2017-07-18 Amadeus S.A.S. Method and system for providing statistical data from a data warehouse

Also Published As

Publication number Publication date
JP3552339B2 (en) 2004-08-11

Similar Documents

Publication Publication Date Title
US7113941B2 (en) Database access mechanisms for a computer user interface
US5418950A (en) System for interactive clause window construction of SQL queries
US5210868A (en) Database system and matching method between databases
EP1393206B1 (en) Data structure for information systems
AU698148B2 (en) Parallel processing system for traversing a data base
US5933796A (en) Data extracting system based on characteristic quantities of data distribution
US20010003455A1 (en) Method, system and graphic user interface for entering and editing filter conditions for filtering a database
JPH05128157A (en) Document retrieval system
JPH08329101A (en) Data base system
US20070255746A1 (en) Method for Processing Associated Software Data
JPH07192010A (en) Document processing unit
JP3331233B2 (en) Interactive data retrieval and extraction system for relational databases
JP2906638B2 (en) Database search system
JPH0728834A (en) Information retrieving device
JP2000305937A (en) Business analyzing method and business analysis system
JP2003233516A (en) Database, computer readable program, database management system, new registration method for database, retrieving method in database, and update registration method for database
EP0569188A1 (en) Accessing a computer database
JPH10105560A (en) Method and device for retrieving data base
GB2269689A (en) Method for editing sub-query statements for searching a relational database
JPS6017549A (en) Data base retrieval device
JP2000148782A (en) Method and system for retrieval from relational data base and information recording medium where retrieving program for relational data base is recorded
JPH04337867A (en) Data base retrieval system
JPS6379178A (en) Electronic document image file device
JPH05225016A (en) Computer use support system
JPH07175815A (en) Information retrieving device

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