JPS62121532A - Data retrieving method - Google Patents

Data retrieving method

Info

Publication number
JPS62121532A
JPS62121532A JP26143185A JP26143185A JPS62121532A JP S62121532 A JPS62121532 A JP S62121532A JP 26143185 A JP26143185 A JP 26143185A JP 26143185 A JP26143185 A JP 26143185A JP S62121532 A JPS62121532 A JP S62121532A
Authority
JP
Japan
Prior art keywords
data
sorting
storage device
sort
page
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
JP26143185A
Other languages
Japanese (ja)
Inventor
Tadamasa Kamikubo
上久保 忠正
Takashi Onari
大成 尚
Noboru Tsuchiya
土屋 昇
Kazuhiro Sugino
杉野 和宏
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP26143185A priority Critical patent/JPS62121532A/en
Publication of JPS62121532A publication Critical patent/JPS62121532A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To extract data in sorting order at a high speed by generating a relative address table of all page numbers of data to be sorted in a main storage device or external storage device, and sorting and rearranging the data according to the table. CONSTITUTION:Data is represented by page numbers of a disk file and in-page relative addresses and the sorting order is expressed by their arrangement order, so sorting results are stored with small storage capacity. Then, the stored sorting results become more than those in tree structure of each page and the number of times of input to and output from the buffer 8 and external storage device 4 for knowing the sorting order decreases. When one data is outputted, a reference to the sorting table 7 and a reference to data based upon the sorting table are both necessary, but reference records in the sorting table 7 are already present on the buffer frequently, so the input/output operation of the external storage device 7 is performed only once. Thus, data are processed at a high speed.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、データをファイルから取り出し加工するデー
タ処理方法に係り、特に多量のデータを指定した順番で
取り出すのに好適なデータ検索方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a data processing method for extracting and processing data from a file, and particularly to a data retrieval method suitable for extracting a large amount of data in a specified order.

〔発明の背景〕[Background of the invention]

従来、データは、それを構成するある項目をキーに、そ
の順序関係より成る木構造で表現される6木の各節点は
、キー値、下位・上位レベル節点へのポインタ、データ
へのポインタ等から成っている。データ処理時間の中で
、主記憶装置と外部記憶装置との入出力時間は大きな割
合を占め、データを高速に処理するためには、その入出
力回数を減らすことが利要である。木構造のデータにお
いて、データをキー類に取り出すとき、木の枝をたどっ
て次のデータを求めるが、1度に多くの木構造に関する
情報を主記憶装置に読込んだ方が、入出力回数が少なく
て済み高速化が図れる。そのため、キー類にデータを取
り出すために必要な情報を、いかにして少ない情報量で
表現するかが問題となる。
Conventionally, data is expressed in a tree structure consisting of a certain item that constitutes it as a key and its order relationship.Each node in the tree has a key value, a pointer to a lower/upper level node, a pointer to data, etc. It consists of The input/output time between the main storage device and the external storage device accounts for a large proportion of the data processing time, and in order to process data at high speed, it is important to reduce the number of input/output operations. In tree-structured data, when data is retrieved into keys, the next data is obtained by tracing the branches of the tree, but it is better to read a large amount of tree-structured information into main memory at once, which reduces the number of input/outputs. It is possible to increase the speed by reducing the number of times. Therefore, the problem is how to express the information necessary for extracting data to keys with a small amount of information.

なお、データ検索に関連するものには、特開昭58−3
032号、特開昭58−97742号、特開昭58−1
15543号等が挙げられる。
For information related to data retrieval, please refer to Japanese Unexamined Patent Publication No. 58-3.
No. 032, JP-A-58-97742, JP-A-58-1
No. 15543 etc. are mentioned.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、少ない情報量でソート結果を表現し、
データをソート類に高速に取り出すことを可能にするデ
ータ検索方法を提供することにある。
The purpose of the present invention is to express sorting results with a small amount of information,
An object of the present invention is to provide a data retrieval method that allows data to be sorted and retrieved at high speed.

〔発明の概要〕[Summary of the invention]

本発明は、ソート処理部を格納した主記憶装置、CPU
、外部記憶装置を含んで構成されるシステムにおいて、
ソート対象データの外部記憶装置中格納位置を項目とす
る表を主記憶装置又は外部記憶装置に設け、データ出力
時に上記表に基づいてデータを出力するようにしたもの
である。
The present invention includes a main storage device storing a sorting processing section, a CPU
, in a system including an external storage device,
A table is provided in the main storage device or the external storage device, and the data is outputted based on the table when data is output.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明方法を実現する一実施例を第1図〜第3図
に基づいて説明する。第1図は本実施例におけるシステ
ム構成図、第2図は本発明に係るソート表の説明図、第
3図は第1図に示すソート処理部9の処理手順を示すフ
ローチャートである。
An embodiment of the method of the present invention will be described below with reference to FIGS. 1 to 3. FIG. 1 is a system configuration diagram in this embodiment, FIG. 2 is an explanatory diagram of a sorting table according to the present invention, and FIG. 3 is a flowchart showing the processing procedure of the sort processing section 9 shown in FIG. 1.

第1図に示すように、本システムは、データの入力、各
種の指令等の入力を行なう入力装置1、CRT等の表示
およびハードコピーを得る出力装置2、システムの中枢
を成し各種の処理を実行するCPU3、主記憶装置4.
外部記憶装置である磁気ディスク5から成る。磁気ディ
スク5中のファイルには、データ6とソート結果を表わ
すソート表7が格納されている。主記憶装置4には、デ
ータを一時的に記憶するバッファ8とソート処理を実行
するためのプログラムが格納されたソート処理部9があ
る。ソート処理部9は、ソート実行部9−1、ソート結
果出力部9−2から成る。
As shown in Fig. 1, this system consists of an input device 1 for inputting data and various commands, an output device 2 for displaying a CRT or the like and displaying a hard copy, and forming the core of the system and performing various processing. CPU 3, main storage device 4.
It consists of a magnetic disk 5 which is an external storage device. A file on the magnetic disk 5 stores data 6 and a sorting table 7 representing the sorting results. The main storage device 4 includes a buffer 8 that temporarily stores data and a sort processing section 9 that stores a program for executing sort processing. The sort processing section 9 includes a sort execution section 9-1 and a sort result output section 9-2.

ソート表7は、第2図に示すように、ディスクファイル
中の該当データが存在するページの番号(ページ番号)
7−1と、ページの先頭から数えたときのデータのアド
レス(ページ内相対アドレス)7−2の2つの項目から
成る。
Sort table 7, as shown in Figure 2, shows the page number (page number) in which the corresponding data exists in the disk file.
It consists of two items: 7-1 and the data address (intra-page relative address) 7-2 when counted from the top of the page.

ソート類にデータを取り出すには、第3図のような処理
手順で行う。データをソートするように要求が来ると、
ソート実行部9−1は、すべてのソート対象データにつ
いて、それが格納されているディスク5中のページ番号
7−1とページ内位置7−2を求め、これを表(7−0
)にし、その総てをまとめてソート表7を得る。ディス
ク5中のデータ6、ソート表7の内容を参照するには、
参照したいデータを含む、磁気ディスク5とバッファ8
との入出力単位であるページ部分を磁気ディスク5から
バッファ8ヘロードして参照する。
In order to extract the data into sort categories, the processing procedure shown in FIG. 3 is used. When a request comes to sort the data,
The sort execution unit 9-1 obtains the page number 7-1 and position within the page 7-2 in the disk 5 in which the data is stored for all the data to be sorted, and displays them in the table (7-0
) and put all of them together to obtain sort table 7. To refer to the contents of data 6 and sort table 7 on disk 5,
A magnetic disk 5 and a buffer 8 containing data to be referenced
A page portion, which is an input/output unit, is loaded from the magnetic disk 5 to the buffer 8 and referenced.

ソート実行部9−1は、7−0のページ番号7−1によ
り、そのページをバッファ8ヘロードし、相対アドレス
7−2により、データを参照することができる。このよ
うにしてデータを参照することにより、ソート実行部9
−1はソートを行い、該当データに対応する7−0のレ
コードを並び替える。このようにしてソート表7ができ
る。ソー1−順にデータを出力する場合は、ソート結果
出力部9−2により、ソート表7の先頭ページから順に
、ソート表7の各ページをバッファ8へロードし、その
第ルコードから順に、ページ番号7−1と相対アドレス
7−2を基にデータをバッファ中にロードし、参照する
ことによりソート類にデータを出力することができる。
The sort execution unit 9-1 can load the page into the buffer 8 using the page number 7-1 of 7-0, and refer to the data using the relative address 7-2. By referring to the data in this way, the sort execution unit 9
-1 performs sorting and rearranges records 7-0 corresponding to the corresponding data. In this way, the sort table 7 is created. When outputting data in sort 1-order, the sort result output unit 9-2 loads each page of the sort table 7 into the buffer 8 in order from the first page of the sort table 7, and outputs the page numbers in order from the first page of the sort table 7. Data can be loaded into the buffer based on 7-1 and the relative address 7-2, and the data can be output to the sort by referring to it.

このように、本実施例では、データをディスクファイル
のページ番号とページ内相対アドレスで表わし、ソート
類をその並び順で表現するため、ソート結果を少ない記
憶容量で記憶することができる。その結果、格納される
ソート結果は、1ページあたり木構造の場合に比べて多
くなり、ソート類を知るために必要なバッファと外部記
憶装置との入出力回数は減少する。1データを出力する
には、ソート表7の参照、ソー1へ表に基づくデータの
参照の2回の参照が必要であるが、多くの場合、ソート
表7の参照レコードは既にバッファ上にあるので、外部
記憶装置との入出力回数は1回で済み、データを高速に
処理することができるという結果がある。
In this manner, in this embodiment, data is represented by a page number of a disk file and a relative address within the page, and sorting is represented by the order of sorting, so that sorting results can be stored with a small storage capacity. As a result, more sort results are stored per page than in the case of a tree structure, and the number of inputs and outputs between the buffer and the external storage device required to know the sorts is reduced. To output 1 data, it is necessary to refer to sort table 7 twice, and to refer to data based on the table to sort 1, but in most cases, the reference record of sort table 7 is already on the buffer. Therefore, the number of inputs and outputs to and from the external storage device is only one, and data can be processed at high speed.

なお、本実施例では、ソート表7が磁気ディスク中にあ
る場合について説明したが、データ数が少なかったり、
バッファの容量が十分大きい場合には、主記憶上にある
ことも可能である。
In this embodiment, the case where the sort table 7 is stored on the magnetic disk is explained, but if the number of data is small or
If the buffer capacity is sufficiently large, it can also be located on the main memory.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、データの外部記憶装置中格納位置を項
目とするソート表を用い、ソート表のレコード類に対応
するデータを出力するので、少なぃ記憶領域でソート結
果が表現でき、1ページ中に多くのソート結果を格納す
ることができる。その結果、ソート表参照のためのバッ
ファと外部記憶装置との入出力回数を減らすことができ
る。
According to the present invention, a sort table whose item is the storage location of data in an external storage device is used, and data corresponding to the records of the sort table is output, so the sort results can be expressed in a small storage area, and can be expressed in one page. Many sort results can be stored inside. As a result, the number of inputs and outputs between the buffer and the external storage device for referring to the sort table can be reduced.

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

第1図は本発明を実現するためのシステムの一例を示す
ブロック図、第2図は本発明により得られるソート表7
の説明図、第3図は本発明の一実施例を示すフローチャ
ートである。 1・・入力装置、2・・・出力装置、3・・・CPU、
4・主記憶装置、5・・・磁気ディスク、6・・・デー
タ、7・・ソート表、8・・・バッファ、9・・・ソー
ト処理部。 代理人 弁理士   秋 本  正 実第1図 第2図
FIG. 1 is a block diagram showing an example of a system for realizing the present invention, and FIG. 2 is a sorting table 7 obtained by the present invention.
FIG. 3 is a flowchart showing an embodiment of the present invention. 1...Input device, 2...Output device, 3...CPU,
4. Main storage device, 5.. Magnetic disk, 6.. Data, 7.. Sort table, 8.. Buffer, 9.. Sort processing unit. Agent Patent Attorney Tadashi Akimoto Figure 1 Figure 2

Claims (1)

【特許請求の範囲】[Claims] ソート処理を実行する中央処理装置、ソート処理用のプ
ログラムが格納された主記憶装置、データが格納される
外部記憶装置の各々を備えたシステムにおいて、ソート
対象データの総てについてのページ番号に対する相対ア
ドレスの表を前記主記憶装置または前記外部記憶装置に
作成し、前記表を参照してソートを実行し該当データに
対応するレコードの並び替えを行なうことを特徴とする
データ検索方法。
In a system equipped with a central processing unit that executes sort processing, a main storage device that stores a program for sort processing, and an external storage device that stores data, the relative page number of all data to be sorted is calculated. A data retrieval method characterized in that a table of addresses is created in the main storage device or the external storage device, and records corresponding to corresponding data are rearranged by referring to the table and performing sorting.
JP26143185A 1985-11-22 1985-11-22 Data retrieving method Pending JPS62121532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26143185A JPS62121532A (en) 1985-11-22 1985-11-22 Data retrieving method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26143185A JPS62121532A (en) 1985-11-22 1985-11-22 Data retrieving method

Publications (1)

Publication Number Publication Date
JPS62121532A true JPS62121532A (en) 1987-06-02

Family

ID=17361782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26143185A Pending JPS62121532A (en) 1985-11-22 1985-11-22 Data retrieving method

Country Status (1)

Country Link
JP (1) JPS62121532A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02122328A (en) * 1988-10-31 1990-05-10 Nec Corp File preparation system
EP0547992A2 (en) * 1991-12-17 1993-06-23 International Business Machines Corporation Method and system for enhanced efficiency of data recovery in balanced tree memory structures
WO1996009589A2 (en) * 1994-09-21 1996-03-28 Qliktech International Ab Method and device for extracting information from a database
US6037938A (en) * 1997-12-01 2000-03-14 Qliktech International Ab Method and a device for displaying information about a large number of independent data elements

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02122328A (en) * 1988-10-31 1990-05-10 Nec Corp File preparation system
EP0547992A2 (en) * 1991-12-17 1993-06-23 International Business Machines Corporation Method and system for enhanced efficiency of data recovery in balanced tree memory structures
WO1996009589A2 (en) * 1994-09-21 1996-03-28 Qliktech International Ab Method and device for extracting information from a database
US6236986B1 (en) 1994-09-21 2001-05-22 Qliktech International Ab Method and device for extracting information from a database
US6037938A (en) * 1997-12-01 2000-03-14 Qliktech International Ab Method and a device for displaying information about a large number of independent data elements

Similar Documents

Publication Publication Date Title
US7650326B2 (en) Fast aggregation of compressed data using full table scans
JP3205406B2 (en) Reference target variable determination processing method and translation processing system
JPS62121532A (en) Data retrieving method
JP2001513930A (en) Database system and operation method of database system
JP3180336B2 (en) Data access method using multilayer buffer
JPH02116936A (en) Reorganizing system
JPS61278932A (en) Method of processing data addition
JP3145727B2 (en) Data retrieval device
JP2507399B2 (en) Database equipment
JPH03226829A (en) Information processor
JP2612063B2 (en) How to display mask layout data
JPH06187208A (en) Index file processor
JPH02302869A (en) File edition system
JPH0228846A (en) Data storing system
JPH05143304A (en) Consistency inspecting system
JPH0296274A (en) Information retrieving device of multiplex index structure
JPS6027039A (en) Retrieving method of index key
JPH04353944A (en) Record additional system for index order formation file
JPS6375928A (en) Comprehensive type sorting system
JPH0388069A (en) Device for connecting storage medium
JPS63285631A (en) Updating and processing system for index file
JPH02127725A (en) Record retrieving system
JPS63150724A (en) Data access processing system
JPH06124307A (en) Data base processor
JPH0145648B2 (en)