JPH01173229A - Data base processor - Google Patents

Data base processor

Info

Publication number
JPH01173229A
JPH01173229A JP62334118A JP33411887A JPH01173229A JP H01173229 A JPH01173229 A JP H01173229A JP 62334118 A JP62334118 A JP 62334118A JP 33411887 A JP33411887 A JP 33411887A JP H01173229 A JPH01173229 A JP H01173229A
Authority
JP
Japan
Prior art keywords
processing device
database
search
data
hash
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
JP62334118A
Other languages
Japanese (ja)
Inventor
Kiyoshi Yada
矢田 潔
Naohiko Shimizu
尚彦 清水
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 JP62334118A priority Critical patent/JPH01173229A/en
Publication of JPH01173229A publication Critical patent/JPH01173229A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To perform efficient data base processing by providing a hash bit array and accessing it by a search processing device and a sort processing device to reject data to which setting of hash values is necessary. CONSTITUTION:In the case of table coupling operation, a pertinent tuple group of a first table in a data base is extracted on a certain retrieval condition by a search processing device 3 and is sorted by a sort processing device 4, and the has value is set to a hash bit array 10. After a second table is retrieved in the same manner, rejection of unnecessary data by hashing and sorting are performed by the device 4. Unnecessary data of the first table are rejected thereafter if necessary. Since setting of hash values to the array 10 and rejection of unnecessary data are performed in both of devices 3 and 4 by these processings, the quantity of data transfer between each processing device and a CPU is considerably reduced and efficient data base processing is possible.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータベース処理装置に係り、データベースの
検索、ソート処理の高速化に好適なデータベース処理装
置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a database processing device, and more particularly to a database processing device suitable for speeding up database search and sorting processing.

〔従来の技術〕[Conventional technology]

データベースマシンの主要な処理にサーチ処理とソート
処理がある。サーチ処理では、データベースが格納され
ている外部記憶装置(通常ディスク装置)から、必要な
データの検索をディスクの読出し速度に準じて処理する
。これにはいわゆるオンザフライ処理を実行するハード
ウェアを本体装置(中央処理装置)と外部記憶装置の間
に取付け、本体装置での処理を大巾に低減させるものが
種々製品化されている。ソート処理も、サーチハードウ
ェアのように、ディスクからのデータの流れに沿ってソ
ート専用のハードウェアで該データをソートする方式が
あるが、大規模データベースではデータベースが複数の
ディスクに分散されるので、実際のソートハードウェア
としては、本体装置のメモリに集ったデータをソートす
るハードウェアなどが製品化されている。
The main processing of a database machine is search processing and sort processing. In the search process, necessary data is retrieved from an external storage device (usually a disk device) in which the database is stored, according to the read speed of the disk. For this purpose, various products have been developed in which hardware for executing so-called on-the-fly processing is installed between the main unit (central processing unit) and an external storage device, thereby greatly reducing the processing on the main unit. Regarding sort processing, there is a method such as search hardware in which data is sorted using specialized hardware that follows the flow of data from disk, but in large-scale databases, the database is distributed across multiple disks, so As actual sorting hardware, hardware for sorting data collected in the memory of the main unit has been commercialized.

なお、データベースを処理するデータベースマシンおよ
びデータベースの基本処理技法については、例えばソフ
トウェア指向アーキテクチャ、昭和60年12月25日
、第330頁から第383頁において論じられている。
Note that database machines that process databases and basic processing techniques for databases are discussed, for example, in Software Oriented Architecture, December 25, 1985, pages 330 to 383.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

従来技術では、データベースマシンの各要素技術の組合
せと性能とのバランスについて配慮されていない。
In the conventional technology, consideration is not given to the balance between the combination of each elemental technology of the database machine and the performance.

例えばソートハードウェアは本体内蔵形又はチャネル接
続形の構成をとっているが、前者は本体装置専用のハー
ドウェアとなり用途が機種固定となってしまうし、後者
はチャネルを介するため、チャネルオーバヘッドの増大
など性能的な問題がある。
For example, sorting hardware has a built-in type or a channel-connected type, but the former is hardware dedicated to the main unit and its usage is fixed to the model, and the latter uses channels, which increases channel overhead. There are performance issues such as.

また、テーブルの結合演算では、ハツシュビットアレー
を用いて、結合の可能性のないタプルをふるい落す技術
があるが、テーブルの結合演算ではソー1−処理が不可
欠のため、ソート処理装置でこのハツシュビットアレー
を用いたふるい落しを実施している場合が多い。例えば
本体装置とチャネルを介して接続されているソート処理
装置のハツシュを考えると、先ず第1テーブルのデータ
によるハツシュビットアレーの設定、その後第2テーブ
ルデータの前回設定のピントアレーによるふるい落しお
よびハツシュビットアレーの再設定、そして第1テーブ
ルのハツシュビットアレーによるふるい落しと、実に3
回のテーブルの転送が必要となり処理速度の低下が大き
い。
In addition, in table join operations, there is a technique that uses a hash bit array to filter out tuples that have no possibility of being joined, but since sort 1- processing is essential in table join operations, a sort processing device can perform this function. In many cases, screening is performed using a hashish bit array. For example, when considering the hash of a sort processing device that is connected to the main unit via a channel, first the hash bit array is set using the data in the first table, and then the second table data is filtered out using the focus array of the previous setting. Resetting the Shuvitt array, and filtering out the first table using the Hatschvitt array, really 3
This requires multiple table transfers, resulting in a significant drop in processing speed.

本発明の目的は、上記に鑑み、コストパフォーマンスに
秀れたデータベースマシンの構成を可能にしたデータベ
ース処理装置を提供することにある。
In view of the above, an object of the present invention is to provide a database processing device that enables the construction of a database machine with excellent cost performance.

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

上記目的は、中央処理装置と、これと入出力インタフェ
ースで接続されてデータベースを格納する記憶装置の間
に、それぞれサーチ処理装置とソート処理装置を有する
データベースマシンにおいて、サーチ処理装置とソー1
〜処理装置から共通にアクセス可能なハツシュビットア
レイを設け、サーチ処理装置でのサーチ時に設定したハ
ツシュ値をソート処理装置でソーI−時に参照すること
によリ、達成される。
The above object is to provide a search processing device and a sort processing device in a database machine having a search processing device and a sorting processing device between a central processing unit and a storage device connected to the central processing unit through an input/output interface to store a database.
This is achieved by providing a hash bit array that can be accessed in common from the processing devices, and by referring to the hash value set at the time of search by the search processing device at the time of sort processing by the sort processing device.

〔作 用〕[For production]

例えば、テーブル結合演算の場合、ある一定の検索条件
でサーチ処理装置にて、データベースにおける第1テー
ブルの該当タプル群を抽出し、ソート処理装置でソー1
〜するとへもにハツシュ値をハツシュビットアレーに設
定する。次に同じように、データベースにおける第2テ
ーブルに関しても同じように検索後、ソート処理装置で
ハツシュによるふるい落しとソートを行う。その後、必
要なら第1テーブルのふるい落しも行う。これらの処理
で、サーチ処理装置とソート処理装置両方でハツシュビ
ットアレイへのハツシュ値の設定、ふるい落しを行うこ
とにより、各々の処理装置と中央処理装置間のデータ転
送量が大巾に減少し、効率の良いデータベース処理が可
能となる。
For example, in the case of a table join operation, a search processing device extracts the corresponding tuples of the first table in the database using a certain search condition, and a sorting processing device extracts the corresponding tuples from the first table in the database.
Then, the hash value is set in the hash bit array. Next, after searching the second table in the database in the same way, the sorting processing device performs hash screening and sorting. After that, if necessary, the first table is also screened. In these processes, by setting and filtering hash values into hash bit arrays in both the search processing unit and the sorting processing unit, the amount of data transferred between each processing unit and the central processing unit is greatly reduced. This enables efficient database processing.

〔実施例〕〔Example〕

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

第1図は本発明のデータベース処理装置の一実施例のブ
ロック図である。第1図において、中央処理装置(CP
U)1に対して、サーチ処理装置3及びソート処理装置
4が各々入出力チャネル2を介して接続されている。外
部記憶装置のディスク装置5はサーチ処理装置3に接続
され、データベースを格納している。
FIG. 1 is a block diagram of an embodiment of a database processing apparatus of the present invention. In Figure 1, the central processing unit (CP
U) 1 is connected to a search processing device 3 and a sorting processing device 4 via input/output channels 2, respectively. A disk device 5 as an external storage device is connected to the search processing device 3 and stores a database.

サーチ処理装置3は入力バッファ6、検索部7、カラム
抽出部8、出力バッファ9を有している。
The search processing device 3 has an input buffer 6, a search section 7, a column extraction section 8, and an output buffer 9.

ソート処理装置4は入出力バッファ11、キー抽出部1
2、ソート部13、内部メモリ14を有している。また
、サーチ処理装置3とソート処理装置4はハツシュ値を
格納するハツシュビットアレー10を共有し、両方から
共通にアクセス可能である。
The sort processing device 4 includes an input/output buffer 11 and a key extraction unit 1
2, a sorting section 13, and an internal memory 14. Furthermore, the search processing device 3 and the sorting processing device 4 share a hash bit array 10 that stores hash values, and can be accessed in common from both.

第2図はリレーショナルデータベースのテーブルの形を
示す。Aは原始テーブルであり、1,2゜・・・N個の
タプルとa、bT c、・・X+MtZのカラムから構
成されている。ディスク装置5に格納されているデータ
ベースはAの形である。サーチ処理装置3では、Aの形
のテーブルから検索対象とするカラムが一致するタプル
の射影対象となるカラムを抽出する。その結果がBの形
のテーブル(検索結果テーブル)となる。例えば、aの
カラムのある値が検索対象であり、この値と一致するタ
プル1〜nが選択され、射影対象であるa、b。
Figure 2 shows the form of a table in a relational database. A is a primitive table and is composed of 1, 2°...N tuples and columns a, bTc,...X+MtZ. The database stored in the disk device 5 is in the form A. The search processing device 3 extracts from the A-shaped table a column to which a tuple matching the search target column is projected. The result is a table in the form B (search result table). For example, a certain value in column a is the search target, and tuples 1 to n that match this value are selected, and a, b are the projection targets.

・・・y+Zが抽出されて、Bの形のテーブルが出来る
。ソート処理装置4では、このBのテーブルをソートす
る。このBのテーブルのソートに当って、a、・・2の
カラムの値によってソートするとする時、a、・・Zの
カラム値をキーと呼び、各タプルからキーになるカラム
を抽出したものがCのテーブル(ソートキーテーブル)
である。ソートは、このCのテーブルに従って行われる
。同様にして、他のテーブルについてサーチ処理、ソー
ト処理が行われる。
...Y+Z is extracted and a table of the form B is created. The sort processing device 4 sorts this table B. When sorting table B, if we want to sort by the values of columns a,...2, the column values of a,...Z are called keys, and the column that becomes the key is extracted from each tuple. C table (sort key table)
It is. Sorting is performed according to this C table. Similarly, search processing and sorting processing are performed for other tables.

テーブル結合演算は、二つのテーブルのキーの値が同じ
ものを結合し、1つのテーブルとすることである。従っ
て、このキーの値が不一致なタプルはテーブル結合には
不要となる。ハツシュビットアレー10は、このキーの
値をあるハツシュ関数に従ってちらばらせ、その値でハ
ッシュビットアレー10をアドレッシングし、ハツシン
グ結果を設定したり、参照したりすることにより、不一
致キーのタプルを除去するものである。このハツシング
によるふるい落しにより、テーブルのタプルの数は大巾
に減少し、以後のテーブル結合の作業時間が大巾に短縮
出来る。
A table join operation is to combine two tables with the same key value to form one table. Therefore, tuples with inconsistent key values are not needed for table joins. The hash bit array 10 scatters the value of this key according to a certain hash function, addresses the hash bit array 10 with that value, and sets or refers to the hashing result to create a tuple of mismatched keys. It is to be removed. This filtering through hashing greatly reduces the number of tuples in the table, and the time required for subsequent table joins can be greatly reduced.

以下、テーブル結合の場合について第1図の動作を詳述
する。まず、第1の原始テーブル(第1図のテーブルA
)をディスク装置5から読出し、サーチ処理装置3の入
力バッファ6に一旦バッファリングし、検索部7によっ
て一致タプルを検出する。一致タプルはカラム抽出部8
によって射影を実施され、その結果(第1図のテーブル
B)が出力バッファ9に出力される。同時に、カラム抽
出部8では、射影カラムの一部からソートキ一部を抽出
し、ハツシングを実行し、ハツシュビットアレー10に
設定する。出力バッファ9のデータはチャネル2を介し
て中央処理装置1へ送出される。テーブル結合対象の第
2の原始テーブルも、第1の原始テーブルと同じように
サーチ処理装置3でサーチ処理されるが、違いは、ハツ
シング結果によりハツシュビットアレー10を参照し、
該当ビットが未設定なら本タプルはふるい落され、設定
されている場合は新たにバッジビットを設定し、対象タ
プルのみが中央処理装置1に送出される。これにより、
中央処理装置1に送出されるデータ量が大巾に減少し、
データ転送時間が短縮される。
The operation shown in FIG. 1 will be described in detail below in the case of table join. First, the first primitive table (table A in Figure 1)
) is read from the disk device 5, temporarily buffered in the input buffer 6 of the search processing device 3, and the search unit 7 detects matching tuples. Match tuples are extracted from column extraction section 8.
The projection is performed by , and the result (table B in FIG. 1) is output to the output buffer 9. At the same time, the column extraction unit 8 extracts a part of the sort key from a part of the projection column, performs hashing, and sets it in the hash bit array 10. The data in the output buffer 9 is sent to the central processing unit 1 via the channel 2. The second source table to be joined is also searched by the search processing device 3 in the same way as the first source table, but the difference is that the hash bit array 10 is referred to based on the hashing result,
If the corresponding bit is not set, this tuple is filtered out, and if it is set, a new badge bit is set, and only the target tuple is sent to the central processing unit 1. This results in
The amount of data sent to the central processing unit 1 is significantly reduced,
Data transfer time is reduced.

第1のテーブルのサーチ結果(テーブルB)はソート処
理のために、中央処理装置1からチャネル2を介してソ
ート処理装置4に転送される。該データは入出力バッフ
ァ11で一旦バッファリングされ、ソートキー抽出部1
3によってキーが抽出された後、ハツシング後のハツシ
ュビットアレー10を参照し、すでにサーチ処理装置3
での第2のテーブルによって再設定された値によりキー
のふるい落しが実行される。残ったキーはソート部13
と内部メモリ14によってソートしく第1図のテーブル
Cについてソート)、入出力バッフア11を介して中央
処理装置1に転送される。第2のテーブルのサーチ結果
も同様にしてソート中央処理装置4でソートされ、中央
処理装置1に返えされる。中央処理装置1では、第1及
び第2のテーブルのソート済データについてキーの値が
同じものを結合し、1つのテーブルとする。
The search results of the first table (table B) are transferred from the central processing unit 1 to the sorting processing unit 4 via the channel 2 for sorting processing. The data is temporarily buffered in the input/output buffer 11, and then sent to the sort key extraction unit 1.
After the key is extracted by 3, the hashed bit array 10 is referred to and the key has already been extracted by the search processing device 3.
Key screening is performed using the values reset by the second table in . The remaining keys are in the sort section 13
The data is sorted by the internal memory 14 (sorted on table C in FIG. 1) and transferred to the central processing unit 1 via the input/output buffer 11. The search results of the second table are similarly sorted by the sorting central processing unit 4 and returned to the central processing unit 1. The central processing unit 1 combines the sorted data of the first and second tables with the same key value to form one table.

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

以上の説明から明らかな如く、本発明によれば、サーチ
およびソート処理を行うデータベース処理装置において
、ハツシュによる不要データのふるい落しがサーチ時お
よびソート前に可能となり、サーチ、ソート処理時間が
短縮されると共に中央処理装置に取込まれるデータ量が
大巾に減少し、効率のよいデータベース処理が可能にな
る。
As is clear from the above description, according to the present invention, in a database processing device that performs search and sort processing, unnecessary data can be filtered out using a hash during the search and before sorting, and the search and sort processing time is shortened. At the same time, the amount of data taken into the central processing unit is greatly reduced, enabling efficient database processing.

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

第1図は本発明のデータベース処理装置の一実施例のブ
ロック図、第2図はレリーショナルデータベースのテー
ブル形式を示す図である。 1・・・中央処理装置、 2・・チャネル、3・・サー
チ処理装置、 4・・ソート処理装置、5・・・データ
ベース格納ディスク装置、10・・・ハツシュビットア
レイ。 I−ヘーテーフーlし′
FIG. 1 is a block diagram of an embodiment of a database processing apparatus of the present invention, and FIG. 2 is a diagram showing a table format of a relational database. DESCRIPTION OF SYMBOLS 1... Central processing unit, 2... Channel, 3... Search processing device, 4... Sorting processing device, 5... Database storage disk device, 10... Hash bit array. I-hetefu l'

Claims (1)

【特許請求の範囲】[Claims] (1)中央処理装置と、データベースを格納する記憶装
置と、前記中央処理装置と記憶装置の間に置かれて、デ
ータベースをサーチするサーチ処理装置及びデータベー
スをソートするソート処理装置とからなるデータベース
処理装置において、前記サーチ処理装置及びソート処理
装置に共通にデータベースのデータをハッシングするハ
ッシュビットアレーを設け、該ハッシュビットアレーを
サーチ処理装置及びソート処理装置で互いにアクセスし
て、ハッシュ値の設定、不要データのふるい落しを行う
ことを特徴とするデータベース処理装置。
(1) Database processing consisting of a central processing unit, a storage device that stores a database, and a search processing device that searches the database and a sorting device that sorts the database, which are placed between the central processing unit and the storage device. In the device, a hash bit array for hashing database data is provided in common to the search processing device and the sort processing device, and the hash bit arrays are mutually accessed by the search processing device and the sort processing device to set hash values. A database processing device characterized by filtering data.
JP62334118A 1987-12-28 1987-12-28 Data base processor Pending JPH01173229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62334118A JPH01173229A (en) 1987-12-28 1987-12-28 Data base processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62334118A JPH01173229A (en) 1987-12-28 1987-12-28 Data base processor

Publications (1)

Publication Number Publication Date
JPH01173229A true JPH01173229A (en) 1989-07-07

Family

ID=18273722

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62334118A Pending JPH01173229A (en) 1987-12-28 1987-12-28 Data base processor

Country Status (1)

Country Link
JP (1) JPH01173229A (en)

Similar Documents

Publication Publication Date Title
CN108563923B (en) Distributed storage method and system for genetic variation data
US20030100960A1 (en) Database query optimization apparatus and method
US5247662A (en) Join processor for a relational database, using multiple auxiliary processors
JPH07253991A (en) Join processing system
JP2001282816A (en) System and method for processing multi-dimensional database
CA2418093A1 (en) Data compiling method
WO2005043409A1 (en) Table-formatted data connection method, connection device, and program
JPH01173229A (en) Data base processor
JPH02297670A (en) Data base retrieving system
JPH0644309A (en) Data base managing system
JPH01163826A (en) Coupling processing system for relational data base
JPS59121436A (en) Sorting method of data group
JPH04340163A (en) Keyword retrieval system
JP3061486B2 (en) Data sort processing system
Hartzman et al. A relational approach to querying data streams
JPH0552536B2 (en)
JPH04156624A (en) High speed accessing systme in knowledge base systme
JPH01219927A (en) Data base information retrieving system
JP3824091B2 (en) Relational database system
JP3412168B2 (en) Join processing device
JPH04148373A (en) Data retrieving system
JPH05165891A (en) Data registration/retrieval system of data base
JPH03223965A (en) Inequality sign condition connection system for related data base system
JPH0628167A (en) Data and information manipulating device
JPS63223827A (en) Data processing system