JPS62284432A - Data coupling circuit - Google Patents

Data coupling circuit

Info

Publication number
JPS62284432A
JPS62284432A JP61127791A JP12779186A JPS62284432A JP S62284432 A JPS62284432 A JP S62284432A JP 61127791 A JP61127791 A JP 61127791A JP 12779186 A JP12779186 A JP 12779186A JP S62284432 A JPS62284432 A JP S62284432A
Authority
JP
Japan
Prior art keywords
data
string
mode
key
key values
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.)
Pending
Application number
JP61127791A
Other languages
Japanese (ja)
Inventor
Toshiro Nakazuru
敏朗 中水流
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 JP61127791A priority Critical patent/JPS62284432A/en
Publication of JPS62284432A publication Critical patent/JPS62284432A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain rapid processing of data coupling operation by executing the data coupling processing like a pipe line even if key values are outputted so as to be overlapped in a data coupling circuit to be used for data base processing or the like. CONSTITUTION:Data of strings A, B are supplied like pipe lines, and at the time of detecting the coincidence of key values, a gate 5 is opened and a coupled data string is outputted to a storage device 6. When the overlap of the key values is detected by a comparator 2, a mode register 4 is set up to an overlap mode and the address of the current string A is saved in the register 3. When the string B is set up as the succeeding data, the string A is read out by the address saved in the register 3 and the comparison of key values is restarted based on the data of the string A.

Description

【発明の詳細な説明】 3、発明の詳細な説明 [概 要] データベース処理等においてデータ結合操作を行うデー
タ結合回路であって、二つのデータ列のキー値を比較す
る比較器と、一つのデータ列のキー値の重複を検出する
比較器と、キー値組復時を示すモードレジスタと、キー
値重複時再開始アドレスを記憶する手段を備えてパイプ
ライン的にデータ結合処理を行う。
[Detailed Description of the Invention] 3. Detailed Description of the Invention [Summary] A data combination circuit that performs data combination operations in database processing, etc., which includes a comparator that compares key values of two data strings, and one A comparator that detects duplication of key values in a data string, a mode register that indicates when a key value set is restored, and a means for storing a restart address when key value duplication occurs, and data combination processing is performed in a pipeline.

[産業上の利用分野1 本発明は、データベース処理等において使用されるデー
タ結合回路に関する。
[Industrial Application Field 1] The present invention relates to a data combination circuit used in database processing and the like.

データベース処理等において、2群のデータ列より、デ
ータの指定キーフィールドの値が条件を満たすデータを
連結して新しいデータを作ることをデータ結合操作と呼
ぶ。
In database processing, etc., the process of creating new data by concatenating data whose designated key field values satisfy conditions from two groups of data strings is called a data join operation.

本発明はデータ結合碌作の高速化に関するものである。The present invention relates to speeding up data combination performance.

[従来の技術] 従来、データ結合操作は、−Cの命令、文字比較命令、
文字転送命令等を組み合せて、ソフトウェア的に実現し
ていた。
[Prior Art] Conventionally, data combination operations have been performed using -C commands, character comparison commands,
This was realized in software by combining character transfer commands, etc.

第3図は、従来のソフトウェアによる結合操作処理例を
示すフローチャートである。
FIG. 3 is a flowchart showing an example of a combination operation process using conventional software.

結合に使用されるキーに同一値の重複出現がない場合は
、処理は比較的単純であるが、!1複のある場合は複雑
となる。
If the keys used in the join do not have duplicate occurrences of the same value, the process is relatively simple, but! If there is more than one, it becomes complicated.

第3図のソフトウェアによる結合処理を、第4図に示す
二つのデータ列について、実行する例を次に説明する。
Next, an example will be described in which the software combination process of FIG. 3 is executed for the two data strings shown in FIG. 4.

二つのデータ列AおよびBはキーに従って昇順にソート
済みである。
Two data strings A and B have been sorted in ascending order according to the keys.

■データ列Aの最初のデータ(番号AI )のキーAA
Aとデータ列Bの最初のデータ(番号Bl)のキーAΔ
Aが比較され、一致するから右側に分岐し、Al−B1
の結合データが出力され、A1のアドレスを退避させ、
データAの次のデータA2が読み出され、Fフラグをオ
ンとされる。
■Key AA of the first data (number AI) of data string A
A and the key AΔ of the first data (number Bl) of data string B
A is compared, and since they match, it branches to the right, and Al-B1
The combined data of is output, the address of A1 is saved,
Data A2 following data A is read out, and the F flag is turned on.

■A2のキーAABとBlのキーAAAが比較され一致
しないから、Bの次のデータB2を読み出され、B1と
82のキーが比較され、−敗するから退避中のA1めア
ドレスが回復され読み出される。
■The key AAB of A2 and the key AAA of Bl are compared, and since they do not match, the next data of B, B2, is read out, and the keys of B1 and 82 are compared. Read out.

■A1のキーAAAとB2のキーAAAが比較され、一
致するから、At−82の結合データが出力され、Aの
次のデータA2が読み出されるぐ■A2のキーAABと
82のキーAAAが比較され、一致しないから、Bの次
のデータB3が読み出され、B2と83のキーが比較さ
れ一敗しないから、Fフラグがオフとされる。
■The key AAA of A1 and the key AAA of B2 are compared and since they match, the combined data of At-82 is output and the next data A2 of A is read. ■The key AAB of A2 and the key AAA of 82 are compared. Since they do not match, data B3 next to B is read out, and the keys of B2 and 83 are compared and there is no loss, so the F flag is turned off.

■A2のキーAABとB3のキーAABが比較され一致
するから、A2−B5の結合データが出力され、A2の
アドレスが退避され、次のアドレスA3のデータが読み
出され、Fフラグがオンとされる。
■Since the key AAB of A2 and the key AAB of B3 are compared and match, the combined data of A2-B5 is output, the address of A2 is saved, the data of the next address A3 is read, and the F flag is turned on. be done.

■A3のキーABBとB3のキーAABが比較され一致
しないから、Bの次のデータB4が読み出され、B3と
84のキーが比較され一致するから、退避中のA2のア
ドレスが回復されデータが読み出される。
■Since the key ABB of A3 and the key AAB of B3 are compared and do not match, the next data B4 of B is read out, and the keys of B3 and 84 are compared and match, so the address of A2 being saved is recovered and the data is read out.

■A2のキーAABと84のキーAABが比較され一致
するから、A2−84の結合データが出力され、Aの次
のデータA3が読み出される。
(2) Since the key AAB of A2 and the key AAB of 84 are compared and match, the combined data of A2-84 is output, and the next data of A, A3, is read out.

以下、同様にして次々と結合キーの一致するデータを連
結した新しいデータ列を作り出すことができる。結合キ
ー値に重複のある場合、終結のためには図示しない特別
の処理が必要であるがここでは省略する。
Thereafter, a new data string can be created by concatenating data with matching join keys one after another in the same manner. If there are duplicates in the join key values, special processing (not shown) is required to complete the process, but this is omitted here.

[発明が解決しようとする問題点コ 上記に説明したような各種の命令を組み合せてソフトウ
ェア的にデータ結合操作を実行する方法では、性能(処
理速度)の向上には限界があり、データ処理装置におけ
るクロックレートの向上程度しか向上しない。
[Problems to be Solved by the Invention] There is a limit to the improvement of performance (processing speed) in the method described above, in which data combination operations are executed in software by combining various instructions. The only improvement is the clock rate.

本発明は、このような従来の限界を打ち破る新規なデー
タ結合回路を提供しようとするものである。
The present invention seeks to provide a novel data combination circuit that overcomes these conventional limitations.

C問題点を解決するための手段] 第1図は本発明のデータ結合回路の原理ブロック図を示
す。
Means for Solving Problem C] FIG. 1 shows a block diagram of the principle of the data combination circuit of the present invention.

第1図において、1は第1のデータ列(以下、ストリン
グという)AとストリングBのキー値を突き合せ比較す
る比較器である。
In FIG. 1, numeral 1 is a comparator that matches and compares the key values of a first data string (hereinafter referred to as string) A and string B. In FIG.

2は基準側(ここではストリングBを基準ストリングと
する)ストリングの相い続くデータのキー値を比較する
比較器である。
2 is a comparator that compares key values of successive data of a string on the reference side (here, string B is the reference string).

3は重複モード時にストリングへの再開始アドレスを退
避させるアドレス退避レジスタである。
Reference numeral 3 denotes an address save register that saves the restart address for the string in the duplication mode.

4は重複モードか通常モードかを記憶するモードレジス
タである。
4 is a mode register that stores whether the mode is duplication mode or normal mode.

5は比較器lにより一敗が検出されたとき、結合データ
を出力するゲートである。
Reference numeral 5 denotes a gate that outputs combined data when one loss is detected by the comparator l.

6は各データ列のデータを格納する記憶装置である。6 is a storage device that stores data of each data string.

ストリングAおよびストリングBのデータはパイプライ
ン的に流され、比較器1によりキー値の一致が検出され
たときは、ゲート5が開かれ、結合データ列が記憶装置
6へ出力される。
The data of string A and string B are flown in a pipeline manner, and when a match of key values is detected by comparator 1, gate 5 is opened and a combined data string is output to storage device 6.

比較器2によりキー値の重複が検出されたときは、モー
ドレジスタ4は重複モードとなり、レジスタ3に現在の
ストリングAのアドレスを退避させる。
When the comparator 2 detects duplication of key values, the mode register 4 enters the duplication mode and saves the address of the current string A in the register 3.

ストリングBが次のデータとなったとき、レジ。When string B becomes the next data, register.

スタ3に退避されていたアドレスでストリングAを読み
出しそのデータからキー比較を再開始する。
String A is read out at the address saved in star 3, and key comparison is restarted from that data.

[作用] 上記構成によって、データ結合に使用されるキー値の重
複出現がある場合でも、データ結合処理をパイプライン
的に行う。
[Operation] With the above configuration, even when key values used for data combination appear repeatedly, data combination processing is performed in a pipeline manner.

ソフトウェア的に行う処理が、すべて逐次的に行われる
のに比べ、各種の処理は同時に並列的に行われる。例え
ば、ストリングAとストリングBのキー値の比較と、ス
トリングBの現データと後続データのキー値の比較は、
並列に同時に行われる。
In contrast to software-based processing, which is all performed sequentially, various types of processing are performed simultaneously and in parallel. For example, comparing the key values of string A and string B, and comparing the key values of current data and subsequent data of string B,
done in parallel and at the same time.

これによって、結合キー値の重複出現のあるデータスト
リングのデータ結合操作を、極めて高速に処理すること
が可能となる。
This makes it possible to process data join operations of data strings with duplicate occurrences of join key values at extremely high speed.

゛[実施例] 以下第1図および第2図に示す実施例により、本発明を
さらに具体的に説明する。
゛[Examples] The present invention will be explained in more detail below with reference to Examples shown in FIGS. 1 and 2.

第1図は本発明の原理ブロック図を兼ねた実施例ブロッ
ク図である。
FIG. 1 is an embodiment block diagram which also serves as a principle block diagram of the present invention.

第2図は、本発明の実施例においてモードレジスタにお
けるモードの遷移を示す状態遷移図である。
FIG. 2 is a state transition diagram showing mode transitions in the mode register in the embodiment of the present invention.

本実施例では、第1図において示すモードレジスタ4の
モードを、現在のモードと、比較器1と比較器2の比較
結果によって、第2図の状態遷移図に示すように遷移さ
せると共に、次に説明するように、結合データの出力、
現データアドレスの更新、現データアドレスの退避等の
ための制御を行う。
In this embodiment, the mode of the mode register 4 shown in FIG. 1 is changed as shown in the state transition diagram of FIG. 2 according to the current mode and the comparison results of comparators 1 and 2, and output of the combined data, as described in
Performs control for updating the current data address, saving the current data address, etc.

以下の説明に使用する記号の意味は次のとおりである。The meanings of the symbols used in the following explanation are as follows.

N:ノーマルモード、 D二重複モード(後続の重複結合キーのデータが処理中
)、 A/B :昇順にソートされているデータストリング(
重複キーのチェックが行われる 基準ストリングをBとする) d:Bの現データのキーと直後のデータのキーが同一か
否かを示す値で、d=lは一敗を、d=Qは不一致を示
す。d=Xは一致でも、不一致でもよいことを示す。
N: Normal mode, D double duplicate mode (data of the subsequent duplicate join key is being processed), A/B: data string sorted in ascending order (
The reference string used to check for duplicate keys is B) d: A value indicating whether the key of the current data of B and the key of the data immediately after are the same, d=l means one loss, d=Q means Indicates a discrepancy. d=X indicates that it may be a match or a mismatch.

e:Aの現データのキーとBの現データのキーが同一か
否かを示す値で、e=lは一致を、e=Qは不一致を示
す。
e: A value indicating whether the key of the current data of A and the key of the current data of B are the same or not; e=l indicates a match, and e=Q indicates a mismatch.

KA:Aの現データのキー、 KB : Bの現データのキー、 現モードとdとeの値とによって、モードの遷移と行う
べき処理は次に示すように行われよう制御する。
KA: key of current data of A; KB: key of current data of B; mode transition and processing to be performed are controlled as shown below according to the current mode and the values of d and e.

(1)(モード、  d/e)=  (N、  l/1
) :モード=D。
(1) (mode, d/e) = (N, l/1
) :Mode=D.

A、Bの現データの結合データ又は識別番号(10)の
組の出力、 Aの現データアドレスの退避、 への現データアドレスの更新。
Output the combined data of the current data of A and B or the set of identification numbers (10), Save the current data address of A, Update the current data address to .

(2)(モード、  d/e)=  (N、  O/1
) :A、Bの現データの結合データ又はID0組出力
、 Aの現データアドレスの更新。
(2) (mode, d/e) = (N, O/1
): Combined data of A and B's current data or ID0 set output, update of A's current data address.

(3)(モード、  d/e)=  (N、  X10
) :KA<KBならば、 Aの現データアドレスの更新、 KA>KBならば、 Bの現データアドレスの更新。
(3) (mode, d/e) = (N, X10
): If KA<KB, update the current data address of A; if KA>KB, update the current data address of B.

(4)(モード、  d/e)=  (D、  X/1
) :A、Bの現データの結合データ又は10の紐出力
、 Aの現データアドレスの更新。
(4) (mode, d/e) = (D, X/1
): Combined data of current data of A and B or output of 10 strings, update of current data address of A.

(5)(モード、  d/e)=  (D、  l10
) :への退避アドレスの回復、 Bの現データアドレスの更新。
(5) (mode, d/e) = (D, l10
): Restore the save address to , update the current data address of B.

(6)(モード、  d/e)=  (D、  010
) :モードff1N1 Bの現データアドレスの更新。
(6) (mode, d/e) = (D, 010
): Update the current data address of mode ff1N1B.

第2図の状態遷移図は、モードの遷移を示し、現在のモ
ードがNモードであるとき、d/eが0/1およびxl
oのときは遷移せず、1/1のときDモードに遷移し、
また現在のモードがDモードのとき、d/eがIloお
よびx/1のときは遷移せず、010のときNモードに
遷移することを示している。
The state transition diagram in FIG. 2 shows the mode transition, and when the current mode is N mode, d/e is 0/1 and xl
No transition occurs when o, transitions to D mode when 1/1,
Further, when the current mode is D mode, no transition occurs when d/e is Ilo and x/1, and transition to N mode occurs when d/e is 010.

[発明の効果1 以上説明のように本発明によれば、結合キーの重複を許
して、二つのソート済みデータ列のデータ結合操作を高
速に処理することができ、データ処理効率の向上に寄与
する効果は極めて大である。
[Advantageous Effects of the Invention 1] As explained above, according to the present invention, it is possible to allow duplication of join keys and process the data join operation of two sorted data columns at high speed, contributing to improvement in data processing efficiency. The effect of doing so is extremely large.

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

第1図は本発明の原理ブロック図、 第2図は本発明の実施例におけるモードの遷移を示す状
B遷移図、 第3図は従来のソフトウェアによる処理例を示すフロー
チャート、 第4図はデータ列の例を示す図である。 図面において、 1は第1の比較器、     2は第2の比較器、3は
ア°ドレス退避レジスタ、4はモードレジスタ、5はゲ
ート手段、     6は記憶装置、をそれぞれ示す。 本発明の原理ブロック図 第1図 本発明の実施例におけるモードの遷移を示す状態遷移2
第  2  図 従来のソフトウェアによる処理例を示すフローチャート
データ列 A            データ列 Bキ
一部  番号 データ列の例を示す図 第4図
Fig. 1 is a principle block diagram of the present invention, Fig. 2 is a state B transition diagram showing mode transitions in an embodiment of the present invention, Fig. 3 is a flowchart showing an example of processing by conventional software, and Fig. 4 is data It is a figure which shows the example of a column. In the drawings, 1 is a first comparator, 2 is a second comparator, 3 is an address save register, 4 is a mode register, 5 is a gate means, and 6 is a storage device. Principle block diagram of the present invention Figure 1 State transition 2 showing mode transition in the embodiment of the present invention
Fig. 2 Flowchart showing an example of processing by conventional software Data string A Data string B Partial Diagram showing an example of a number data string Fig. 4

Claims (1)

【特許請求の範囲】 二つのソート済みデータ列のキー値の突き合せ比較を行
う第1の比較器(1)と、 前記二つのデータ列のうちの一つのデータ列における現
在のデータとこれに続くデータのキー値の比較を行う第
2の比較器(2)と、 該第2の比較器(2)がキー値の重複を検出したときの
重複時処理のため、再開始するアドレスを記憶するアド
レス記憶手段(3)と、 キー値の重複時処理状態を示すモード記憶手段(4)と
、 前記第1の比較器(1)が一致を検出したとき二つのデ
ータ列を結合するゲート手段(5)とを備え、二つのデ
ータ列のデータ結合操作を連続的に処理するよう構成し
たことを特徴とするデータ結合回路。
[Claims] A first comparator (1) that performs a match comparison of key values of two sorted data strings; A second comparator (2) that compares the key values of the following data, and stores the address to restart for duplication processing when the second comparator (2) detects duplication of key values. mode storage means (4) for indicating a processing state when key values overlap; and gate means for combining two data strings when the first comparator (1) detects a match. (5) A data combination circuit characterized in that it is configured to continuously process a data combination operation of two data strings.
JP61127791A 1986-06-02 1986-06-02 Data coupling circuit Pending JPS62284432A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61127791A JPS62284432A (en) 1986-06-02 1986-06-02 Data coupling circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61127791A JPS62284432A (en) 1986-06-02 1986-06-02 Data coupling circuit

Publications (1)

Publication Number Publication Date
JPS62284432A true JPS62284432A (en) 1987-12-10

Family

ID=14968766

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61127791A Pending JPS62284432A (en) 1986-06-02 1986-06-02 Data coupling circuit

Country Status (1)

Country Link
JP (1) JPS62284432A (en)

Similar Documents

Publication Publication Date Title
JPS62284432A (en) Data coupling circuit
US20050050260A1 (en) Reverse search system and method
JP2922025B2 (en) Name search method
JPH01287729A (en) Stream data processor
JPS62154139A (en) Data selecting device
JPS63261421A (en) Character string processor
JPH04279973A (en) Character string comparison system
JPS62169273A (en) Registration and reference system for label information in language processing program
JP3007356B2 (en) Compiling device
JPH05108719A (en) Information retrieving device
JPH0484261A (en) Error notation retrieval system
JP2610028B2 (en) Voiced and semi-voiced sound conversion processor
NO965051L (en) Procedure for serial data transfer for recognition of a fixed pattern
JP2896315B2 (en) Logic simulation method
JPS592142A (en) Bit train retrieving system
JPS6072023A (en) Information retrieving device
JPH04129429A (en) Dictionary retrieval system for data compressor
JPH04245375A (en) Control system of symbol string collating device
JPS61250731A (en) Data merge instruction control system
JPS63257030A (en) Character string retrieving circuit
JPS58140858A (en) Transfer system for arithmetic data
JPS61278933A (en) Data sorting out system
JPH0421179A (en) Character string retrieving system
JPH05100821A (en) Priority encoder device
JPH05143648A (en) Information register and retrieval device