JPS5856031A - Decision system for minimum working relation - Google Patents

Decision system for minimum working relation

Info

Publication number
JPS5856031A
JPS5856031A JP56154696A JP15469681A JPS5856031A JP S5856031 A JPS5856031 A JP S5856031A JP 56154696 A JP56154696 A JP 56154696A JP 15469681 A JP15469681 A JP 15469681A JP S5856031 A JPS5856031 A JP S5856031A
Authority
JP
Japan
Prior art keywords
reference counter
field
relation
contents
condition
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
JP56154696A
Other languages
Japanese (ja)
Other versions
JPS6318777B2 (en
Inventor
Susumu Adachi
安達 進
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 JP56154696A priority Critical patent/JPS5856031A/en
Publication of JPS5856031A publication Critical patent/JPS5856031A/en
Publication of JPS6318777B2 publication Critical patent/JPS6318777B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30021Compare instructions, e.g. Greater-Than, Equal-To, MINMAX
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/22Arrangements for sorting or merging computer data on continuous record carriers, e.g. tape, drum, disc

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To minimize the size of working relation by deciding the field constitution of the working relation, used for the inquiry processing of a relational data base system, by the use of a reference counter. CONSTITUTION:When the minimum field constitution of working relation TA for reduing relation A and storing the result is decided, the condition regarding only the original relation A is a2=5, so a minimum working relation deciding mechanism 5 requests a reference counter control mechanism 6 to subtract one from the contents of a reference counter which corresponds to a field a2. On accepting the request, the mechanism sends back the contents of a reference counter group 7 and in this case, the contents of the reference counter which corresponds to the field a2 are zero, so relation TA is allowed to have fields a1 and a2. Similarly, the field constitution of other working relation is decided.

Description

【発明の詳細な説明】 本発明は、リレーショナル畳データベース・システムに
おいて、リダクション又はジョインの結果生成される作
業用リレーションの大きさを最小にでするよ51Cした
最小作業リレーションの決定方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a method for determining a minimum working relation in a relational tatami database system, which minimizes the size of a working relation generated as a result of a reduction or a join. .

リレーショナル・データベースは、データを表形式でユ
ーザに提供するものであるが、リレーショナル・データ
ベース・システムは、ユーザカラの問い合わせがあると
、関連するりレーンヨンを選択し、これらに対してリダ
クション処理又はシライン処理を行って所望のリレーシ
四ンを作成シ。
Relational databases provide data to users in tabular format, but when a relational database system receives a user's color inquiry, it selects related rows and performs reduction or sline processing on them. to create the desired relay link.

これをユーザに問い合わせ結果として提供している。リ
ダクション処理やシライン処理を組合わせて問い合せ結
果を得る過程においては、リダクション結果又はジョイ
ン処理を一時的に保存してお用 く作業リレーションを必要とする。問い合わせ処理にお
ける処理効率を向上するためには1作業用リレーシ菅ン
の大きさを最小化することが′必要で;あるが、それに
はフィールド構成を必要最小限の構成にすること及び作
業用リレーション中のレコード数を最小化することが必
要となる。
This is provided to the user as an inquiry result. In the process of obtaining query results by combining reduction processing and synline processing, a work relation is required to temporarily store and use the reduction results or join processing. In order to improve processing efficiency in query processing, it is necessary to minimize the size of a single work relation; however, this requires reducing the field configuration to the minimum necessary and It is necessary to minimize the number of records in the file.

本発明は、上1ビのような要求に応えるものであって1
問い合わせ処理過程中において使用される作業用リレー
ションのフィールド構成を必要最°小限の構1敗にする
ことが出来るようKした最小作業リレーションの決定方
式を提供することを目的としている。そしてそのため1
本発明の最小作業リレーン璽ンの決定方式は、ユーザか
ら送られて米た問い合わせ情報に従ってリダクション処
理もしくはジョイン処理を含む処理系列を定め、上記処
理系列の実行の過程におけるリダクション処理もL <
 ハシEiイン処理の結果を作業用リレーションに格納
するリレーショナル・データベース拳システムにおいて
、上記問い合わせ中に現われるフィールドと1対1の対
応をなすと共和初期値として問い合わせの中における当
該フィールドの出現回数がセットされる複数の参照カウ
ンタをもつ参照カウンタ制御機構と、問い合せの条件お
よび処理系列に基づい【参照カウンタの内容の変更を上
記参照カウンタ制御機構に依頼すると共に上記複数の参
照カウンタよりなる参照カウンタ群の内容に基づいて各
リダクション処理もしくはジョイン処理の結果を格納す
るための作業用リレーションのフィールド構成管決定す
る最小作業用リレーション決定機構とを設け、上記最小
作業用リレーション決定機構は、第1番目(1−1,2
・・・n、nは最後の処理]の処理に対応する作業用リ
レーションσ)フィールド構成管決定する際、七の処理
がリダクション処理である場合には、リダクシ冒ン元リ
レーションのフィールドのみを使用している条件が対象
となる問い合わせ条件の中に存在するか否かを調べ、存
在するときKけ該当する参照カウンタの内容を当該フィ
ールド°の出現回数だけ減んすることを上記参照カウン
タ制御機構に依頼すると共に当該条件を対象となる問い
合わせ条件から除外し、参照カウンタの内容の変更が行
わn、た後に参照カウンタ群の内容を読取って当該リダ
クション処理に対する作業用リレーションのフィールド
構成を定め、上記第1番目の処理がジョイン処理である
場合にけ、ジツインする複数のりレーションのフィール
ドのみを使用する条件が対象となる問い合わせ条件の中
に存在するか否かを調べ、存在するときには該当する参
照カウンタの内容を当該フィールドの出現回数だけ減ん
することを上記参照カウンタ制御機構に依頼すると共に
当該条件を対象となる問い合わせ条件から除外し、参照
カウンタの内容の変更が行われた後に参照カウンタ群の
内容を読取って当該ジIイン処理に対する作業リレーシ
ョンのフィールド構成を定めるように構成されているこ
とを特徴とするものである。以下1本発明を図面を参照
しつつ説明する。
The present invention is intended to meet the requirements as mentioned above.
It is an object of the present invention to provide a method for determining a minimum working relation so that the field configuration of the working relation used during the inquiry processing process can be minimized to the necessary number of failures. And for that reason 1
The method for determining the minimum work relay line of the present invention determines a processing sequence including reduction processing or join processing according to inquiry information sent from the user, and also includes reduction processing in the process of executing the processing sequence.
In a relational database system that stores the results of Hashi Ei-in processing in a working relation, if there is a one-to-one correspondence with a field that appears in the above query, the number of occurrences of that field in the query is set as a common initial value. a reference counter control mechanism that has a plurality of reference counters to be processed; and a reference counter control mechanism that requests the reference counter control mechanism to change the contents of the reference counter based on the query conditions and processing sequence; A minimum working relation determining mechanism is provided which determines the field configuration of working relations for storing the results of each reduction process or join process based on the content, and the minimum working relation determining mechanism is configured to -1,2
... n, n is the working relation corresponding to the last process] σ) When determining the field configuration tube, if the process in step 7 is a reduction process, only the field of the relation that is the source of the reduction is used. The reference counter control mechanism checks whether the condition in question exists in the target query conditions, and if so, decrements the content of the corresponding reference counter by the number of times the field appears. At the same time, the condition is excluded from the target query conditions, and the contents of the reference counter are changed. After that, the contents of the reference counter group are read to determine the field configuration of the working relation for the reduction process, and the above is performed. If the first process is a join process, check whether a condition that uses only the fields of multiple relations to be jittered exists in the target query condition, and if it exists, check the corresponding reference counter. The reference counter control mechanism is requested to reduce the content of the field by the number of occurrences of the field, and the condition is excluded from the target query conditions, and after the content of the reference counter is changed, the reference counter group is The present invention is characterized in that it is configured to read the contents and determine the field structure of the work relation for the relevant di-in process. The present invention will be explained below with reference to the drawings.

第1図はリレーショナル・データベース・システムの概
要を示す図、第2図は論理データ・サブシステムにおけ
る処理の流れす示す図、第3図はスケジー−ラにおける
処理を説明する図、第4図は最小作業用リレーシロンの
フィールド構成を決定する機構の1実施例を示す図、第
5図はインータプリタにおける処理の1例を示す図、第
6図は問い合わせの1例を示す図、第7図は問い合わせ
処理順序の1例を示す図、第8図は参照カウンタの状態
遷移の1例を示す図である。
Figure 1 is a diagram showing an overview of the relational database system, Figure 2 is a diagram showing the flow of processing in the logical data subsystem, Figure 3 is a diagram explaining processing in the scheduler, and Figure 4 is a diagram showing the flow of processing in the logical data subsystem. A diagram showing an example of a mechanism for determining the field configuration of a minimum work relay, FIG. 5 is a diagram showing an example of processing in the interpreter, FIG. 6 is a diagram showing an example of an inquiry, and FIG. 7 is an example of an inquiry. FIG. 8 is a diagram showing an example of the processing order, and FIG. 8 is a diagram showing an example of the state transition of the reference counter.

第1図において、1はリレーショナル・データベース管
理システム、21d’)レージ冒ナル・データベース、
3は論理データ・サブシステム、4は論理記憶サブシス
テムをそれぞれボしている。リレーショナル・データベ
ース管理システム1は。
In FIG. 1, 1 is a relational database management system, 21d') a storage database,
3 represents a logical data subsystem, and 4 represents a logical storage subsystem. Relational database management system 1.

問い合わせ入力があると、リレーショナル・データベー
ス2をアクセスし1問い合わせ結果を作成し、これをユ
ーザに転送するものである。リレーショナル・データベ
ース管理システムは、論理データ・サブシステム3と論
理記憶サブシステム4とから構成されている。論理デー
タ・サブシステム3は問い合わせの解析や最適化、実行
などを提供するものであり、論理記憶サブシステム4は
データの記憶や排他制御、リカバリなどを提供するもの
である。リレーショナル・データベース2には、複数の
りレーション(テーブル又は表)が格納されている。
When an inquiry is input, the relational database 2 is accessed, one inquiry result is created, and this is transferred to the user. The relational database management system consists of a logical data subsystem 3 and a logical storage subsystem 4. The logical data subsystem 3 provides query analysis, optimization, execution, etc., and the logical storage subsystem 4 provides data storage, exclusive control, recovery, etc. The relational database 2 stores multiple relations (tables).

第2図は論理データ・サブシステムにおける処理の流れ
を示すものである。第2図に示すように。
FIG. 2 shows the flow of processing in the logical data subsystem. As shown in Figure 2.

論理データ・サブシステム3は、構文解析、意味解析、
スケジユーラおよびインタプクータ等の処理を行う、論
理データ・サブシステム3に入力される問い合わせは、
非手続言語で書かれている。
Logical data subsystem 3 performs syntactic analysis, semantic analysis,
Queries input to the logical data subsystem 3, which handles processing such as the scheduler and interrupter, are
Written in a non-procedural language.

第6図は非手続言語で書かれた問い曾わせ文の1例を示
すものである。第6図の問い付わせ文は。
Figure 6 shows an example of an interrogative sentence written in a non-procedural language. The question in Figure 6 is:

フィールドals affie ”ms ”4e al
lをもつりレーションA、フィールドbllb*−bs
−b4t−もつリレーシツンBおよびフィールドe1m
 ellm ea* e4をもつりレージlンC,r:
用いて、WHERE以下で示される条件を満すところの
フィールドa1* JIS e bl l bl #C
1e e4k モつリレーシロンを作成して欲しい、と
゛いうことを依頼している。構文解析部は入力された問
い合わせ文の構文チェックを行うものであり、−うもの
であり、スケジユーラは最適化および実行年続き文の生
成などを行うものでおり、インタプクタは実行手続き文
を実行するものである。第6図の非手続言語で書かれた
問い合わせ文に対応する笑行手続き文の1例は、第7図
に示されたような構成を有している。第7図は。
Field als affie "ms" 4e al
Let l be a ration A, field bllb*-bs
-b4t- with relay B and field e1m
ellm ea* e4 and range C, r:
Field a1 * JIS e bl l bl #C that satisfies the conditions shown below using WHERE
I am requesting that you create a 1e e4k Motsureshiron. The syntax analysis unit checks the syntax of the input query statement, the scheduler performs optimization and generates execution-continuation statements, and the interceptor executes execution procedure statements. It is something. An example of a procedural sentence corresponding to the inquiry sentence written in the non-procedural language of FIG. 6 has a structure as shown in FIG. Figure 7 is.

■ リレーシ、yAをリダクションして、ソノ結果をa
lでソートし、ソート結果を作業用リレーシロンTAに
格納せよ ■ リレーシロンBをリダクションして、その結果をb
lでソートし、ソート結果を作業用リレーシロンTBk
格納せよ。
■Reduce the relay, yA, and convert the sono result to a
Sort by l and store the sort result in working relay TA.■ Reduce relay silon B and store the result in b.
Sort by l and use the sorting result as a working relay TBk.
Store it.

■ 作業用リレーションTAとTBをa、 =:b、と
いう条件の下でジ嘗インし、その結果をb!でノートシ
、ノート結果を作業用リレーシロンTABk格納せよ ■ リレーシロン0をリダクションして、ソノ結果をC
3でノートし、ソート結果を作業用リレーシロンTCに
格納せよ ■ 作業リレーションTABとTOとをす、 =C2と
いう条件の下でジlインし、その結果を作業用リレーシ
ロンTABOK格納せよ。
■ Enter working relations TA and TB under the conditions a, =:b, and convert the result to b! Store the note results in the working Relay Shiron TABk■ Reduce the Relay Shiron 0 and save the Sono result to C
3, and store the sorting results in the working relay TC.■ Create the working relations TAB and TO, and log in under the condition of =C2, and store the results in the working relay TABOK.

ということを表わしている。This means that.

第4図は最小作業用リレーシロンのフィールド構成を決
定するため機構の1例を示す図である。
FIG. 4 is a diagram showing an example of a mechanism for determining the field configuration of the minimum work relay.

第4図において、5は最小作業用リレーシロン決定機構
、6は参照カウンタ制御機構、7は参照カウンタ群、8
は参照カウンタをそれぞれ示している。最小作業用リレ
ーシロン決定機構5には1問い合わせ条件および処理順
序が人力される。この条件とは、#!6図のWHERE
以下の文で指定されるものであり、また処理順序とは第
7図で表わされる如きものである。参照カウンタ制御機
構6JIIr参照力ウンタ群7tVしている。参照カウ
ンタ群7は、問い合わせ中で引用されるフィールドのそ
れぞれに対応する複数の参照カウンタ8t−有しており
、各参照カウンタ8には初期値がセットされている。例
えば、第6図の如き問い合わせの場合には、フィールド
a、はGET以下の文に2回表われているのでフィール
ドa、に対応する参照カウンタ8の初期値は“2”とさ
れフィールドa、はGET以下の文に1回表われている
のでフィールドa、に対応する参照カウンタ8の初期値
は1“とされる。
In FIG. 4, 5 is a minimum working relay length determining mechanism, 6 is a reference counter control mechanism, 7 is a reference counter group, and 8 is a reference counter control mechanism.
indicate reference counters, respectively. One inquiry condition and processing order are entered into the minimum work relay determination mechanism 5 manually. This condition is #! WHERE in Figure 6
The processing order is specified by the following statement, and the processing order is as shown in FIG. Reference counter control mechanism 6JIIr reference force counter group 7tV. The reference counter group 7 has a plurality of reference counters 8t- corresponding to each of the fields cited in the inquiry, and each reference counter 8 has an initial value set therein. For example, in the case of the query shown in FIG. 6, field a appears twice in the sentence following GET, so the initial value of the reference counter 8 corresponding to field a is set to "2", and field a, appears once in the statement following GET, so the initial value of the reference counter 8 corresponding to field a is set to 1".

以下、同様である。リレーションAtリダクションして
その結果を格納する作業用リレーションTAの最小フィ
ールド構成を決定する場合元のりレーションAKのみ関
係する条件は、 a、=5 という条件であるので、最小作業用リレーション決定機
構5は、フィールドa、に対応する参照カラ71 f>
 内容から“l”滅することを参照カウンタ制御機11
!6に依頼する。最小作業用リレーション決定機構5は
、この依頼を実行し終るとカウンタ参照依頼を参照カウ
ンタ制御機構6に対して発信する。カウンタ参照依頼を
受取ると、参照カウンタ制御機構6は、−′参照カウン
タ群7の内容管返す、このとき、フィールドa*に対応
する参照カウンタの内容は零となっているので、作業用
リレーションTAをフィールド1とa、tもっものと決
定す1図の最適化部に含まれているものである。作業用
リドジョンの最小フィールド構成については、後で更に
詳細に説明する。
The same applies hereafter. When determining the minimum field configuration of the working relation TA that reduces the relation At and stores the result, the condition that only relates to the original relation AK is a, = 5, so the minimum working relation determining mechanism 5 is , field a, reference color 71 f>
Refer to "l" from the contents Counter controller 11
! Request 6. When the minimum work relation determination mechanism 5 finishes executing this request, it sends a counter reference request to the reference counter control mechanism 6. Upon receiving the counter reference request, the reference counter control mechanism 6 returns the contents of the -' reference counter group 7. At this time, since the content of the reference counter corresponding to field a* is zero, the working relation TA This is included in the optimization section of Figure 1, which determines that field 1 and a, t are most likely. The minimum field configuration of the working ridsion will be discussed in more detail below.

第5図はインタプリータにおける処理の1例を示すもの
である。この例は、第7図で示される如き処理を実行す
るβめのもので奔る。インタプリータはスケジューラで
作成された実行手続き文にしたがってリダクション又は
ジョインを行い、そのリダクション結果又はジョイン結
果を格納するための作業リレーションをスケジューラの
決定にしたがって作成し、これに処理結果を格納する。
FIG. 5 shows an example of processing in the interpreter. This example starts with the β-th process that executes the process shown in FIG. The interpreter performs reduction or join according to the execution procedure statement created by the scheduler, creates a work relation for storing the reduction result or join result according to the scheduler's decision, and stores the processing result in this.

例、ttIIJレーションAのりダクシ冒ン結果を格納
するための作業用リレーションはフィール)”a。
For example, the working relation for storing the results of ttIIJ Ration A is field) "a.

とa2をもつものとスケジューラによって決定されてい
るので、インタプリータはこのような構成をもつ作業用
リレーシロンTAを作成シ、こtt、にリレーション人
をリダクションした結果を書込む。
Since it has been determined by the scheduler to have a2 and a2, the interpreter creates a working relay TA with such a configuration and writes the result of reducing the relation person in ``chi,''.

さきに述べたように、第6図に示す問い合わせ業用すレ
ーシ冒ンTA、−TB、TO,TABのフィールド構成
として最小化しない最も効率の悪い方法は元のりレーシ
ョンのフィールドを全て作業用リレニジ画ンのフィール
ドに含ませるものである。
As mentioned earlier, the least efficient method of not minimizing the field structure of the inquiry field TA, -TB, TO, and TAB shown in Figure 6 is to replace all fields of the original relation with the working field. It is included in the field of the image.

すなわち、下記のような構成となる。That is, the configuration is as follows.

TA(as e aIs aIs a41 al )T
B (bl # ’h * ba 6 ba )TO(
C1e  ’ff1e  Cme  ’番 )TAB 
(”* # ”me ”so ”4* ”II bwe
 bwe baa b4 )以上のように簡単であるが
効率の悪い方法を、参照カウンタ7を用いるととkより
、最小のフィールド構成を使う効率の良い方法に改善す
ることが出来る。以下、最小フィールド構成をもつ作業
用リレーションの求め方について、第8図を参照しつつ
説明する。第8図は第7図の如き処理を行う場合におけ
る参照カウンタの遷移状態を示すものであり、第8図に
おいて*印は直前のステップで変更された参照カウンタ
を示している。
TA(as e aIs aIs a41 al)T
B (bl#'h*ba 6 ba)TO(
C1e 'ff1e Cme' number)TAB
(”* # ”me ”so ”4* ”II bwe
bwe baa b4) By using the reference counter 7, the simple but inefficient method described above can be improved to a more efficient method using the minimum field configuration. Hereinafter, how to obtain a working relation having a minimum field configuration will be explained with reference to FIG. FIG. 8 shows the transition state of the reference counter when performing the process shown in FIG. 7, and in FIG. 8, the * mark indicates the reference counter changed in the immediately previous step.

ステップ■ 条件の中でリレーションAのフィールドのみを使用して
いる条件Ps(第6図参照)に関し、各フィールドに対
応する参照カウンタ8を出現回数だけ減する。その結果
の参照カウンタ群7の状態は第8図(ロ)のようになる
(条件P1は以降の処理対象から除外する)。リレーシ
ョンAのフィールドの中で参照カウンタ8が零のものは
リダクション結朱の作業用リレーションのフィールド構
成として不要であることを示し1作業用リレーションT
Aのフィールド構成を下記のようにすれは良いことを示
している。
Step (2) Regarding the condition Ps (see FIG. 6) in which only the field of relation A is used in the condition, the reference counter 8 corresponding to each field is decremented by the number of times it appears. The resulting state of the reference counter group 7 is as shown in FIG. 8(b) (condition P1 is excluded from the subsequent processing). Among the fields of relation A, those whose reference counter 8 is zero indicate that they are unnecessary as a field configuration of the working relation of reduction resultant 1 working relation T
This shows that it is good to have the field configuration of A as shown below.

TA (ate lL、) ステップ■ 条件(Jll Jle P2. ps、 P4)の中で
リレーションBのフィールドのみを使用している条件P
2に関してステップ■と同様な処理を行う(条件P3は
以降の処理対象から除外する)。この結果得られる参照
カウンタ群7の状態は、第8条(ハ)に示される。
TA (ate lL,) Step ■ Condition P that uses only the field of relation B in the condition (Jll Jle P2. ps, P4)
2, the same process as step (2) is performed (condition P3 is excluded from subsequent processing). The state of the reference counter group 7 obtained as a result is shown in Article 8 (c).

作業用リレーションTBとして下記のフィールド:′″
IIIM、tpもてば良いことが決定できる。
The following fields are used as the working relation TB:'''
IIIM, it can be determined that tp is sufficient.

:1も ヅTB (bs、 be、 be) ステップ■ 条件(Jl、 Jl、 ps、 P4)の中でジョイン
する2個の作業用リレーションTA、TBのフィールド
のみを使用している条件Jl、 P3 K関してステッ
プ■と同様な処理を行う(条件J 1e P sは以降
の処理対象から除外する)。この結果得られる参照カウ
ンタ群7の状態は第8図に)に示される。作業用リレー
ションTABとしては下記のフィールド構成を持てば良
いことか決定できる。
:1ModuTB (bs, be, be) Step ■ Conditions Jl, P3 that use only the fields of the two working relations TA and TB that are joined in the conditions (Jl, Jl, ps, P4) Regarding K, the same process as in step (2) is performed (condition J 1e P s is excluded from the subsequent processing target). The resulting state of the reference counter group 7 is shown in FIG. It can be determined whether the working relation TAB should have the following field configuration.

TAB (a 1@ & @I b to b 露)ス
テップ■ 条件1*piの中でリレーションCのフィールドのみを
使用している条件P4 Kついてステップ1と同様な処
理を行う(条件P4は以降の対象から除外する)。この
結果得られる参照カウンタ群7の状態は第8図(ホ)K
示される。作業用リレーションTCとしては、以下のフ
ィールド構成をもてば良いことが決定できる。
TAB (a 1 @ & @I b to b dew) Step ■ Perform the same process as step 1 for condition P4 K, which uses only the field of relation C in condition 1 * pi (condition P4 is (excluded from the scope). The state of the reference counter group 7 obtained as a result is shown in FIG.
shown. It can be determined that the working relation TC should have the following field configuration.

TC(ele (so an) ( μテップ■ 残されている条件の中で2個の作業用リレーションTA
B、TOのフィールドのみt使用している条件Jmに関
し【ステップ■と同様な処理を行う(これで全ての条件
をチェックし終る。)この結果得られる参照カウンタ群
7の状態は第8図(へ)に示される。作業用リレーショ
ン(問い合わせ結果の最終りレーションと一致する)の
フィールド構成は下記のようになる。
TC(ele (so an) (μ step) Two working relations TA in the remaining conditions
Concerning the condition Jm that uses only the fields B and TO, perform the same process as in step (2) (this completes checking all conditions). The status of the reference counter group 7 obtained as a result is shown in Figure 8 ( ). The field structure of the working relation (which matches the final relation of the query result) is as follows.

TABC(ILse ale tlae tls+ e
s* aJ以上の説明から明らかなよう虻1本発明によ
れば。
TABC(ILse ale tlae tls+e
s* aJ As is clear from the above description, according to the present invention.

IIレーショナル・データベース−システムの問い合わ
せ処理で使用する作業用リレーションのフィールド構成
を参照カウンタを用いるととkより非常に簡単な方法で
決定でき、最適化の効率を向上させることが出来る。
II. Using reference counters, the field configuration of working relations used in query processing in a relational database system can be determined in a much simpler way than k, and optimization efficiency can be improved.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はIJレージ璽ナル・データベース・シススケジ
ューラにおける処理を説明する図、第4図は最小作業用
リレーションのフィールド構成全決定する機構のl実施
例を示す図、第5図はインタ1リタにおける処理の1例
を示す図、第6図は問い合わせの1例を示す図、第7図
は問い合わせ処理順序の1例を示す図、第8図は参照カ
ウンタの状態遷移の]例を示す図である。 1・・・リレーションル・データベース管理システム、
2・・・リレーションル・データベース、3・・・論理
データ・サブシステム、4・・・論理記憶サブシステム
、5・・・最小作業用リレーション決定機構、6・・・
参照カウンタ制御機構、7・・・参照カウンタ群。 8・・・参照カウンタ。 特許出願人 富士通株式会社 代理人弁理士  京 谷 四 部 す 1 (¥1 ヤ2図 才3図 ヤ4(¥] 第5(¥] 26図 オワ図
Fig. 1 is a diagram explaining the processing in the IJ database system scheduler, Fig. 4 is a diagram showing an embodiment of the mechanism for determining the entire field configuration of the minimum working relation, and Fig. 5 is a diagram explaining the processing in the IJ database system scheduler. 6 is a diagram showing an example of an inquiry, FIG. 7 is a diagram showing an example of an inquiry processing order, and FIG. 8 is a diagram showing an example of the state transition of a reference counter. It is. 1...Relational database management system,
2... Relation database, 3... Logical data subsystem, 4... Logical storage subsystem, 5... Minimum work relation determination mechanism, 6...
Reference counter control mechanism, 7... Reference counter group. 8...Reference counter. Patent Applicant Fujitsu Ltd. Representative Patent Attorney Kyotani 4 Parts 1 (¥1 Figure 2 Figure 3 Figure 4 (¥) Figure 5 (¥) Figure 26 Figure

Claims (1)

【特許請求の範囲】 ユーザから送られて釆た問い合わせ情報に従ってリダク
ション処理もしくはジョイン処at含む処理系列を足め
、上記処理系列の実行の過程におけるリダクション処理
もしくはジョイン処理の結果を作業用リレーションに格
納するリレーショナル・データベース龜システムにおい
て。 上記問い合わせ中に現われるフィールドと1対1の対応
′tなすと共和初期値として問い合わせの中における当
該フィールドの出現回数がセットされる複数の参照カウ
ンタをもつ参照カウンタ制御機構と、問い合せの条件お
よび処理系列に基づいて参照カウンタの内容の変更を上
記参照カウンタ制御機構に依頼すると共に上記複数の参
照カウンタよりなる参照カウンタ群の内容に基づいて各
リダクション処理もしくはジ冒イン処理の結果を格納す
るための作業用リレーションのフィールド構成を決定す
る最小作業用・リル−シ冒ン決定機構とを設け、上記最
小作業用すレーシ冒ン決定機構は。 第I番目(i=]、2・・・・・・n、  nは最後の
処理)の処理に対応する作を用リレーションのフィール
ド構成を決定する際、その処理がリダクション処理であ
る場合には、リダクション元すレーシ冒ンのフィールド
のみを使用している条件が対象となる問い合わせ条件の
中に存在するか否かを調べ。 存在するときには該当する参照カウンタの内容を当該フ
ィールドの出現回数だけ減んすることを上記参照カウン
タ制御機構に依頼すると共に当該条件を対象となる問い
合わせ条件から除外し、参照カウンタの内容の変更が行
われた後に参照カウンタ群の内容を読取って当該りダク
ション処理に対する作業用リレーションのフィールド構
成を定め。 上記第1番目の処理がジ四イン処理である場合には、シ
ロインする複数のリレー、ジョンのフィールドのみを使
用する条件力I対象と桑る問い合わせ条件の中に存在す
るか否かを調べ、存在するときには該当する参照カウン
タの内gt−当該フイールドの出現回数だけ減んするこ
と全上記参照カウンタ制御機構に依頼すると共に当皺条
件管対象となる問い合わせ条件から除外し、参照カウン
タの内容の変更が行われた後に参照カウンタ群の内容を
読取って当該ジョイン処理に対する作業リレーションの
フィールド構成を定めるように構成されていることを特
徴とする最小作業リレーションの決定方式。
[Claims] A process sequence including a reduction process or a join process is added according to the inquiry information sent from the user, and the result of the reduction process or join process in the process of executing the process sequence is stored in a work relation. In a relational database system. A reference counter control mechanism having a plurality of reference counters in which the number of occurrences of the field in the query is set as a mutual initial value, with a one-to-one correspondence with the field appearing in the query, and query conditions and processing. requesting the reference counter control mechanism to change the contents of the reference counter based on the series, and storing the results of each reduction process or diversion process based on the contents of the reference counter group consisting of the plurality of reference counters; A minimum work/relationship determination mechanism is provided for determining a field configuration of a work relation, and the minimum work relationship determination mechanism is provided. When determining the field configuration of the relation using the action corresponding to the I-th process (i=], 2...n, where n is the last process), if that process is a reduction process, , check whether there is a condition in the target query condition that uses only the field of the reduction source. If it exists, it requests the reference counter control mechanism to reduce the contents of the corresponding reference counter by the number of times the field appears, excludes the condition from the target query conditions, and changes the contents of the reference counter. After that, the content of the reference counter group is read and the field configuration of the working relation for the relevant reduction process is determined. If the first process is a four-in process, check whether or not there are multiple relays in the query condition that uses only the field of the condition force I target, If it exists, request the above-mentioned reference counter control mechanism to reduce the corresponding reference counter by gt - the number of times the field appears, exclude it from the query conditions that are subject to the current condition, and change the contents of the reference counter. 1. A method for determining a minimum work relation, characterized in that the method is configured to read the contents of a reference counter group after a join process has been performed to determine a field configuration of a work relation for the join process.
JP56154696A 1981-09-29 1981-09-29 Decision system for minimum working relation Granted JPS5856031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56154696A JPS5856031A (en) 1981-09-29 1981-09-29 Decision system for minimum working relation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56154696A JPS5856031A (en) 1981-09-29 1981-09-29 Decision system for minimum working relation

Publications (2)

Publication Number Publication Date
JPS5856031A true JPS5856031A (en) 1983-04-02
JPS6318777B2 JPS6318777B2 (en) 1988-04-20

Family

ID=15589940

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56154696A Granted JPS5856031A (en) 1981-09-29 1981-09-29 Decision system for minimum working relation

Country Status (1)

Country Link
JP (1) JPS5856031A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS624877A (en) * 1985-06-28 1987-01-10 Hitachi Chem Co Ltd Electroless copper plating solution
JPH09311801A (en) * 1996-05-24 1997-12-02 Sony Corp Data base device and data base retrieval method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS624877A (en) * 1985-06-28 1987-01-10 Hitachi Chem Co Ltd Electroless copper plating solution
JPH09311801A (en) * 1996-05-24 1997-12-02 Sony Corp Data base device and data base retrieval method

Also Published As

Publication number Publication date
JPS6318777B2 (en) 1988-04-20

Similar Documents

Publication Publication Date Title
EP0070119B1 (en) Join operation processing system in relational model
US6026394A (en) System and method for implementing parallel operations in a database management system
US7797286B2 (en) System and method for externally providing database optimizer statistics
JP2510004B2 (en) Query processing method for release database system
CN109491989B (en) Data processing method and device, electronic equipment and storage medium
US7319995B2 (en) Method and system for inclusion hash joins and exclusion hash joins in relational databases
US20080126329A1 (en) Expanding the scope of an annotation to an entity level
JPH05101106A (en) Question answering system
US20080249988A1 (en) Computer programming method and system for performing a reversal of selected structured query language operations within a database transaction
US7613741B2 (en) Utilizing rules in a distributed information sharing system
US20190213188A1 (en) Distributed computing framework and distributed computing method
JPH0668032A (en) Data base system
GB2172130A (en) Method and system for managing view
US8005802B2 (en) Partial evaluation of rule sets
JPS5856031A (en) Decision system for minimum working relation
JP2780996B2 (en) Query optimization processing method
JPH01211029A (en) Processing system for data base operating language
Boyne et al. A Message-Oriented Implementation of a Multi-Backend Database System (MDBS)
JP2002149648A (en) Method and device for integrated retrieval and storage medium with integrated retrieval program stored therein
Kitagawa et al. APAD: An application-adaptable database system its architecture and design
KR930009855B1 (en) Direct access method of dbms
JPH03189742A (en) Data base processing method
Akkineni SQL-like distributed data base server: Implementation of multiprocess 2PL concurrency control algorithm in distributed systems with non-replicated data
Tung Design, analysis and implementation of the primary operation, retrieve-common, of the multi-backend-database system (MBDS).
KR940009113B1 (en) Method of changing subscriber data change on intelligent service network