JPS61180332A - Data storage and retrieval system - Google Patents

Data storage and retrieval system

Info

Publication number
JPS61180332A
JPS61180332A JP60019937A JP1993785A JPS61180332A JP S61180332 A JPS61180332 A JP S61180332A JP 60019937 A JP60019937 A JP 60019937A JP 1993785 A JP1993785 A JP 1993785A JP S61180332 A JPS61180332 A JP S61180332A
Authority
JP
Japan
Prior art keywords
data
work
block
tables
storage
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
JP60019937A
Other languages
Japanese (ja)
Inventor
Hidefumi Kondo
近藤 秀文
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 JP60019937A priority Critical patent/JPS61180332A/en
Publication of JPS61180332A publication Critical patent/JPS61180332A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To increase the storage amount of data related to the same block and to attain the retrieval at a high speed in a retrieval mode by designating the number of correspondences between related data before storage of data through a table. CONSTITUTION:This system comprises an external memory 201, a card reader 202, a terminal equipment 203, a channel 204, a CPU205 and a main memory 206. The memory 206 contains a data base control system DBMS207 and a buffer area 208. When an inter-table data ratio (inter-table correspondence number) is given to the DBMS207 from the equipment 203, the DBMS207 arranges the received data in the area 208 according to a storage type stored in the memory 201 and transfers them to the memory 201 for writing. When the storage is through with the inter-table data ratio, the DBMS207 decides a storage section for each table with a data storage block.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、データの蓄積・検索方式に関し、特らデータ
ベース管理システムにおいて、データベースの利用者か
らデータの検索依頼を受けて、外部記憶装置上のデータ
を高速に検索するのに好適なデータ蓄積・検索方式に関
するものである。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention relates to a data storage and retrieval method, and in particular, in a database management system, when a data retrieval request is received from a database user, data stored in an external storage device is stored and retrieved. The present invention relates to a data storage/retrieval method suitable for retrieving data at high speed.

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

従来、データベース管理システムにおいて、テーブル型
データ装置・検索方式については、外部記憶装置の主記
憶装置との転送単位である蓄積エリア(以後、ブロック
と呼ぶ)に同一テーブルのデータのみ、あるいは異なる
テーブルのデータを混在して蓄積する方法が提案されて
いた(SystemR:Re1ational App
roach to Databasa Managem
ent;M、M、Astrahan at al、、A
CMTODS 1976 Jun、pp、97−137
およびIBN Database 2 PerforI
IIance:Design。
Conventionally, in database management systems, table-type data devices and search methods store only data from the same table or data from different tables in the storage area (hereinafter referred to as a block), which is the unit of transfer between the external storage device and the main storage device. A method of storing mixed data was proposed (SystemR: Re1ational App
reach to Databasa Management
ent;M, M, Astrahan at al,,A
CMTODS 1976 Jun, pp, 97-137
and IBN Database 2 PerformI
IIance: Design.

imple+mentation、and tunin
g J、N、Cheng at al、IBMSyst
e+a Journal 1984 Vol、23 N
o、2 pp189−210) −しかじ、この方法で
は、異なるテーブル間のデータに関連があり、それらの
関連データの検索を一度に行う場合、各ブロックに同一
テーブルのデータのみが蓄積されている場合には多くの
ブロック転送が必要となり処理速度が低下するという問
題があった、また、異なるテーブルのデータの混在が許
される場合にも、互いに関連のあるデータが同一のブロ
ックに蓄積されるのは、全く偶然に左右されるというこ
とであり、多くの場合別々のブロックに分散蓄積される
ので、通常は多くのベート転送が必要になり処理速度の
低下をきたすという問題があった。
imple+mentation, and tunein
g J.N., Cheng at al., IBM Syst.
e+a Journal 1984 Vol, 23 N
o, 2 pp189-210) - However, in this method, when the data between different tables are related and the related data is searched at once, only data from the same table is stored in each block. In some cases, a large number of block transfers are required, resulting in a slowdown in processing speed.Also, even in cases where data from different tables are allowed to coexist, mutually related data may not be accumulated in the same block. This means that it depends entirely on chance, and in many cases it is distributed and accumulated in separate blocks, which usually requires a large number of bait transfers, resulting in a reduction in processing speed.

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

本発明の目的は、このような従来の問題を解決し、デー
タベース管理システムなどにおいて、データ蓄積のため
のテーブル定義を行う際にテーブル間にわたって互いに
関連するデータの対応数をユーザが与えるだけで、同一
ブロックへの関連データの蓄積を増やし、検索時に高速
検索が可能なデータの蓄積・検索方式を提供することに
ある。
The purpose of the present invention is to solve such conventional problems, and to enable a database management system, etc., when defining a table for data accumulation, the user only needs to provide the corresponding number of mutually related data between tables. The object of the present invention is to provide a data storage/retrieval method that increases the amount of related data stored in the same block and enables high-speed retrieval.

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

上記目的を達成するために、本発明では、複数種類のテ
ーブル型のデータを外部記憶装置上に蓄積しておき、異
なるテーブル間のデータに互いに関連があるとき、該関
連するデータを検索する手段を有する計算機システムに
おいて、前記外部記憶装置上に互いに関連するデータ同
志の対応数を指定するテーブルを設け、データ蓄積前に
該関連するデータ同志の対応数を該テーブルで指定する
ことによって、該対応数に相当するエリアを設定し、該
エリアに前記関連するデータを同一ブロックデータとし
てデータ蓄積を行い、ブロック単位に関連データ検索を
行うことに特徴がある。
In order to achieve the above object, the present invention stores a plurality of types of table-type data on an external storage device, and when data between different tables is related to each other, a means for searching the related data is provided. In a computer system having a computer system, a table for specifying the number of correspondences between mutually related data is provided on the external storage device, and by specifying the number of correspondences between the related data in the table before data is accumulated, the correspondence can be determined. The method is characterized in that an area corresponding to the number of blocks is set, the related data is stored in the area as the same block data, and the related data is searched block by block.

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

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

第1図は、本発明の一実施例を示すデータの蓄積・検索
方式説明図であり、第1図(a)はデータ蓄積を行う前
のデータ例を示しており、第1図(b)は外部記憶装置
にデータを蓄積した場合の例を示している。
FIG. 1 is an explanatory diagram of a data storage/retrieval method showing an embodiment of the present invention, FIG. 1(a) shows an example of data before data storage, and FIG. 1(b) shows an example in which data is stored in an external storage device.

第1図(a)において、110は外部記憶装置に蓄積し
たいデータであり、作業9作業資料関係(作業別に必要
な資料を示すもの)および資料の3つのテーブル(11
4,115,116)を示す。111,112および1
13はデータアイテム名であり、それぞれ、作業名と作
業内容、作業名と資料名、および資料名と資料内容を示
す。
In FIG. 1(a), 110 is data to be stored in the external storage device, and there are three tables (11
4,115,116). 111, 112 and 1
13 is a data item name, which indicates a work name and work content, a work name and material name, and a material name and material content, respectively.

117〜127はデータ自体を示す。131゜132は
テーブル間データの対応数を示すテーブルである。テー
ブル131の1対3は、作業テーブル114の中の1つ
のデータ、たとえば、作1・xxxx (117)が作
業資料関係テーブル(115)の中の3つのデータ、作
1・資1(119)、作1・資2 (120)、および
作1・質3 (121)に対応していることを示し、テ
ーブル132の2対1は1作業資料関係テーブル(11
5)の中の2つのデータ、作1・資1(119)および
作2・資1(122)が、資料テーブル(116)中の
1つのデータ、資1・AAA (125)に対応してい
ることを示す、このような1対3および2対1のような
テーブル間の対応数をテーブル間データ比という。
117 to 127 indicate the data themselves. Reference numerals 131 and 132 are tables indicating the number of correspondences between tables. 1 to 3 in the table 131 is one data in the work table 114, for example, work 1 x , Work 1/Material 2 (120), and Work 1/Quality 3 (121), and the 2:1 of table 132 corresponds to 1 work material related table (11).
The two data in 5), Saku1・Shi1 (119) and Saku2・Shi1 (122), correspond to one data, Saku1・AAA (125) in the data table (116). The number of correspondences between tables, such as 1 to 3 and 2 to 1, which indicates that there is a data ratio between tables is called an inter-table data ratio.

第1図(b)において、210は、データ110を外部
記憶装置に蓄積した場合のデータの構造を示す。作業テ
ーブル1142作業資料関係テーブル115、資料テー
ブル116の3つのテーブルの中のデータで、互いに関
連あるデータとして、データ117〜127、すなわち
、作業テーブル(114)中の2件、作業資料関係テー
ブル(115)中の6件、および資料テーブル(116
)中の3件があり、関連する1組のデータを構成してい
る。テーブル131で示す1対3.テーブル132で示
す2対1が互いに関連するデータを示す、それは、作業
資料関係テーブル(115)のところを共通な6件にす
ると、1対3は2対6゜2対1は6対3になることから
れかる。211は、この1組のデータが蓄積されている
ブロックを示す、212は作業テーブル(114)中の
データ2件、213は作業資料関係テーブル(115)
中のデータ6件、214は資料テーブル(116)中の
データ3件が蓄積されていることを示す、テーブル13
1および132で示す1対3および2対1の関係は他の
データについても同様である。
In FIG. 1(b), 210 indicates the structure of data when data 110 is stored in an external storage device. Work table 1142 Data in the three tables 115 and 116, which are related to each other, are data 117 to 127, that is, two items in the work table (114), and the work data relationship table (114). 115), and the data table (116)
), which constitute one set of related data. 1 to 3 as shown in table 131. The 2 to 1 shown in table 132 indicates data that is related to each other.If the work material relationship table (115) has 6 common items, 1 to 3 becomes 2 to 6°, and 2 to 1 becomes 6 to 3. Rekaru from becoming. 211 indicates a block in which this set of data is stored, 212 indicates two data items in the work table (114), and 213 indicates the work material relationship table (115).
Table 13 shows that 6 data items inside, 214 indicates that 3 data items in the data table (116) have been accumulated.
The 1:3 and 2:1 relationships indicated by 1 and 132 are the same for other data.

215は他のデータの1組が蓄積されているブロックを
示す、このように、データ210で示すような蓄積を行
うことによって1水力式は、ある作業に関連する資料の
検索、ある資料に関連する作業の検索のような検索処理
を1回のブロック転送で可能にするものである。
215 indicates a block in which a set of other data is stored.In this way, by storing data as shown in data 210, 1 hydraulic formula can search for materials related to a certain work, and perform a search for materials related to a certain task. This makes it possible to perform search processing, such as searching for work to be done, with a single block transfer.

以下1本実施例を第2図〜第12図により具体的に説明
する。
This embodiment will be explained in detail below with reference to FIGS. 2 to 12.

第2図は本発明を適用した計算機システムの構成ブロッ
ク図である。
FIG. 2 is a block diagram of the configuration of a computer system to which the present invention is applied.

この計算機システムは、外部記憶装置201゜カード読
取機202.端末装置203.チャネル204、CPU
205.主記憶装置206から構成され、主記憶装置2
06内には、データベース管理システム(以下、DBM
Sと略す)207.バッファエリア208が設けられて
いる。
This computer system includes an external storage device 201, a card reader 202. Terminal device 203. Channel 204, CPU
205. It consists of a main memory device 206, the main memory device 2
06 includes a database management system (hereinafter referred to as DBM).
(abbreviated as S)207. A buffer area 208 is provided.

このような構成において、端末装置203からテーブル
間データ比がDBMS 207に渡されると、DBMS
 207は、渡されたデータをバッファエリア208で
、外部記憶装置201の中の蓄積形式に整え、外部記憶
装置201へ転送して書込みを行う。
In such a configuration, when the inter-table data ratio is passed from the terminal device 203 to the DBMS 207, the DBMS
207 arranges the passed data in a storage format in the external storage device 201 in the buffer area 208, transfers it to the external storage device 201, and writes it.

第3図は、第2図の外部記憶装置201中におけるテー
ブル間データ比の蓄積フォーマットを示したものである
。ここで、301は互いに関連するテーブルのペアの数
、302はテーブル名、303はテーブル間データ比の
値である。第4図にこの蓄積フォーマットに従ったテー
ブル間データ比の蓄積例を示す(フォーマット中のデー
タは第1図参照)、ここで、410はテーブルのペアの
数が2つ、すなわち5作業(411)というテーブルと
作業資料関係(413)というテーブルのテーブル間デ
ータ比が1対3(412と414で示す)であり、作業
資料関係(415)というテーブルと資料(417)と
いうテーブルのテーブル間データ比が2対1(416と
418で示す)であるということを示している。
FIG. 3 shows the storage format of the inter-table data ratio in the external storage device 201 of FIG. Here, 301 is the number of pairs of mutually related tables, 302 is the table name, and 303 is the value of the data ratio between tables. Figure 4 shows an example of storing data ratios between tables according to this storage format (see Figure 1 for data in the format). ) and the table called Work Materials Relations (413) are 1:3 (indicated by 412 and 414), and the data between the tables called Work Materials Relations (415) and Materials (417) is 1:3 (indicated by 412 and 414). It shows that the ratio is 2:1 (indicated by 416 and 418).

テーブル間データ比の蓄積が終ったときには、1)BM
S 207は、データ蓄積用ブロックについて、テーブ
ル毎の蓄積区分を決定する。
When the data ratio between tables has been accumulated, 1) BM
S207 determines the storage classification for each table for the data storage block.

第5図(a)、(b)は、第2図の外部記憶装置201
上でのデータの蓄積構造を示す図である。
FIGS. 5(a) and 5(b) show the external storage device 201 in FIG.
It is a diagram showing the above data accumulation structure.

これは、第4図の3つのテーブルのテーブル間データ比
に従って決定したブロック内蓄積区分の例を示している
This shows an example of the intra-block accumulation division determined according to the inter-table data ratio of the three tables in FIG.

第5図(a)において、501はテーブル名、502お
よび503はブロック内でのテーブル蓄積エリアの先頭
アドレスおよびアドレスを示す。
In FIG. 5(a), 501 indicates the table name, and 502 and 503 indicate the start address and address of the table storage area within the block.

この例では1作業というテーブルはブロック内の先頭ア
ドレスが100.最終アドレスが299というような内
容を示している。ブロック500で示すこれらの内容は
、テーブルに関する情報であり、これらの情報も外部記
憶装置201に蓄積される。
In this example, the table called 1 work has the first address in the block as 100. The content shows that the final address is 299. These contents indicated by block 500 are information regarding the table, and these information are also stored in the external storage device 201.

第5図(b)において、510はデータ蓄積用に蓄積区
分が行われたブロックの例である。
In FIG. 5(b), 510 is an example of a block in which storage classification has been performed for data storage.

511は当該ブロックのブロック番号、512゜514
.516は当該ブロックに蓄積対象となるテーブルの名
称、513,515,517はそれぞれのテーブルにつ
いて蓄積エリアの空きの先頭アドレスを示す、521お
よび522で示すエリアは作業テーブルに割当てられた
エリア(アドレス100からアドレス299まで)、5
23および524で示すエリアは作業資料関係テーブル
に割当てられたエリア(アドレス300から899まで
)、525および526で示すエリアは資料テーブルに
割当てられたエリア(アドレス900から1199まで
)を示す、これらの3つのエリアは。
511 is the block number of the block, 512゜514
.. 516 is the name of the table to be stored in the block, 513, 515, and 517 are the empty start addresses of the storage area for each table, and the areas 521 and 522 are the areas allocated to the work table (address 100). to address 299), 5
The areas indicated by 23 and 524 are the areas assigned to the work material related table (addresses 300 to 899), and the areas indicated by 525 and 526 are the areas assigned to the material table (addresses 900 to 1199). The three areas are.

第1図で示した例におけるテーブル間データ比に従い、
かつ、各テーブルのデータは同一のサイズであるとして
エリアを割当てたものであり、作業。
According to the inter-table data ratio in the example shown in Figure 1,
Moreover, the area is allocated assuming that the data in each table is the same size.

作業資料関係、および資料の3つのテーブルに対して2
対6対3の比になっている。
2 for the three tables related to work materials and materials
The ratio is 6 to 3.

第6図は第5図のデータ蓄積構造に従ったデータの蓄積
手順を示す処理フローチャートであり、第7図は第5図
と第6図のデータ蓄積構造と蓄積手順に従って蓄積した
データの一例を示す図である。
FIG. 6 is a processing flowchart showing the data accumulation procedure according to the data accumulation structure shown in FIG. 5, and FIG. FIG.

以下、第6図の処理フローチャートを説明する。The processing flowchart shown in FIG. 6 will be explained below.

まず1作業のデータを順次取込み(ステップ601)、
割当てられたブロックのアドレス100から蓄積を始め
アドレス299までのエリアに蓄積する。エリアが不足
の場合には、別のブロックを用意し同じ方法で蓄積する
。さらに、エリアが不足の場合は別のブロックを用意す
るということを繰返す(ステップ602)。次に、作業
資料関係のデータを順次取込む(ステップ6o3)。作
業についてのデータの作業名と作業資料関係についての
データの作業名が同じになるブロックを探して、そのブ
ロック内のアドレス300から蓄積を始めアドレス89
9までのエリアにデータを蓄積する。エリアが不足の場
合の処理は作業データの場合と同じ処理を行う(ステッ
プ604)。さらに、資料のデータを順次取込む(ステ
ップ605)。
First, data for one operation is sequentially imported (step 601),
Accumulation starts from address 100 of the allocated block and is accumulated in the area up to address 299. If the area is insufficient, another block is prepared and accumulated using the same method. Further, if the area is insufficient, preparing another block is repeated (step 602). Next, data related to work materials is sequentially imported (step 6o3). Search for a block in which the work name of the data about the work and the work name of the data related to work materials are the same, and start accumulating from address 300 in that block until address 89.
Data is accumulated in areas up to 9. When the area is insufficient, the same process as for work data is performed (step 604). Furthermore, the data of the materials are sequentially imported (step 605).

作業資料関係についてのデータの資料基と資料について
のデータの資料基が同じになるブロックを探し、そのブ
ロックが複数ある場合には先頭のブロックを選び、その
ブロック内のアドレス900から蓄積を始めアドレス1
199までのエリアに蓄積する。エリアが不足の場合の
処理は、作業データの場合と同じ処理を行う(ステップ
606)。
Search for a block where the data base for data related to work materials and the data base for data on materials are the same, and if there are multiple such blocks, select the first block, and start accumulation from address 900 in that block. 1
Accumulates in areas up to 199. When the area is insufficient, the same processing as in the case of work data is performed (step 606).

第5図に示すようなブロック内の蓄積区分がなされてい
るとき、第1図に示すような構造のデータ110が端末
装置203あるいはカード読取機202から入力された
ときには、第6図に示すフローチャートの蓄積処理に従
って第7図のようにブロック内に蓄積される。
When data 110 having the structure as shown in FIG. 1 is input from the terminal device 203 or the card reader 202 when the storage is divided into blocks as shown in FIG. 5, the flowchart shown in FIG. According to the storage process, the data are stored in a block as shown in FIG.

第7図に示すようにデータ701〜705を蓄積した場
合、互いに関連あるデータの組が完全に1つのブロック
に納まるか否かは、すべてのデータについてテーブル間
データ比が成立つとしても、データ間の対応関係の構造
に依存するのである。
When the data 701 to 705 are accumulated as shown in FIG. It depends on the structure of the correspondence between them.

また、ここで、#OO1,8002は1組の蓄積された
ブロックの番号を示している。
Further, #OO1, 8002 indicates the number of one set of accumulated blocks.

第8図は、A (803)、B (804)、およびC
(805)という3つのテーブル、およびX (823
)、Y (824)、およびZ(825)という3つの
テーブルのどちらもテーブル間データ比が1対2 (8
06,826)および2対1(807,827)である
テーブルの例である6808.809,828.および
829で示す線は、テーブル間データの対応関係を示す
ものである。
FIG. 8 shows A (803), B (804), and C
(805), and X (823
), Y (824), and Z (825), the inter-table data ratio is 1:2 (8
06,826) and 2:1 (807,827). Lines indicated by and 829 indicate the correspondence between data between tables.

A、B、およびCの3つのテーブルの場合は、互いに関
連のあるデータの組が801および802の枠で示した
ように分離できるが、x、y、およびZの3つのテーブ
ルの場合には、互いに関連のあるデータの組が分離でき
ない。したがって、A。
In the case of three tables A, B, and C, mutually related data sets can be separated as shown in frames 801 and 802, but in the case of three tables x, y, and Z, , mutually related data sets cannot be separated. Therefore, A.

B、およびCのようなテーブルの場合には、互いに関連
する1組のデータが広範囲に及ぶため、1つのブロック
に納めるのは麺しい。A、B、およびCのように最小の
データの組が構成される場合や、X、Y、およびZのよ
うにデータの対応関係が非常に複雑である場合でなく、
その中間的な対応関係を持つ場合には、互いに関連する
1組のデータのうちある程度のデータが1つのブロック
に納まり、溢れたデータは別のブロックに格納されるこ
とになる。本発明は、A、B、およびCで示すようなテ
ーブルのとき特に有効である。
In the case of tables like B and C, a set of mutually related data covers a wide range, so it is difficult to store them in one block. This is not the case when the smallest set of data is constructed, such as A, B, and C, or when the correspondence relationship between data is extremely complex, such as X, Y, and Z.
In the case of an intermediate correspondence relationship, a certain amount of a set of mutually related data will fit into one block, and overflowing data will be stored in another block. The present invention is particularly effective for tables such as A, B, and C.

第7図に示すようなブロック内のデータを高速に取出す
方法としては1通常、木構造形式のインデックスが用い
られる。これを次の第9図に示す。
As a method for quickly retrieving data in a block as shown in FIG. 7, a tree-structured index is usually used. This is shown in the following Figure 9.

第9図は、本発明のデータ検索に使用するインデックス
構造を示す図である。これは、作業テーブル中から作業
名をキーとしてデータの検索を行いたいというときに使
用するインデックスの例を示している。
FIG. 9 is a diagram showing an index structure used for data search according to the present invention. This is an example of an index used when it is desired to search for data in a work table using the work name as a key.

第9図において、900は作業名と木構造を作るための
情報が記憶されているエリアであり、950は作業名と
その作業名のデータを含むブロックのブロック番号を記
憶するためのエリアであり、これらをレコードと呼ぶ。
In FIG. 9, 900 is an area where work names and information for creating a tree structure are stored, and 950 is an area where work names and block numbers of blocks containing data of the work names are stored. , these are called records.

901,904゜909、および951はレコード番号
、902゜905.907,910,912,914.
および952は作業名、903,906,908゜91
1.913.および915は木構造で次の段にあるレコ
ードへのレコード番号を示す、953は作1という作業
名を含むブロックは1つであることを示し、954はそ
のブロックが#001であることを示す。
901,904°909, and 951 are record numbers, 902°905.907,910,912,914.
and 952 is the work name, 903,906,908゜91
1.913. and 915 indicates the record number to the next record in the tree structure, 953 indicates that there is only one block containing the work name Work 1, and 954 indicates that the block is #001. .

第10図は、第9図のインデックスを使用したデータ検
索手順を示す処理フローチャートの一例である。
FIG. 10 is an example of a processing flowchart showing a data search procedure using the index shown in FIG.

以下、第10図の処理フローチャートを説明する。The processing flowchart shown in FIG. 10 will be explained below.

(i)作業テーブル用の作業名インデックスを用いて作
1の値を含むデータが蓄積されて1.6ブ。
(i) Data including the value of work 1 is accumulated using the work name index for the work table, resulting in 1.6 blocks.

ツタを知る(ステップ1001) 。Learn about ivy (step 1001).

(ii)作″!J資料関係テーブル用の作業名インデッ
クスから作1の値を含むデータが蓄積されているブロッ
クを知る(ステップ1002) 。
(ii) From the work name index for the work''!J material relation table, the block in which data including the value of work 1 is stored is determined (step 1002).

(ni)処理ステップ1001.1002ノ結果で、必
要となったブロックを外部記憶装置201から主記憶袋
PI 206 ヘ読込む(ステップ1003) 。
(ni) As a result of processing steps 1001 and 1002, the required block is read from the external storage device 201 into the main memory bag PI 206 (step 1003).

(汁)読込んだブロックの中の作業テーブルがら作1を
含むデータを取出す。また、読込んだブロックの中の作
業資料関連テーブルがら作1を含むデータを取出し、そ
のデータに含まれる資料名を知る。その資料名を含むデ
ータが蓄積されているブロックを資料テーブル用の資料
インデックスを用いて知る(ステップ1004) 。
(Soup) Extract the data including work table Karasaku 1 from the read block. Further, the data including the work material related table 1 is extracted from the read block, and the name of the material contained in the data is known. The block in which data including the material name is stored is known using the material index for the material table (step 1004).

(v)処理ステップ1004の結果で、必要となったブ
ロックを外部記憶装置201がら主記憶装置206に読
込む。ただし、読込むべきブロックがステップ1003
で既に読込んでいる場合にはそれを使用する(ステップ
1005) 。
(v) As a result of processing step 1004, the required block is read from the external storage device 201 to the main storage device 206. However, the block to be read is step 1003
If it has already been read in, it is used (step 1005).

(vi)読込んだブロックの中の資料テーブルから必要
なデータ、すなわち、処理ステップ1004で得た資料
名に相当するデータを取出す(ステップ1006) 。
(vi) Retrieve necessary data from the material table in the read block, that is, data corresponding to the material name obtained in processing step 1004 (step 1006).

第9図のインデックスを用いて、たとえば、作1という
作業名を検索する場合には、まず@01のレコードを見
て、作1が作60 (902)より小さいことから(こ
こでは、作xXの××の部分が作業名の大小関係を表わ
すものとしている)、@02 (903)のレコードを
見て、作1が作10 (9Q 5)より小さいことから
、@03(JO6)のレコードを見ることになる。次に
、@03のレコードをみると、作1(910)があるの
で、@04 (911)を見ることになり、@04のレ
コードから作1を含むデータは#001(954)のブ
ロックに蓄積されていることを知ることになるわけであ
る。第9図に示すレコードは、通常、外部記憶装置20
1に蓄積されているが、稼動時には、処理の高速化のた
めにその1部あるいは全部を主記憶装置206に常駐さ
せることもある。インデックスは、テーブル間で互いに
関連のデータを結びつけるためのデータアイテム名に対
して作成する。作業、作業資料関連、および資料の3つ
のテーブルの場合には、作業テーブルの作業名1作業資
料関連テーブルの作業名と資料名、およびテーブルの資
料名に対してインデックスを作成する。そして、たとえ
ば、作1をキーとして、作業9作業資料関係、および資
料の3つのテーブルについて互いに関連するデータを検
索したいという場合には、第10図に示すフローチャー
トによって検索を行う。第10図の処理ステップ100
3および処理ステップ1005では、外部記憶装置20
1から主記憶装置206へブロックの読込みを行うが、
互いに関連するデータが第7図に示すように、同一のブ
ロックに含まれる場合には、1回の読込みしか行われな
い。しかし、第8図の下図で説明したように、互いに関
連するデータの範囲でまとめられない場合には、多くの
ブロックの読込みが必要となる。すなわち、本発明は、
第8図の上図で示すようなデータ間の対応関係、あるい
はこれに近い対応関係をもつようなデータであって、互
いに関連するデータの組は小さいデータの組に入ついし
まうか、あるいは、その組を溢れるデータは非常に少な
いという場合に有効である。
For example, when searching for the work name Work 1 using the index in Figure 9, first look at the record @01, and since Work 1 is smaller than Work 60 (902) (here, work x (The XX part represents the size relationship of the work name), looking at the record @02 (903), work 1 is smaller than work 10 (9Q 5), so the record @03 (JO6) You will see. Next, when you look at the @03 record, there is work 1 (910), so you will see @04 (911), and the data including work 1 from the @04 record is in the block #001 (954). This means that you will know that it has been accumulated. The record shown in FIG. 9 is normally stored in the external storage device 20.
1, but during operation, some or all of them may be made to reside in the main storage device 206 in order to speed up processing. Indexes are created for data item names to connect mutually related data between tables. In the case of three tables: work, work material related, and material, an index is created for the work name 1 of the work table, the work name and material name of the work material related table, and the material name of the table. For example, if it is desired to search for data related to each other in the three tables of work 9, work material relations, and materials using work 1 as a key, the search is performed according to the flowchart shown in FIG. 10. Process step 100 of FIG.
3 and processing step 1005, the external storage device 20
1 to the main storage device 206, but
If mutually related data are included in the same block as shown in FIG. 7, reading is performed only once. However, as explained in the lower diagram of FIG. 8, if data cannot be grouped together within a range of mutually related data, it is necessary to read many blocks. That is, the present invention
The correspondence between data as shown in the upper diagram of FIG. This is effective when there is very little data overflowing the set.

第3図〜第10図では、3つのテーブルを例にあげて説
明したが、本方式は、その他のテーブルについても同様
な方法で実現可能である。第11図に2つのテーブル、
第12図に4つのテーブルの場合についての例を示す、
第11図では、2つのテーブルI (1101)および
J (1102)のテーブル間データ比が1対2(テー
ブル1105)であるとき、互いに関連のあるデータの
組が1103および1104に分離している様子を示し
ている。第12図では、P (1201) 、Q (1
202) 、R(1203) 、およびS (1204
)という4つのテーブルがあり、テーブル間データ比が
、PとQの間では1対2(テ−プル1207) 、Qと
Rとの間では2対1(テーブル120g)、RとSとの
間では2対1(テーブル1209)であることを示して
いる。そして、Rのテーブルの対応数を2に共通化する
ことによって、P、Q。
In FIGS. 3 to 10, the explanation has been given using three tables as an example, but the present method can be implemented in a similar manner for other tables as well. In Figure 11 there are two tables,
Figure 12 shows an example for the case of four tables.
In FIG. 11, when the inter-table data ratio of two tables I (1101) and J (1102) is 1:2 (table 1105), mutually related data sets are separated into 1103 and 1104. It shows the situation. In Figure 12, P (1201), Q (1
202) , R (1203) , and S (1204
), and the inter-table data ratio is 1:2 between P and Q (table 1207), 2:1 between Q and R (table 120g), and between R and S. This shows that the ratio is 2:1 (table 1209). Then, by standardizing the number of correspondences in the R table to 2, P, Q.

RおよびSとの間の比率を2対4対1として、互いに関
連のあるデータの組を示したものが1205および12
06である。第11図および第12図で示したようなデ
ータは、第3図〜第10図で説明したのと同様な方法で
1つのブロックに互いに関連のあるデータの組を蓄積し
ておき、高速に検索することが可能である。
1205 and 12 are data sets that are related to each other, with the ratio between R and S being 2:4:1.
It is 06. The data shown in Figures 11 and 12 can be processed at high speed by storing a set of mutually related data in one block in the same manner as explained in Figures 3 to 10. It is possible to search.

このようにして、本実施例によれば、 DBMSは、複
数種類のテーブルの互いに関連のあるデータは1つのブ
ロックに蓄積する機能をもつもので、検索処理を高速に
実行することが可能である。従来のDBMSでは、(i
)異なる種類のテーブルのデータは別々のブロックに蓄
積するか、あるいは、(ii)異なる種類のテーブルの
データを同一のブロックに蓄積する機能がある場合にも
、互いに関連あるデータを同一ブロックに蓄積するとい
う制御機能がないため、数ブロックに分散蓄積されてし
まう。これに対して、本方式では、互いに関連するデー
タを同一ブロックに蓄積する機能を持つため、従来に比
べて、ブロック転送の回数は数分の1になることが推定
される。インデックスの処理については、従来のDBM
Sのインデックス処理・は。
In this way, according to this embodiment, the DBMS has a function of accumulating mutually related data of multiple types of tables in one block, and it is possible to execute search processing at high speed. . In conventional DBMS, (i
) data from different types of tables is stored in separate blocks, or (ii) even if there is a function to store data from different types of tables into the same block, data that is related to each other is stored in the same block. Since there is no control function to do this, the data will be distributed and accumulated in several blocks. On the other hand, since the present method has a function of accumulating mutually related data in the same block, it is estimated that the number of block transfers will be reduced to a fraction of that of the conventional method. For index processing, conventional DBM
S index processing.

通常、データ転送処理と同程度かそれ以下になるように
設計されるので、データ転送処理が数分の1になる本方
式では、従来方式に比べて、はぼ2倍以上の性能向上に
なる。
Normally, it is designed to be the same level or lower than the data transfer processing, so this method, which reduces the data transfer processing to a fraction of the cost, can improve performance by more than twice as much as the conventional method. .

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

以上説明したように1本発明によれば、データベース管
理システムなどにおいて、データ蓄積のためのテーブル
定義を行う際にテーブル間にわたって互いに関連するデ
ータの対応数をユーザが与えるだけで、同一ブロックへ
の関連データの蓄積を増やすことができ、検索時に高速
検索ができるようになる。
As explained above, according to the present invention, in a database management system or the like, when defining a table for data accumulation, the user can simply specify the number of correspondences of mutually related data across tables, and the data can be stored in the same block. It is possible to increase the accumulation of related data, and it becomes possible to perform high-speed searches when searching.

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

第1図は本発明の一実施例を示すデータの蓄積・検索方
式説明図、第2図は本発明が適用される計算機システム
を示す構成ブロック図、第3図は第2図の外部記憶装置
中におけるテーブル間データ比の蓄積フォーマットを示
す図、第4図は第3図の蓄積フォーマットに従ったデー
タの一例を示す図、第5図は第2図の外部記憶装置上で
のデータ蓄積構造を示す図、第6図は第5図のデータの
蓄積構造に従ったデータの蓄積手順を示すフローチャー
ト、第7図は第5図、第6図のデータの蓄積構造とその
蓄積手順に従って蓄積したデータの一例を示す図、第8
図は本発明が適用されるテーブル間データの対応関係を
示す説明図、第9図は本発明のデータ検索に使用するイ
ンデックス構造を示す図、第10図は第9図のインデッ
クスを使用したデータ検索手順を示すフローチャートの
一例、第11図、第12図は本発明で扱える各種のデー
タを示す説明図である。 131.132・・・テーブル間データの対応数、21
2.213,214・・・テーブル間データの対応数の
比率に従って蓄積したデータ。 篤  1  図 (0L) +10 (b) 纂 ZI¥l 畜3図 ¥J 4 図 纂 5 凹 (^) (b) ■ 乙  口 ′fJ  7  図 篤 F3  図 ′fJq   図 猶 10  図 冨 11   図 篤12図
FIG. 1 is an explanatory diagram of a data storage/retrieval method showing an embodiment of the present invention, FIG. 2 is a block diagram showing a configuration of a computer system to which the present invention is applied, and FIG. 3 is an external storage device shown in FIG. 2. Figure 4 is a diagram showing an example of data according to the storage format of Figure 3, and Figure 5 is the data storage structure on the external storage device of Figure 2. Figure 6 is a flowchart showing the data accumulation procedure according to the data accumulation structure in Figure 5, and Figure 7 is a flow chart showing the data accumulation procedure in accordance with the data accumulation structure shown in Figures 5 and 6. Diagram showing an example of data, No. 8
The figure is an explanatory diagram showing the correspondence between data between tables to which the present invention is applied, Figure 9 is a diagram showing the index structure used for data search of the present invention, and Figure 10 is the data using the index in Figure 9. An example of a flowchart showing a search procedure, and FIGS. 11 and 12 are explanatory diagrams showing various types of data that can be handled by the present invention. 131.132... Number of correspondences between tables, 21
2.213,214...Data accumulated according to the ratio of the number of correspondences between tables. Atsushi 1 Figure (0L) +10 (b) 纂 ZI¥l 類 3 fig ¥ J 4 纂 5 Concave (^) (b) ■ 口 口'fJ 7 子Atsushi F3 fig'fJq fig. 10 zutomi 11 zuatsu Figure 12

Claims (1)

【特許請求の範囲】[Claims] 1、複数種類のテーブル型のデータを外部記憶装置上に
蓄積しておき、異なるテーブル間のデータに互いに関連
があるとき、該関連するデータを検索する手段を有する
計算機システムにおいて、前記外部記憶装置上に互いに
関連するデータ同志の対応数を指定するテーブルを設け
、データ蓄積前に該関連するデータ同志の対応数を該テ
ーブルで指定することによつて、該対応数に相当するエ
リアを設定し、該エリアに前記関連するデータを同一ブ
ロックデータとしてデータ蓄積を行い、ブロック単位に
関連データ検索を行うことを特徴とするデータの蓄積・
検索方式。
1. In a computer system having means for accumulating a plurality of types of table-type data on an external storage device and searching for the related data when data between different tables is related to each other, the external storage device A table for specifying the number of correspondences between mutually related data is provided above, and by specifying the number of correspondences between the related data in the table before data is accumulated, an area corresponding to the number of correspondences is set. , data accumulation characterized in that data is accumulated in the area as the related data as the same block data, and related data search is performed in block units;
Search method.
JP60019937A 1985-02-06 1985-02-06 Data storage and retrieval system Pending JPS61180332A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60019937A JPS61180332A (en) 1985-02-06 1985-02-06 Data storage and retrieval system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60019937A JPS61180332A (en) 1985-02-06 1985-02-06 Data storage and retrieval system

Publications (1)

Publication Number Publication Date
JPS61180332A true JPS61180332A (en) 1986-08-13

Family

ID=12013119

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60019937A Pending JPS61180332A (en) 1985-02-06 1985-02-06 Data storage and retrieval system

Country Status (1)

Country Link
JP (1) JPS61180332A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08129551A (en) * 1994-10-31 1996-05-21 Fujitsu Ltd Hash system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08129551A (en) * 1994-10-31 1996-05-21 Fujitsu Ltd Hash system

Similar Documents

Publication Publication Date Title
US7480662B2 (en) Fact table storage in a decision support system environment
US5687377A (en) Method for storing variables in a programming language
EP0633531B1 (en) Memory management system and method
JPS61180332A (en) Data storage and retrieval system
JPH0296213A (en) Secondary memory control method using hierarchical bit map
US7565217B2 (en) Traversal of empty regions in a searchable data structure
CN100361088C (en) Method for realizing device test
US5737603A (en) Database system capable of carrying out an efficient free area search
JPH01237723A (en) Information registering and retrieving method
JP3031944B2 (en) Data processing device
JPH02116936A (en) Reorganizing system
JPS635443A (en) File management device
JPH06103134A (en) Constructing method for index
JPH04643A (en) File store area securing system
JPH04287245A (en) System for managing free area of file system
JPH0744426A (en) File management method for file system
JPH06348572A (en) Multi-mechanism disk system
JP2861548B2 (en) Multiple host method
JPH02127742A (en) Idle area retrieving system
JPS62293346A (en) Storing system for data retrieving information
JPH04140825A (en) Optical disk device access system
JPH0635973A (en) Data base retrieving method
JPH01287737A (en) Data base device and data base managing method
JPH01106217A (en) Parallel storage/reading type data processor
JPH04172541A (en) Record storage unit