JPH03210667A - Access method to information having same key - Google Patents
Access method to information having same keyInfo
- Publication number
- JPH03210667A JPH03210667A JP2007585A JP758590A JPH03210667A JP H03210667 A JPH03210667 A JP H03210667A JP 2007585 A JP2007585 A JP 2007585A JP 758590 A JP758590 A JP 758590A JP H03210667 A JPH03210667 A JP H03210667A
- Authority
- JP
- Japan
- Prior art keywords
- data
- condition
- access
- written
- key
- 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
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【発明の詳細な説明】
〔概 要〕
キー付きファイルでデータベースを構築しているシステ
ムのキー付きファイルへのアクセス方法に関し、
同一キーで複数のデータの存在を可能とし、且つ同一キ
ーで存在する複数のデータの検索を効率良く行うことの
できる同一キーを持つ情報へのアクセス方法を提供する
ことを目的とし、キー部に、アクセスする領域を指定す
る決定条件で指定されるデータが複数存在可能とさせる
ための付加条件と、データ部に、同一の決定条件で指定
される引き続くデータが存在するときには、データの番
号を記録する後続データ指定領域を設け、決定条件で指
定されるデータが複数あるときに、付加条件で決定条件
を細分して、同一キーで複数のデータの存在を可能とし
、決定条件で指定されるデータにアクセスするときには
、データの中の後続データ指定領域を読み出し、データ
番号が書き込まれているときには、アクセス条件として
、後続データ指定領域に古き込まれている後続データ番
号を指定して、次のアクセスを行い、後続データ指定領
域にデータ番号が書き込まれていないときには、次の処
理を行うように構成する。[Detailed Description of the Invention] [Summary] Regarding a method of accessing a keyed file in a system in which a database is constructed using keyed files, the present invention enables the existence of multiple pieces of data with the same key, and the existence of multiple pieces of data with the same key. The purpose is to provide a method for accessing information with the same key that allows efficient searches of multiple data, and allows for multiple data to be specified by the decision condition that specifies the area to be accessed in the key part. If there is an additional condition for making the decision condition, and if there is subsequent data specified by the same decision condition in the data section, a subsequent data specification area is provided to record the data number, and if there is more than one data specified by the decision condition. Sometimes, the decision condition is subdivided with additional conditions to enable the existence of multiple data with the same key, and when accessing the data specified in the decision condition, the subsequent data specified area in the data is read and the data number is is written, the next access is made by specifying the subsequent data number stored in the subsequent data specification area as an access condition, and when no data number is written in the subsequent data specification area, the next access is made. Configure it to perform the following processing.
本発明は、キー付きファイルでデータベースを構築して
いるシステムのキー付きファイルへのアクセス方法に関
する。The present invention relates to a method for accessing keyed files in a system in which a database is constructed using keyed files.
コンピュータシステムの進展により、データベースが広
い範囲で採用されている。With the advancement of computer systems, databases have been widely adopted.
データベースで使用されるファイルの1つとして、キー
付きファイルがあり、このキー付きファイルはキー部と
キー部により指定される領域に書き込まれているデータ
部より構成されており、キー部とデータ部は1対1の対
応となっているものである。One of the files used in databases is a keyed file, which consists of a key part and a data part written in the area specified by the key part. is a one-to-one correspondence.
かかるキー付きファイルにおいて、同一キーで複数デー
タの存在が可能で、且つ複数データを効率良く読み出す
キー付きファイルへのアクセス方法が要求されている。In such a keyed file, there is a need for a keyed file access method that allows multiple data to exist with the same key and that reads the multiple data efficiently.
第5図は従来例のキー付きファイルを説明する易璃基↓
図である。Figure 5 is an easy-to-understand example of a conventional keyed file↓
It is a diagram.
第5図に示す従来例は2つのキー付ファイル21aと2
1bから構成されており、キー付きファイルファイル2
1aの情報を基にして、それに対応するキー付きファイ
ル21bの情報を引当てる。The conventional example shown in FIG. 5 has two keyed files 21a and 2.
1b, keyed file file 2
Based on the information in 1a, the corresponding information in the keyed file 21b is allocated.
例えば、キー付きファイル21aにより、決定条件がA
、A’ 、A″と指定されると、その条件に対応してデ
ータa、a’ 、a’が読み出される。For example, the keyed file 21a indicates that the decision condition is A.
, A', A'', data a, a', a' are read out in accordance with the conditions.
このようなキー付きファイルにおいて、物理的に1つの
キーに対して、複数の情報が存在することが許されない
。In such a keyed file, multiple pieces of information are not allowed to exist for one physical key.
したがって、1つの条件に対して、複数のデータの存在
を可能とするためには、(b)のキー付きファイル2
l b’に示すようにキー部22の長さを長くして、例
えば、決定条件SBのあとに1.2.3、・・・という
データ固有の番号を付加することにより、キー部にユニ
ーク性を持たせている。Therefore, in order to enable the existence of multiple data for one condition, the keyed file 2 in (b)
By increasing the length of the key part 22 as shown in lb' and adding data-specific numbers such as 1, 2, 3, etc. after the decision condition SB, for example, the key part can be made unique. It has a sexuality.
キー付きファイルにおいては、キー部22はユニークな
存在でなければならないので、1つの決定条件に対して
複数のデータを存在させるためには、キー部22の長さ
を長くして、決定条件のみをキーとするだけではなく、
決定条件を細分する条件を追加して、ユニークな存在と
している。In a keyed file, the key part 22 must be unique, so in order to have multiple pieces of data for one decision condition, the length of the key part 22 should be made long and only the decision condition In addition to the key,
Adding conditions to subdivide the decision conditions makes it unique.
しかし、構築済、運用中のデータベースに対して、キー
長を変更し、再創成することは、多大な工数を必要とす
る。However, changing the key length and re-creating a database that has already been constructed and is in operation requires a large amount of man-hours.
本発明は、同一キーで複数のデータの存在を可能とし、
且つ同一キーで存在する複数のデータの検索を効率良く
行うことのできる同一キーを持つ情報へのアクセス方法
を提供することを目的とする。The present invention enables the existence of multiple data with the same key,
Another object of the present invention is to provide a method for accessing information having the same key, which allows efficient searching of multiple pieces of data with the same key.
第1図は本発明の詳細な説明する図を示す。 FIG. 1 shows a detailed illustration of the invention.
第1図に示す本発明の原理ブロック図の(a)は処理装
置10、磁気ディスク20、端末装置30およびプリン
タ40よりなる処理システムであり、原理ブロック図の
(ロ)は磁気ディスク20の中に構築されるキー部22
とデータ部23よりなるキー付きファイル21であり、
22Aは、アクセス条件を決定するキー部22の決定条
件であり、
22Bは、キー部22に設ける、決定条件22Aを細分
する付加条件であり、
23Aは、データ部23に設ける、アクセスしたデータ
に引き続く後続データの番号を書き込んでおく後続デー
タ指定領域であり、
かかる手段を具備することにより本課題を解決するため
の手段とする。(a) of the principle block diagram of the present invention shown in FIG. Key part 22 constructed in
and a data section 23, 22A is a determination condition of the key section 22 that determines the access condition, 22B is an additional condition provided in the key section 22 to subdivide the determination condition 22A, 23A is a subsequent data designation area provided in the data section 23 in which the number of subsequent data following the accessed data is written, and providing such means is a means for solving this problem.
キー部22の決定条件22Aで複数のデータを存在可能
とするために、決定条件22Aを細分する付加条件22
Bを設けであるキー部22を使用することにより、同一
の決定条件22Aで複数のデータの存在を可能とし、キ
ー付きファイル21へのアクセス時には、データ部23
の後続データ指定領域23Aを読み出し、データ番号が
書き込まれているときには、アクセス条件として、後続
データ指定領域23Aに書き込まれている後続データ番
号を指定して、次のアクセスを行い、後続データ指定領
域23Aにデータ番号が書き込まれていないときには、
次の処理を行うことにより、同一キーで指定されるデー
タの有無が次のデータを読むことなく判定できるので、
データベースのアクセスを効率良く実行することが可能
となる。An additional condition 22 that subdivides the determination condition 22A in order to allow multiple pieces of data to exist in the determination condition 22A of the key part 22.
By using the key section 22 in which B is provided, it is possible to have multiple pieces of data under the same decision condition 22A, and when accessing the keyed file 21, the data section 23
When the subsequent data specification area 23A is read and a data number is written, the subsequent data number written in the subsequent data specification area 23A is specified as an access condition, the next access is made, and the subsequent data specification area is read. When the data number is not written in 23A,
By performing the following processing, the presence or absence of data specified by the same key can be determined without reading the next data.
It becomes possible to efficiently access the database.
以下本発明の要旨を第2図〜第4図に示す実施例により
具体的に説明する。The gist of the present invention will be specifically explained below with reference to embodiments shown in FIGS. 2 to 4.
第2図は本発明の実施例のキー付きファイルを説明する
図、第3図は本発明の実施例のアクセス方法を説明する
図、第4図は本発明の実施例の処理のフローチャートを
説明する図をそれぞれ示す。Fig. 2 is a diagram explaining a keyed file according to an embodiment of the present invention, Fig. 3 is a diagram explaining an access method according to an embodiment of the present invention, and Fig. 4 is a diagram explaining a processing flowchart according to an embodiment of the present invention. Figures are shown for each.
なお、全図を通じて同一符号は同一対象物を示す。Note that the same reference numerals indicate the same objects throughout the figures.
第2図に示す本発明の実施例は、生産管理システムで使
用されるキー付きファイル21の例を示す。The embodiment of the present invention shown in FIG. 2 shows an example of a keyed file 21 used in a production management system.
例えば、ある装置を製造するときに、その装置を構成す
る部品を手配する必要がある。このような必要部品はデ
ータベースとして構築されており、部品情報がキー付き
ファイル21に書き込まれている。For example, when manufacturing a certain device, it is necessary to arrange the parts that make up the device. Such necessary parts are constructed as a database, and part information is written in a keyed file 21.
ここで、条件Aで指定される部品種別がSの3個の部品
a1〜a3が書き込まれており、部品a1の後続データ
指定領域23Aには、部品a2が存在するので002が
、部品a2の後続データ指定領域23Aには、部品a3
が存在するので003が、書き込まれており、部品a3
の後続データ指定領域23Aには、後続部品が存在しな
いので空白となっている。Here, three parts a1 to a3 whose part type is S specified by condition A are written, and part a2 exists in the subsequent data specification area 23A of part a1, so 002 is written for part a2. In the subsequent data designation area 23A, part a3
exists, so 003 is written, and part a3
The subsequent data designation area 23A is blank because there are no subsequent parts.
ここでは、決定条件22AはAであり、同一条件で3個
のデータがあるので、これを区別するために、付加条件
22Bとして、Sl、S2、S3としている。Here, the determining condition 22A is A, and since there are three pieces of data under the same condition, in order to distinguish them, the additional conditions 22B are set as Sl, S2, and S3.
第3図は、第2図で説明したキー付きファイル21への
アクセス方法であり、キー付きファイル21Aで決定条
件Aが取り出され、まず部品の種別Sについてキー付き
ファイル21Bのデータ引当てを行う。FIG. 3 shows a method of accessing the keyed file 21 explained in FIG. 2, in which the decision condition A is retrieved from the keyed file 21A, and data is first assigned to the keyed file 21B for the part type S. .
ついで、決定条件Aの部品の種別Tについてキー付きフ
ァイル21Bの引当を行う。Next, the keyed file 21B is allocated for the part type T of the determination condition A.
決定条件Aの検索終了後、決定条件Bについて検索を行
い、以下指定される条件Cの検索を行う。After the search for determination condition A is completed, a search is performed for determination condition B, and then a search for condition C specified below is performed.
ここでは、決定条件への部品種別Sについては、データ
a l Sa 2、a3、決定条件Aの部品種別Tにつ
いてデータa、決定条件Bの部品種別Sについてデータ
b、決定条件Bの部品種別Tは存在しないので、次に決
定条件Cの部品種別Sについて検索を行い、存在しない
ことを確認したら次に部品種別Tについてデータcl、
c2が検索される。Here, data a l Sa 2, a3 for component type S for determination condition A, data a for component type T for determination condition A, data b for component type S for determination condition B, and data b for component type T for determination condition B. does not exist, so next we search for part type S with decision condition C, and after confirming that it does not exist, we search for data cl,
c2 is searched.
第4図は処理のフローチャートである。FIG. 4 is a flowchart of the process.
■ キー付きファイル21Bをアクセスする条件をキー
付きファイル21Aから読み出す。ここでは、上から順
に読むものとし、決定条件Aが読み出される。■ Read the conditions for accessing the keyed file 21B from the keyed file 21A. Here, it is assumed that the information is read in order from the top, and the decision condition A is read out.
■ まず部品種別Sにつき検索を行うので、決定条件と
して(S+A)をセントする。■ First, a search is performed for part type S, so (S+A) is set as the determination condition.
■ ■の条件にしたがって、キー付きファイル21Bを
読み出す。(2) Read the keyed file 21B according to the conditions (2).
■ 後続データ指定領域23Aのデータを読み出し、後
続データの有無を判断する。(2) Read the data in the subsequent data designation area 23A and determine whether there is any subsequent data.
■ ここでは、「2」と書かれているので、後続データ
の2番が存在していることを示すので、アクセス条(牛
を(S+2+A)とセットして■の次の、データを検索
する。■ Here, since "2" is written, it indicates that the second data of the succeeding data exists, so set the access condition (cow) to (S+2+A) and search for the data following ■. .
■ 後続データ指定領域23Aが空白のときには、決定
条件Aの部品品種Sの検索は終了したことを示すので、
決定条件への部品品種Tについての検索を実行する。■ When the subsequent data specification area 23A is blank, it indicates that the search for the part type S for the decision condition A has been completed.
A search is executed for the part type T to the determination condition.
以上のように、キー付きファイルを構成することにより
、同一キーにより複数の情報の存在を可能とし、データ
部には後続データの番号を記録してお(ことにより、効
率的にデータベースへのアクセスを行うことが可能とな
る。As described above, by configuring a keyed file, it is possible to have multiple pieces of information with the same key, and the number of subsequent data is recorded in the data section (this makes it possible to efficiently access the database. It becomes possible to do this.
〔発明の効果]
以上のような本発明によれば、キー部には決定条件を細
分化する付加条件を加えることにより、同一キーでの複
数情報の存在を可能とし、データ部には後続データの番
号を記録しておくことにより、効率的にデータベースへ
のアクセスを行うことのできる同一キーを持つ情報への
アクセス方法提供することが可能となる。[Effects of the Invention] According to the present invention as described above, by adding additional conditions that subdivide the determination conditions to the key part, it is possible to have multiple pieces of information with the same key, and the data part can contain subsequent data. By recording the numbers, it becomes possible to provide a method for accessing information having the same key that allows efficient access to the database.
第1図は本発明の詳細な説明するブロック図、第2図は
本発明の実施例のキー付きファイルを説明する図、
第3図は本発明の実施例のアクセス方法を説明する図、
第4図は本発明の実施例の処理のフローチャートを説明
する図
第5図は従来例のキー付きファイルを説明する図、をそ
れぞれ示す。
図において、
10は処理装置、
20は磁気ディスク、
2I、21A、21B、21a。
b′はキー付きファイル、
22はキー部、
22Aは決定条件、
22Bは付加条件、
23はデータ部、
23Aは後続データ指定領域、
30は端末装置、
40はプリンタ、
をそれぞれ示す。
(bl
本発明の詳細な説明するブロック図
第1図
本発明の実施例のキー付きファイルを説明する間第2図
本発明の実施例のアクセス方法を説明する開本発明の実
施例の処理のフローチャートを説明する間第4図
従来例のキー付きファイルを説明する図第5図FIG. 1 is a block diagram explaining the present invention in detail, FIG. 2 is a diagram explaining a keyed file according to an embodiment of the present invention, FIG. 3 is a diagram explaining an access method according to an embodiment of the present invention, 4 is a diagram illustrating a flowchart of processing according to an embodiment of the present invention, and FIG. 5 is a diagram illustrating a conventional keyed file. In the figure, 10 is a processing device, 20 is a magnetic disk, and 2I, 21A, 21B, 21a. b' is a file with a key, 22 is a key part, 22A is a decision condition, 22B is an additional condition, 23 is a data part, 23A is a subsequent data designation area, 30 is a terminal device, and 40 is a printer. (bl Detailed explanation of the present invention) Figure 1: Detailed explanation of the keyed file of the embodiment of the present invention Figure 2: Opening of the access method of the embodiment of the present invention Fig. 4 for explaining the flowchart Fig. 5 for explaining the conventional keyed file
Claims (1)
装置(30)と、プリンタ(40)とからなるデータ処
理システムの、前記磁気ディスク(20)に構成される
キー付きファイル(21)によるデータベースへのアク
セス方法であって、アクセスする領域を指定するキー部
(22)と、該領域に書き込まれているデータ部(23
)よりなるキー付きファイル(21)において、 前記キー部(22)に、アクセスする領域を指定する決
定条件(22A)で指定されるデータを複数存在可能と
させるための付加条件(22B)と、 前記データ部(23)に、同一の前記決定条件(22A
)で指定される引き続くデータが存在するときには、該
データの番号を記録する後続データ指定領域(23A)
を設け、 アクセスする情報を指定する前記決定条件(22A)で
指定されるデータが複数あるときに、前記付加条件(2
2B)で前記決定条件(22A)を細分して、同一キー
で複数のデータの存在を可能とし、前記決定条件(22
A)で指定されるデータにアクセスするときには、該デ
ータの中の前記後続データ指定領域(23A)を読み出
し、データ番号が書き込まれているときには、アクセス
条件として、前記後続データ指定領域(23A)に書き
込まれている後続データ番号を指定して、次のアクセス
を行い、前記後続データ指定領域(23A)にデータ番
号が書き込まれていないときには、次の処理を行うこと
を特徴とする同一キーを持つ情報へのアクセス方法。[Claims] A key configured on the magnetic disk (20) of a data processing system consisting of a processing device (10), a magnetic disk (20), a terminal device (30), and a printer (40). A method of accessing a database using an attached file (21), which includes a key part (22) that specifies the area to be accessed, and a data part (23) written in the area.
), an additional condition (22B) for allowing a plurality of data specified by the determination condition (22A) specifying the area to be accessed to exist in the key part (22); The same determination condition (22A) is stored in the data section (23).
), a subsequent data specification area (23A) in which the number of the data is recorded.
and when there is a plurality of data specified by the determination condition (22A) specifying the information to be accessed, the additional condition (22A) is set.
In step 2B), the decision condition (22A) is subdivided to enable the existence of multiple pieces of data with the same key, and the decision condition (22A) is
When accessing the data specified in A), the subsequent data specification area (23A) in the data is read, and if a data number is written, the following data specification area (23A) is accessed as an access condition. Having the same key, the next access is made by specifying the written subsequent data number, and when the data number is not written in the subsequent data specification area (23A), the next processing is performed. How to access information.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007585A JPH03210667A (en) | 1990-01-16 | 1990-01-16 | Access method to information having same key |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007585A JPH03210667A (en) | 1990-01-16 | 1990-01-16 | Access method to information having same key |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH03210667A true JPH03210667A (en) | 1991-09-13 |
Family
ID=11669888
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007585A Pending JPH03210667A (en) | 1990-01-16 | 1990-01-16 | Access method to information having same key |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH03210667A (en) |
-
1990
- 1990-01-16 JP JP2007585A patent/JPH03210667A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8239343B2 (en) | Database reorganization technique | |
| US5333318A (en) | Creating and searching a quad linked list in a trunked communication system | |
| JP2000357115A (en) | Device and method for file retrieval | |
| CN109189343B (en) | Metadata disk-dropping method, device, equipment and computer-readable storage medium | |
| JPH03210667A (en) | Access method to information having same key | |
| JPS59108105A (en) | Retrieving system of shortest route | |
| CN110221971B (en) | Search engine testing method and device, electronic equipment and storage medium | |
| CN115221182B (en) | A file merging method, system, storage medium, and electronic device | |
| JPH10240744A (en) | System for processing retrieval of range division chart and method therefor and recording medium for recording retrieval processing program | |
| JPH04140825A (en) | Optical disk device access system | |
| JPH03174654A (en) | Filing method and its device | |
| JPH08305622A (en) | Information processing system and its exclusive control system | |
| JPH04287245A (en) | System for managing free area of file system | |
| JP2581145B2 (en) | Security processing method | |
| JPH0423143A (en) | Data storing system | |
| JPH04139545A (en) | Data base updating processing system | |
| JPH04350741A (en) | Access speed increasing method for indexed sequential file | |
| JPH02176866A (en) | Fast search method | |
| JPH02304615A (en) | Allocating system for parallel disk control buffer | |
| JPS633351A (en) | Buffer retrieving control system | |
| JPH10333955A (en) | Index order compilation file access device, access method and program recording medium therefor | |
| JPH02194471A (en) | Data base retrieval system | |
| JPS629433A (en) | Data base access mechanism | |
| JPH0877045A (en) | File sharing method | |
| JPH02227774A (en) | Retrieving data setting process system |