JPH07101382B2 - Margin processing device - Google Patents

Margin processing device

Info

Publication number
JPH07101382B2
JPH07101382B2 JP62191173A JP19117387A JPH07101382B2 JP H07101382 B2 JPH07101382 B2 JP H07101382B2 JP 62191173 A JP62191173 A JP 62191173A JP 19117387 A JP19117387 A JP 19117387A JP H07101382 B2 JPH07101382 B2 JP H07101382B2
Authority
JP
Japan
Prior art keywords
record
read
string
address
records
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 - Lifetime
Application number
JP62191173A
Other languages
Japanese (ja)
Other versions
JPS6433628A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP62191173A priority Critical patent/JPH07101382B2/en
Publication of JPS6433628A publication Critical patent/JPS6433628A/en
Publication of JPH07101382B2 publication Critical patent/JPH07101382B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、あらかじめソートした複数個のレコード列を
入力として、1個のソート済みレコード列として出力す
るマージ処理装置に関する。
TECHNICAL FIELD The present invention relates to a merge processing device that inputs a plurality of pre-sorted record strings and outputs it as one sorted record string.

〔従来の技術〕[Conventional technology]

一般に、データベース処理で扱うデータをレコードと称
しているが、該レコードは複数の異なる属性を持つカラ
ムから構成されている。従って、データベース処理で
は、横方向にカラムを縦方向にレコードを並べた表形式
のデータを処理の対象としてソートやマージ処理が行わ
れることゝなる。この表形式をしたデータ自体をデータ
ベースと称する。
Generally, data handled in database processing is called a record, and the record is composed of a plurality of columns having different attributes. Therefore, in the database processing, sorting and merging processing is performed with the tabular data in which the columns are arranged horizontally and the records vertically. The tabular data itself is called a database.

この種データベース処理では、レコードの件数が極めて
大きいデータベースや、複数の異なる情報を持つデータ
ベースを処理の対象とすることから、汎用の電子計算機
でソートやマージ処理を行うと膨大な時間を必要とする
場合が多い。このため、データベース処理の一部あるい
は全体を直接ハードウェアで実行し、高速化する専用処
理装置が提案されている。こゝでは、その一例として特
開昭61−42031号のソート処理装置について説明する。
In this kind of database processing, a database with a very large number of records and a database with a plurality of different information are targeted for processing. Therefore, sorting and merging with a general-purpose computer requires a huge amount of time. In many cases. For this reason, a dedicated processing device has been proposed in which part or all of the database processing is directly executed by hardware to increase the speed. Here, as an example thereof, the sort processing device disclosed in JP-A-61-42031 will be described.

第2図は、特開昭61−42031号に示す従来技術のソート
処理装置の構成図である。同図において、11はソート回
路、12は大容量のバッファメモリ、50は制御回路、51は
入力レジスタ、52は出力レジスタ、53はバンクアドレス
発生回路、54はソート入出力切替え回路、55は読出しア
ドレス発生回路、56は書込みアドレス発生回路、57はア
ドレス切替回路、58はデータ切替回路、59は切替制御線
(ST)、60はバンクアドレス線(BA)、61はI相信号線
(I)、62はII相信号線(II)、63は状態制御線(IN
T)、64はソート入出力切替信号線(PUP)、65は入力制
御線(PUSH)、66は出力制御線(POP)、67はデータ入
出力線(DIO)である。
FIG. 2 is a block diagram of a prior art sort processing device shown in Japanese Patent Laid-Open No. 61-42031. In the figure, 11 is a sort circuit, 12 is a large-capacity buffer memory, 50 is a control circuit, 51 is an input register, 52 is an output register, 53 is a bank address generation circuit, 54 is a sort input / output switching circuit, and 55 is a read circuit. Address generating circuit, 56 write address generating circuit, 57 address switching circuit, 58 data switching circuit, 59 switching control line (ST), 60 bank address line (BA), 61 I phase signal line (I), 62 is a II phase signal line (II), 63 is a state control line (IN
T), 64 is a sort input / output switching signal line (PUP), 65 is an input control line (PUSH), 66 is an output control line (POP), and 67 is a data input / output line (DIO).

本ソート処理装置におけるソート処理の過程は、初期ソ
ート段階とマージ段階からなり、切替制御線(ST)59に
よって指定する。初期ソート段階は、データ入出力線67
から与えられる大量な件数の入力レコードを分割してソ
ート回路11に入力し、分解した件数のレコードをソート
して、バッファメモリ12内にソート済みのレコード列を
格納する段階である。マージ段階は、初期ソート段階で
バッファメモリ12内に生成した複数のレコード列をマー
ジしてデータ入出力線67から出力する段階である。な
お、第2図の動作は特開昭61−42031号に詳述されてい
るので、こゝでは説明を省略する。
The process of the sorting process in this sort processing device includes an initial sorting stage and a merging stage, which are designated by a switching control line (ST) 59. The initial sorting stage is data input / output line 67
It is a stage in which a large number of input records given from are divided and input to the sorting circuit 11, the decomposed records are sorted, and the sorted record string is stored in the buffer memory 12. The merging stage is a stage in which a plurality of record strings generated in the buffer memory 12 in the initial sorting stage are merged and output from the data input / output line 67. Since the operation of FIG. 2 is described in detail in Japanese Patent Laid-Open No. 61-42031, the description thereof will be omitted here.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

第2図に示す従来技術では、マージ処理過程におけるバ
ッファメモリからのレコードの読出しに、該読出すレコ
ードが属するレコード列を指定するバンクアドレスと、
レコード列内のレコード位置を指定するレコードアドレ
スを必要としていた。このため、バッファメモリの読出
しアドレスの計算が複雑になり、アドレス計算を行う制
御用ハードウェア部分が大きくならざるを得なかった。
このため、小形で高性能なソート処理装置を構成する上
で、問題があった。また、レコードアドレスは、レコー
ド列毎に必要であるから、マージするレコード列の数に
等しい数のレコードアドレスを格納するハードウェアが
必要となり、一度にマージできるレコード列数の上限を
規定する要因となる問題もあった。
In the prior art shown in FIG. 2, when reading a record from the buffer memory in the merge process, a bank address designating a record row to which the read record belongs,
It required a record address to specify the record position within the record string. For this reason, the calculation of the read address of the buffer memory becomes complicated, and the control hardware portion for performing the address calculation is inevitably large.
Therefore, there is a problem in constructing a compact and high-performance sort processing device. Further, since the record address is required for each record column, hardware that stores the same number of record addresses as the number of record columns to be merged is required, which is a factor that defines the upper limit of the number of record columns that can be merged at one time. There was also a problem.

更に、マージ処理の過程に於て、レコード列内の全レコ
ードの出力が完了したか否かを判定するためのハードウ
ェアが必要であり、全レコードが出力された場合には、
該当するレコード列に対して次のレコードの出力を要求
しないように制御を変えなければならない問題があり、
各レコード列からのレコードの読出し完了を検出して、
自動的にマージ制御を変更できる機構を、少ないハード
ウェア量で実現することが望まれていた。
Furthermore, in the process of merging, hardware is required to determine whether the output of all records in the record string has been completed. If all records have been output,
There is a problem that the control must be changed so that the output of the next record is not requested for the corresponding record string.
Detecting the completion of reading records from each record string,
It was desired to realize a mechanism that can automatically change the merge control with a small amount of hardware.

本発明は、上記従来技術の問題点を除去することを目的
として、複数個のレコード列を1度にマージする場合の
制御回路を簡略化して、ハードウェア量の削減を図り、
より小型で高性能なマージ処理装置を提供することにあ
る。
The present invention aims to eliminate the above-mentioned problems of the prior art, simplifies the control circuit when merging a plurality of record strings at one time, and reduces the amount of hardware.
It is to provide a smaller and higher-performance merge processing device.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、昇順或いは降順にあらかじめソートされた複
数個のレコード列を格納するレコード格納手段と、複数
のレコードの内から最大或いは最小のレコードを抽出
し、残りのレコードを保持するソート手段と、レコード
格納手段から読出されるレコードに、該レコードが属す
るレコード列内の次のレコードのアドレス情報を付加し
て前記ソート手段に入力すると共に、該ソート手段で抽
出されたレコードに付加されたアドレス情報により前記
レコード格納手段から次のレコードを読出す制御手段と
を設ける。
The present invention, a record storage means for storing a plurality of record strings pre-sorted in ascending order or descending order, a sorting means for extracting the maximum or minimum record from the plurality of records and holding the remaining records, The address information of the next record in the record string to which the record belongs is added to the record read out from the record storage unit and input to the sort unit, and the address information added to the record extracted by the sort unit. Control means for reading the next record from the record storage means.

〔作 用〕[Work]

最初、レコード格納手段から複数個のレコード列の各々
の先頭レコードを読出し、該読出した各先頭レコードに
当該先頭レコードが属するレコード列内の次のレコード
のアドレス情報を付加してソート手段に入力する。ソー
ト手段では、入力された複数の先頭レコードの内から最
大或いは最小のレコードを抽出し、残りのレコードは保
持しておく。
First, the head record of each of the plurality of record strings is read from the record storage means, the address information of the next record in the record string to which the head record belongs is added to each read head record, and the result is input to the sorting means. . The sorting means extracts the maximum or minimum record from the plurality of input top records and retains the remaining records.

次に、ソート手段で抽出されたレコードに付加されたア
ドレス情報により、レコード格納手段から一つのレコー
ドを読出し、該読出したレコードに当該レコードが属す
るレコード列内の次のレコードのアドレス情報を付加し
てソート手段に入力する。ソート手段は、該入力された
レコードと保持しておいたレコードとの内から同様に最
大或いは最小のレコードを抽出し、残りのレコードは再
び保持しておく。
Next, one record is read from the record storage means by the address information added to the record extracted by the sorting means, and the read record is added with the address information of the next record in the record sequence to which the record belongs. Enter into the sorting means. The sorting means similarly extracts the maximum or minimum record from the input record and the held record, and holds the remaining records again.

以下、抽出したレコードの持つアドレス情報によりレコ
ード格納手段からのレコードの読出し、該読出したレコ
ードに次のレコードのアドレス情報を付加してソート手
段に入力する処理を繰返して、レコード格納手段に格納
されている複数レコード列をマージする。あるレコード
列に含まれる全てのレコードの読出しを完了した場合
は、該レコード列の全レコードに対して最大/最小ある
いはそれを越える終端レコードをソート手段に入力し、
当該レコード列から次のレコードを読み出さないように
する。
Hereinafter, the process of reading a record from the record storage means based on the address information of the extracted record, adding the address information of the next record to the read record, and inputting it to the sorting means is stored in the record storage means. Merge multiple record columns. When the reading of all the records included in a certain record string is completed, the end record which is the maximum / minimum or more than all the records of the record string is input to the sorting means,
Do not read the next record from the record string.

これにより、従来、レコード列内の読出しレコードの位
置を保存するために必要であった回路や種々のカウンタ
回路等を不要とし、より小型で高性能なマージ処理装置
を実現できる。
As a result, it is possible to realize a more compact and high-performance merge processing device by eliminating the circuit and various counter circuits that were conventionally required to store the position of the read record in the record string.

〔実施例〕〔Example〕

以下、本発明の一実施例について図面を参照して説明す
る。
An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例の構成図である。図中、11は
入力したレコードの最大或いは最小となるレコードを抽
出するソート回路、12はソート済みレコード列を格納す
るバッファメモリ、13はバッファメモリ12の読出しアド
レスを算出するアドレスカウンタ、14は読出しアドレス
の初期値を入力する初期アドレス入力線、15はバッファ
メモリ12のアドレス線、16はバッファメモリ12のデータ
出力線、17はソート回路11へのレコード入力線、18はソ
ート回路11からのレコード出力線、19はマージ結果を出
力するためのレコード出力線、20はソート回路11から出
力したレコードの持つアドレスをアドレスカウンタ13に
入力するための読出しアドレス入力線である。21はバッ
ファメモリ12内に格納したレコード列を模式的に示す三
角形で、三角形の高さがレコードを比較する際のレコー
ドの大きさを示している。22はレコード列の最後尾に格
納した終端レコード、23はソート回路11に入力するレコ
ード、24はソート回路11からの出力レコードの構成を示
している。
FIG. 1 is a block diagram of an embodiment of the present invention. In the figure, 11 is a sorting circuit for extracting the maximum or minimum input record, 12 is a buffer memory for storing sorted record strings, 13 is an address counter for calculating a read address of the buffer memory 12, and 14 is a read. Initial address input line for inputting initial value of address, 15 address line of buffer memory 12, 16 data output line of buffer memory 12, 17 record input line to sort circuit 11, 18 record from sort circuit 11 An output line, 19 is a record output line for outputting the merged result, and 20 is a read address input line for inputting the address of the record output from the sort circuit 11 to the address counter 13. Reference numeral 21 is a triangle that schematically shows the record string stored in the buffer memory 12, and the height of the triangle indicates the size of the record when comparing the records. Reference numeral 22 denotes a terminal record stored at the end of the record string, 23 denotes a record input to the sort circuit 11, and 24 denotes a configuration of an output record from the sort circuit 11.

以下に本実施例におけるマージ処理の手順を示す。こゝ
では、バッファメモリ12には降順にソートした3個のレ
コード列A,B,Cが格納されており、それらを同じく降順
に1個のレコード列に併合(マージ)するものとする。
各レコード列A,B,Cの最後尾に付加する終端レコード22
は、マージ処理の対象とするレコードの中で最小あるい
はそれ以下の値を持つレコードであり、図示のように−
∞で表す。
The procedure of the merge process in this embodiment is shown below. Here, three record strings A, B, C sorted in descending order are stored in the buffer memory 12, and these are similarly merged into one record string in descending order.
End record 22 added to the end of each record string A, B, C
Is a record having a minimum value or less among the records to be merged, and as shown in the figure,
Expressed as ∞.

まず、バッファメモリ12内に格納した3個のレコード列
A,B,Cの先頭レコードを読出すための初期アドレスを線1
4からアドレスカウンタ13に順次入力し、バッファメモ
リ12から3個の先頭レコードを順次読出す。
First, the three record strings stored in the buffer memory 12
The initial address for reading the first record of A, B, C is line 1
The address counter 13 is sequentially input from 4 and the three head records are sequentially read from the buffer memory 12.

各レコードは、そのレコード長に応じた回数に分割して
バッファメモリ12から読出され、その時のアドレスはア
ドレスカウンタ13によって算出される。従って、例えば
レコード列Aの先頭レコードの読出しが完了した時点
で、アドレスカウンタ13の出力は、該先頭レコードと同
一レコード列Aにおける次のレコードの読出しアドレス
を示すことゝなる。これはレコード列B,Cの先頭レコー
ドが読出された場合も同様である。そこで、バッファメ
モリ12から3個のレコード列A,B,Cの各先頭レコードが
順次読出される毎に、その時のアドレス入力線15で示さ
れるアドレスカウンタ12の出力値、即ち、同一レコード
列の次のレコードの読出しアドレスを該当先頭レコード
に付加してソート回路11に入力する。
Each record is read from the buffer memory 12 by dividing the number of times according to the record length, and the address at that time is calculated by the address counter 13. Therefore, for example, when the reading of the first record of the record string A is completed, the output of the address counter 13 indicates the read address of the next record in the same record string A as the first record. This is the same when the first record of the record strings B and C is read. Therefore, each time the first record of each of the three record strings A, B, and C is sequentially read from the buffer memory 12, the output value of the address counter 12 indicated by the address input line 15 at that time, that is, the same record string The read address of the next record is added to the corresponding top record and input to the sort circuit 11.

第1図中の23はバッファメモリ12から読出したレコード
(レコード本体)に、該レコードと同一レコード列の次
のレコードの読出しアドレス(次アドレス)を付加した
様子を示したものである。次アドレスを付加する位置と
しては、レコード本体を比較する際に影響を与えない位
置とする。一般には、レコードの比較は、上位ビット
(MSB)から優先的に行うことから、次アドレスの付加
位置は、下位ビット(LSB)側とするのがよい。
Reference numeral 23 in FIG. 1 shows a state in which the read address (next address) of the next record in the same record string as the record is added to the record (record body) read from the buffer memory 12. The position where the next address is added is a position that does not affect the comparison of the record bodies. Generally, since the comparison of records is performed with priority from the upper bit (MSB), the addition position of the next address should be on the lower bit (LSB) side.

ソート回路11は、入力されたレコード列A,B,Cの各先頭
レコードの大小を相互に比較し、そのうちの最大のレコ
ードを抽出する。この時、ソート回路11で抽出されレコ
ードが、マージ処理を行おうとしている3個のレコード
列A,B,Cを構成する全てのレコード中の最大のレコード
である。このソート回路11で抽出されたレコード(本
体)を、マージ結果としてレコード出力線19より出力
し、残りの2個のレコードはソート回路11内に保持して
おく。これで、1回目のマージ処理が終了する。
The sort circuit 11 compares the sizes of the top records of the input record sequences A, B, and C with each other, and extracts the largest record. At this time, the record extracted by the sort circuit 11 is the largest record among all the records forming the three record strings A, B, and C to be merged. The record (main body) extracted by the sorting circuit 11 is output from the record output line 19 as a merged result, and the remaining two records are held in the sorting circuit 11. This completes the first merge process.

一方、ソート回路11で抽出し、レコード出力線19より出
力されるレコードが持つ次アドレスを読出しアドレス入
力線20を介してアドレスカウンタ13に入力する。該アド
レスカウンタ13のアドレスによって、バッファメモリ12
から次のレコードを読出し、上記と同様にして、該読出
したレコードに次のレコードの読出しアドレスを付加し
てソート回路11に入力する。ソート回路11では、該入力
されたレコードと保持されている2個のレコードの相互
の大小を比較し、そのうちの最大のレコードを抽出す
る。この抽出されたレコードは、3個のレコード列A,B,
Cを構成する全レコード中の2番目に大きいレコードで
あり、これをマージ結果としてレコード出力線19により
出力し、残りの2個のレコードはソート回路11内に再び
保持する。これで、2回目のマージ処理が終了する。
On the other hand, the next address of the record extracted by the sort circuit 11 and output from the record output line 19 is input to the address counter 13 via the read address input line 20. According to the address of the address counter 13, the buffer memory 12
The next record is read from, and the read address of the next record is added to the read record and input to the sort circuit 11 in the same manner as above. The sort circuit 11 compares the input record and the two held records with each other to extract the largest record. This extracted record consists of three record strings A, B,
It is the second largest record of all the records that make up C, and is output as the merged result through the record output line 19, and the remaining two records are held in the sorting circuit 11 again. This completes the second merge process.

以下、レコード出力線19より出力されるマージ結果レコ
ードが持つ次アドレスをアドレスカウンタ13に入力し
て、バッファメモリ12からの次レコードの読出し、該読
出した次レコードに更に次のレコード読出しアドレスを
付加してソート回路11に入力する動作を繰返すことによ
って、順次、3個のレコード列A,B,Cを構成するレコー
ドのマージ処理を進めていく。
Hereinafter, the next address of the merge result record output from the record output line 19 is input to the address counter 13, the next record is read from the buffer memory 12, and the next record read address is added to the read next record. By repeating the operation of inputting to the sort circuit 11, the merging process of the records forming the three record strings A, B and C is sequentially advanced.

このようにして、対象とするレコード列内の全てのレコ
ードを読出して、ソート回路11によってマージし、出力
した段階では、該ソート回路11から出力されたレコード
列内の最終レコードを持つ次アドレスは、終端レコード
22の読出しアドレスである。この終端レコード22も、バ
ッファメモリ12より同様にして読出し、ソート回路11に
入力する。しかし、終端レコード22は、マージ対象とす
る全てのレコードに対し、最も小さい値を示す−∞であ
るから、マージ処理が完了するまでソート回路11から出
力されることはない。従って、終端レコード22に付加す
る次レコードのアドレスは意味なく、何れの値であった
もマージ操作に悪影響を及ぼすことはない。3個のレコ
ード列A,B,Cの各終端レコード22がソート回路11に保持
されたらマージ処理を終了とする。
In this way, when all the records in the target record string are read, merged by the sort circuit 11, and output, the next address having the final record in the record string output from the sort circuit 11 is , End record
22 read addresses. The end record 22 is also read from the buffer memory 12 in the same manner and input to the sorting circuit 11. However, since the end record 22 is −∞, which is the smallest value for all the records to be merged, it is not output from the sort circuit 11 until the merge process is completed. Therefore, the address of the next record added to the end record 22 is meaningless, and any value does not adversely affect the merge operation. When each end record 22 of the three record strings A, B, and C is held in the sort circuit 11, the merge process ends.

本実施例では、バッファメモリ12内に格納した3個のレ
コード列A,B,Cをマージして出力する場合を示したが、
バッファメモリ12内に格納するレコード列の数が3以外
の場合にも、同様にして拡張することが出来る。また、
本実施例では、降順にソートされたレコード列を入力と
して、降順にソートされたレコード列を出力するマージ
処理の例を示したが、昇順にマージする場合には、入力
レコード列を昇順にソートしてバッファメモリに格納
し、レコード列の最後尾に付加する終端レコードを、処
理の対象とするレコードの最大値あるいはそれ以上の値
となるレコード、即ち、+∞とすることによって容易に
実現できる。
In this embodiment, the case where the three record strings A, B and C stored in the buffer memory 12 are merged and output is shown.
Even when the number of record strings stored in the buffer memory 12 is other than 3, the same expansion can be performed. Also,
In the present embodiment, the example of the merge process in which the record string sorted in the descending order is input and the record string sorted in the descending order is output is shown. However, when merging in the ascending order, the input record string is sorted in the ascending order. Then, it can be easily realized by setting the end record added to the end of the record string in the buffer memory as the record having the maximum value or more of the record to be processed, that is, + ∞. .

また、本実施例では、バッファメモリ12内に格納するレ
コード列の最後尾に終端レコードをあらかじめ格納する
方法を示したが、レコード列毎に最終レコードを検出し
て、外部で終端レコードを発生してソート回路11に入力
することによっても、本実施例と同様にマージ動作を制
御することが出来る。
In addition, in the present embodiment, the method of pre-storing the end record at the end of the record string stored in the buffer memory 12 has been described, but the end record is generated externally by detecting the last record for each record string. It is also possible to control the merging operation by inputting it to the sorting circuit 11 in the same manner as in the present embodiment.

さらに、実施例では、アドレスを指定することによって
レコードを読出すことが出来るバッファメモリ12をレコ
ード格納手段とする場合の例を示したが、磁気テープ装
置や磁気ディスク装置、あるいは磁気バブル装置等の大
容量なレコードの格納と、連続したレコードの読出しが
行える装置をレコード格納手段として用いることもでき
る。
Further, in the embodiment, the example in which the buffer memory 12 capable of reading a record by designating an address is used as the record storage means is shown, but a magnetic tape device, a magnetic disk device, a magnetic bubble device or the like is used. A device capable of storing a large amount of records and reading consecutive records can also be used as the record storage means.

また、レコード格納手段にレコードを格納するにあたっ
ては、物理的に連続する領域に格納することは必要な
く、昇順或いは降順にソートされたレコード列内の論理
的に連続するレコード、即ちソートによって整列したレ
コードの読出しに必要なポインタを隣接するレコードの
格納位置から算出できれば十分である。本実施例では、
バッファメモリ12の物理的に連続する領域にレコード列
を格納していることから、(直前に読出したレコードの
格納アドレス)+(直前に読出したレコードの長さ)に
よって、次に読出すべきレコードの格納アドレスを求め
ることができるものである。
Further, when the records are stored in the record storage means, it is not necessary to store the records in physically continuous areas, and logically continuous records in the record sequence sorted in ascending or descending order, that is, sorted by sorting. It suffices if the pointer required for reading a record can be calculated from the storage positions of adjacent records. In this embodiment,
Since the record string is stored in the physically continuous area of the buffer memory 12, the record to be read next is determined by (storage address of record read immediately before) + (length of record read immediately before). The storage address of can be obtained.

〔発明の効果〕〔The invention's effect〕

以上の説明から明らかであるように、本発明によれば、
マージ処理の制御が簡単になり、従来、レコード列内の
読出しレコードの位置を保存するために必要であった回
路や種々のカウンタ回路等を不要とし、より小型で高性
能なマージ処理装置を実現できる。
As is apparent from the above description, according to the present invention,
Control of merge processing is simplified, and circuits that were conventionally required to store the position of the read record in the record string and various counter circuits are unnecessary, and a smaller and higher-performance merge processing device is realized. it can.

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

第1図は本発明の一実施例の構成図、第2図は従来の構
成例を示す図である。 11……ソート回路、12……バッファメモリ、 13……アドレスカウンタ、 14……初期アドレス入力線、 22……終端レコード、 23……ソート回路への入力レコード、 24……ソート回路からの出力レコード。
FIG. 1 is a configuration diagram of an embodiment of the present invention, and FIG. 2 is a diagram showing a conventional configuration example. 11 …… sort circuit, 12 …… buffer memory, 13 …… address counter, 14 …… initial address input line, 22 …… end record, 23 …… input record to sort circuit, 24 …… output from sort circuit record.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 松尾 比呂志 神奈川県横須賀市武1丁目2356番地 日本 電信電話株式会社情報通信処理研究所内 (56)参考文献 特開 昭61−72333(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Hiroshi Matsuo, Hiroshi Matsuo, 1356-2356 Take, Yokosuka City, Kanagawa Nippon Telegraph and Telephone Corporation, Information and Communication Processing Laboratory (56) Reference JP-A-61-72333 (JP, A)

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】昇順或いは降順にあらかじめソートされた
複数個のレコード列を格納するレコード格納手段と、 複数のレコードの内から最大或いは最小のレコードを抽
出し、残りのレコードを保持するソート手段と、 1回目は前記レコード格納手段から複数個のレコード列
の各々の先頭レコードを読出し、該読出した各先頭レコ
ードに当該先頭レコードが属するレコード列内の次のレ
コードのアドレス情報を付加して前記ソート手段に入力
し、2回目以降は、前記ソート手段で抽出されたレコー
ドに付加されたアドレス情報により前記レコード格納手
段からレコードを読出し、該読出したレコードに当該レ
コードが属するレコード列内の次のレコードのアドレス
情報を付加して前記ソート手段に入力する制御手段と、 を具備し、前記複数個のレコード列を昇順或いは降順に
並び替えられた1個のレコード列にマージすることを特
徴とするマージ処理装置。
1. A record storage means for storing a plurality of record strings pre-sorted in ascending or descending order, and a sorting means for extracting a maximum or minimum record from the plurality of records and retaining the remaining records. The first time, the first record of each of the plurality of record strings is read from the record storage means, and the address information of the next record in the record string to which the first record belongs is added to each read first record and the sorting is performed. Input to the means, and from the second time onward, the record is read from the record storage means by the address information added to the record extracted by the sort means, and the next record in the record string to which the record belongs to the read record. And a control means for adding address information to the sorting means and inputting to the sorting means. Merge processing apparatus characterized by merging code string into one record sequence rearranged in ascending or descending order.
【請求項2】前記レコード格納手段に格納する各々のレ
コード列の最後に、ソート対象とする全レコードに対し
て最大もしくは最小あるいはそれを越えるレコードを終
端レコードとして付加し、各レコード列をマージする処
理過程に於て、前記ソート手段から抽出したレコードが
該当レコード列の最終レコードであった場合に、該最終
レコードに引続く該当終端レコードを前記ソート手段に
入力することを特徴とする特許請求の範囲第1項記載の
マージ処理装置。
2. A record string stored in the record storage means is added to the end of each record string stored in the record storage means, as a terminal record, the maximum or minimum record or a record exceeding the minimum record record, and the respective record strings are merged. In the processing, if the record extracted from the sorting means is the last record of the corresponding record string, the corresponding end record following the last record is input to the sorting means. The merge processing device according to claim 1.
JP62191173A 1987-07-30 1987-07-30 Margin processing device Expired - Lifetime JPH07101382B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62191173A JPH07101382B2 (en) 1987-07-30 1987-07-30 Margin processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62191173A JPH07101382B2 (en) 1987-07-30 1987-07-30 Margin processing device

Publications (2)

Publication Number Publication Date
JPS6433628A JPS6433628A (en) 1989-02-03
JPH07101382B2 true JPH07101382B2 (en) 1995-11-01

Family

ID=16270113

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62191173A Expired - Lifetime JPH07101382B2 (en) 1987-07-30 1987-07-30 Margin processing device

Country Status (1)

Country Link
JP (1) JPH07101382B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02206830A (en) * 1989-02-06 1990-08-16 Nippon Telegr & Teleph Corp <Ntt> Merge processing method
JPH0423072A (en) * 1990-05-17 1992-01-27 Mitsubishi Electric Corp Multi-file coupling processor
JP3152466B2 (en) * 1991-04-04 2001-04-03 三菱電機株式会社 Sorting device and sorting method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0782429B2 (en) * 1984-09-15 1995-09-06 カシオ計算機株式会社 How to merge multiple files

Also Published As

Publication number Publication date
JPS6433628A (en) 1989-02-03

Similar Documents

Publication Publication Date Title
US4611310A (en) Method and system for rearranging data records in accordance with keyfield values
JPH0218514B2 (en)
JPH0666050B2 (en) Sort processing method
JPH07101382B2 (en) Margin processing device
JPH024026B2 (en)
JPH02208716A (en) Character and pattern output device
JP3027754B2 (en) Associative memory
JP3141428B2 (en) Numerical value search apparatus and method
RU2039376C1 (en) Device for information search
JP2587447B2 (en) Sorting device
JPS6143338A (en) Searching of thin data base using association technology
US5953454A (en) Minimum distance storage device
JP2564942B2 (en) Selective associative memory device and control method thereof
JP2540899B2 (en) Sorter memory management method
JP2989962B2 (en) Vector processing equipment
JPH048816B2 (en)
JP3127969B2 (en) Dictionary storage device
JPH07120264B2 (en) Sort processing device
JPS63253431A (en) Retrieving system for data base of inverted structure
JPH1021053A (en) Data processor
JPH03260870A (en) Projection system for data base assist
JPH0145648B2 (en)
JPH07105325B2 (en) Charged beam exposure device
JPH06274391A (en) Master file quick update processing system
JPH05135180A (en) Pattern similarity calculation device

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071101

Year of fee payment: 12