JPH01140228A - Data storage retrieving system - Google Patents

Data storage retrieving system

Info

Publication number
JPH01140228A
JPH01140228A JP62298240A JP29824087A JPH01140228A JP H01140228 A JPH01140228 A JP H01140228A JP 62298240 A JP62298240 A JP 62298240A JP 29824087 A JP29824087 A JP 29824087A JP H01140228 A JPH01140228 A JP H01140228A
Authority
JP
Japan
Prior art keywords
record
data
index
storage
address
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
JP62298240A
Other languages
Japanese (ja)
Inventor
Kazumasa Iwamoto
岩本 和眞
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP62298240A priority Critical patent/JPH01140228A/en
Publication of JPH01140228A publication Critical patent/JPH01140228A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To delete a necessary change place at the time of reorganization to a data file by making correspondence information between a record serial- number assigned to a data record and a storage address on the data file into address converting information. CONSTITUTION:A serial-number assigning means 1 adds 1 to the largest record serial-number in a converting information storage data 8 in a data file 7, assigns the record serial-number to the data record to be stored, a storage means 2 stores the data record whose assigned record serial-number is added into a storage area 9, a storage means 3 stores the correspondence information between the record serial-number and the storage address as the address converting information into a storage area 8, a storage means 4 stores an index record with a stored data value as a key value and with the record serial-number as pointer information into a storage area 6 in a file 5. The record serial-number is obtained from the index record corresponding to the key value by a retrieving means 10, converted into the storage address by a converting means 11 and the data record is removed from the storage area 9 by a reading means 12.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データファイル上にデータレコードを格納し
、そのデータレコード内のデータ値をキー値として持つ
インデックスレコードをインデックスファイル上に格納
し、インデックスレコードを指定されたキー値により検
索して得たポインタ情報に従ってデータレコードを読込
むデータ格納検索方式に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention stores a data record on a data file, stores an index record having a data value in the data record as a key value on the index file, The present invention relates to a data storage and retrieval method for reading data records according to pointer information obtained by retrieving index records using specified key values.

〔従来の技術〕[Conventional technology]

従来、この種のデータ格納検索方式においては、データ
ファイル上に格納されているデータレコードに対するイ
ンデックスレコード中のポインタ情報部に、データファ
イル上のデータレコードの格納アドレスそのものをポイ
ンタ情報として格納し、指定されたキー値と等しいキー
値を持つインデックスレコードを検索し、見つけたイン
デックスレコード中のポインタ情報が指す格納アドレス
に従ってデータレコードをデータファイルから読込んで
いた。即ち、第5図に示すように、データファイル上の
アドレスiにデータ値diを持つデータレコードDIを
、アドレスjにデータ値djを持つデータレコードDJ
を、アドレスkにデータ値dkを持つデータレコードD
Kをそれぞれ格納した場合、キー値ki(=di)を持
つインデックスレコードIIのポインタ情報部にアドレ
スiを、キー値kj(=dj)を持つインデックスレコ
ードIJのポインタ情報部にアドレスjを、キー値kk
 (=dk)を持つインデックスレコードIKのポイン
タ情報部にアドレスkをそれぞれ格納するものである。
Conventionally, in this type of data storage search method, the storage address of the data record on the data file itself is stored as pointer information in the pointer information section of the index record for the data record stored on the data file, and the storage address itself of the data record on the data file is stored as pointer information. The system searches for an index record with a key value equal to the specified key value, and reads the data record from the data file according to the storage address pointed to by the pointer information in the found index record. That is, as shown in FIG. 5, a data record DI having a data value di at address i on the data file, and a data record DJ having a data value dj at address j.
is a data record D with data value dk at address k.
When K is stored, address i is stored in the pointer information field of index record II with key value ki (=di), address j is stored in the pointer information field of index record IJ with key value kj (=dj), and key value kk
The address k is stored in the pointer information section of the index record IK having (=dk).

そして、たとえばデータレコードDJをデータファイル
の再編成、再構成等により再配置する場合、データレコ
ード数以上のデータ(1djをキーイ直としてインデッ
クスファイル内のインデックスレコードを検索し、キー
値が[kj(”dj)JであるインデックスレコードI
Jのポインタ情報部のアドレスjを、データレコードD
Jの新しい格納アドレスを指すように変更する。
For example, when relocating the data record DJ by reorganizing or reconfiguring the data file, search the index record in the index file using 1dj as the key key, and search for the index record in the index file with the key value [kj( ``dj)J'' index record I
Address j of the pointer information section of J, data record D
Change it to point to the new storage address of J.

データレコードDJを指すインデックスが他に存在すれ
ば、その全てのインデックスレコード内のポインタ情報
部の変更を繰返し行なう。
If there are other indexes pointing to the data record DJ, the pointer information sections in all index records are repeatedly changed.

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

データファイル上に格納されているデータレコードに対
するインデックスレコードのデータレコードを指すポイ
ンタ情報として、データレコードの格納アドレスそのも
のを使用する上述した従来方式では、データファイルに
対して再編成、再構成等の処理を行ない、データファイ
ル内の全て或いは一部のデータレコードに対してデータ
ファイル内の格納位置を変えた場合、前述したようにそ
の再配置するデータレコードを指している全てのインデ
ックスレコードのポインタ情報部を変更する必要がある
。従って、一つのデータファイルに対して複数のインデ
ックスが存在する場合(通常の多くはそうである)、再
編成、再構成等の処理の対象となったデータレコード数
以上の数のインデックスレコードのポインタ情報部の変
更が必要となり、データファイルに対する再編成、再構
成等を速やかに行なうことが困難であるという欠点があ
った。
The conventional method described above uses the data record storage address itself as pointer information pointing to the data record of the index record for the data record stored on the data file. If you change the storage location in the data file for all or part of the data records in the data file, the pointer information section of all index records pointing to the data records to be relocated will be changed as described above. need to be changed. Therefore, if multiple indexes exist for a single data file (which is often the case), pointers to more index records than the number of data records subject to reorganization, reorganization, etc. The disadvantage is that it is necessary to change the information section, and it is difficult to quickly reorganize, reconfigure, etc. the data files.

本発明の目的は、データファイルに対して再編成、再構
成等を行なう際に必要な変更箇所を削減し得るデータ格
納検索方式を提供することにある。
An object of the present invention is to provide a data storage and retrieval method that can reduce the number of changes required when reorganizing, reconfiguring, etc. a data file.

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

本発明は上記目的を達成するために、 データファイル上にデータレコードを格納し、該データ
レコード内のデータ値をキー値として持つインデックス
レコードをインデックスファイル上に格納し、インデッ
クスレコードを指定されたキー値により検索して得たポ
インタ情報に従ってデータレコードを読込むデータ格納
検索方式において、 データファイルに格納するデータレコードに割当てるレ
コード通番を採番するレコード通番採番手段と、 該レコード通番採番手段によって前記データレコードに
割当てられたレコード通番を前記データレコードに付加
しデータファイル内のデータレコード格納域に格納する
データレコード格納手段と、前記レコード通番採番手段
によって前記データレコードに割当てられたレコード通
番と前記データレコード格納手段によって格納された前
記データレコードのデータファイル上の格納アドレスと
の対応情報をアドレス変換情報としてデータファイル内
のアドレス変換情報格納域に格納するアドレス変換情報
格納手段と、 前記データレコード格納手段によって格納された前記デ
ータレコード内のデータ値をキー値とし、前記レコード
通番採番手段によって前記データレコードに割当てられ
たレコード通番を前記データレコードを指すためのポイ
ンタ情報とするインデックスレコードを生成し、インデ
ックスファイル内のインデックスレコード格納域に格納
するインデックスレコード格納手段き、 該インデックスレコード格納手段によって格納されたイ
ンデックスレコードを指定されたキー値により検索し、
指定されたキー値に対応するインデックスレコードのぷ
インク情報からレコード通番を得るインデックス検索手
段と、 該インデックス検索手段によって得たレコード通番を、
前記アドレス変換情報を用いてデータレコードのデータ
ファイル上の格納アドレスに変換するアドレス変換手段
と、 該アドレス変換手段によって変換されたデータレコード
のデータファイル上の格納アドレスによりデータレコー
ドを読込むデータレコード読込み手段とを有している。
In order to achieve the above object, the present invention stores a data record on a data file, stores an index record having a data value in the data record as a key value on the index file, and stores the index record with a specified key. In a data storage and retrieval method in which a data record is read according to pointer information obtained by searching by value, a record sequence number assigning means for assigning a record sequence number to a data record stored in a data file; a data record storage means for adding a record serial number assigned to the data record to the data record and storing it in a data record storage area in a data file; a record serial number assigned to the data record by the record serial number assigning means; Address translation information storage means for storing correspondence information of the data record stored by the data record storage means with a storage address on the data file as address translation information in an address translation information storage area in the data file; and the data record. Generating an index record in which the data value in the data record stored by the storage means is used as a key value, and the record sequence number assigned to the data record by the record sequence numbering means is used as pointer information for pointing to the data record. and an index record storage means for storing in an index record storage area in the index file, searching the index record stored by the index record storage means using a specified key value,
an index search means for obtaining a record serial number from the print information of an index record corresponding to a specified key value; and a record serial number obtained by the index search means,
an address conversion means for converting a data record into a storage address on a data file using the address conversion information; and a data record read for reading a data record using the storage address on the data file of the data record converted by the address conversion means. and means.

〔作用〕[Effect]

データファイルにデータレコードを格納する場合、レコ
ード通番採番手段で採番されたレコード通番が付加され
たデータレコードがデータファイルに格納されると共に
、上記レコード通番と格納アドレスとの対応関係を示す
アドレス変換情報がアドレス変換情報格納域に格納され
、また、上記格納したデータレコード内のデータ値をキ
ー値として持ち且つ上記割当てられたレコード通番をポ
インタ情報として持つインデックスレコードがインデッ
クスレコード格納手段によってインデックスファイル内
に格納される。
When storing a data record in a data file, the data record to which the record sequence number assigned by the record sequence numbering means is added is stored in the data file, and an address indicating the correspondence between the record sequence number and the storage address is stored in the data file. The conversion information is stored in the address conversion information storage area, and an index record having the data value in the stored data record as a key value and the assigned record sequence number as pointer information is stored in the index file by the index record storage means. stored within.

キー値を指定した検索が指示されると、インデックス検
索手段によってその指定されたキー値によるインデック
スレコードの検索が行なわれ、指定されたキー値を持つ
インデックスレコードのポインタ情報の示すレコード通
番が得られ、このレコード通番とアドレス変換情報とか
らアドレス変換手段によって目的とするデータレコード
の格納アドレスが求められ、この格納アドレスに従って
データレコード読込み手段がデータレコードをデータフ
ァイルから読込む。
When a search with a specified key value is instructed, the index search means searches for index records using the specified key value, and obtains the record sequence number indicated by the pointer information of the index record with the specified key value. The storage address of the target data record is determined by the address conversion means from this record serial number and the address conversion information, and the data record reading means reads the data record from the data file in accordance with this storage address.

一つのデータレコードに対して複数のインデックスレコ
ードが存在していても、そのデータレコードに対応する
レコード通番と格納アドレスとの対であるアドレス変換
情報は一つなので、データファイルに対して再編成、再
構成等の処理によりデータレコードのデータファイル内
の格納位置が変更された場合、再配置されたデータレコ
ードに対応するアドレス変換情報のみを変更すれば済む
ことになる。
Even if multiple index records exist for one data record, there is only one address conversion information, which is a pair of record serial number and storage address corresponding to that data record. When the storage position of a data record in a data file is changed due to processing such as reconfiguration, it is only necessary to change the address conversion information corresponding to the rearranged data record.

〔実施例〕〔Example〕

次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の実施例のブロック図であり、データフ
ァイル7内のデータレコード格納域9上にデータレコー
ドを格納する時に、その格納するデータレコードに対し
てレコード通番を割当てるレコード通番採番手段1と、
レコード通番採番手段1により割当てられたレコード通
番をデータレコードに付加しデータファイル7内のデー
タレコード格納域9に格納するデータレコード格納手段
2と、レコード通番採番手段1によってデータレコード
に割当てられたレコード通番とデータレコード格納手段
2によって格納されたデータレコードに対するデータフ
ァイル7内のデータレコード格納域9上の格納アドレス
との対応情報をアドレス変換情報としてデータファイル
′フ内のアドレス変換情報格納域8に格納するアドレス
変換情報格納手段3と、データレコード格納手段2によ
って格納されたデータレコード内のデータ値をキー値と
し、レコード通番採番手段lによってデータレコードに
対して割当てられたレコード通番をデータレコードを指
すためのポインタ情報とするインデックスレコードを生
成し、インデックスファイル5内のインデックスレコー
ド格納域6に格納するインデックスレコード格納手段4
と、インデックスレコード格納手段4によって格納され
たインデックスレコードを指定されたキー値により検索
し、指定されたキー値を持つインデックスレコードのポ
インタ情報部からレコード通番を得るインデックス検索
手段lOと、インデックス検索手段10によって得たレ
コード通番を、アドレス変換情報格納手段3によってデ
ータファイル7内のアドレス変換情報格納域8に格納さ
れていたアドレス変換情報により、データレコードのデ
ータファイル7内のデータレコード格納域9上の格納ア
ドレスに変換するアドレス変換手段11と、アドレス変
換手段llによって変換されたデータレコードのデータ
ファイル7内のデータレコード格納域9上の格納アドレ
スによりデータレコードを読込むデータレコード読込み
手段12と、データファイル7に対して再編成、再構成
等の処理によりデータレコードのデータファイル7のデ
ータレコード格納域9内における格納位置の変更が必要
となった場合にデータレコードを再配置するデータレコ
ード再配置手段14と、データレコード再配置手段14
によって再配置されたデータレコードに割当てられてい
るレコード通番に対するアドレス変換情報を再配置後の
データレコードの格納アドレスに変更するアドレス変換
情報変更手段13とから構成されている。
FIG. 1 is a block diagram of an embodiment of the present invention, in which a record serial number is assigned to a data record to be stored when a data record is stored in a data record storage area 9 in a data file 7. Means 1 and
A data record storage means 2 adds a record serial number assigned by the record serial number assigning means 1 to a data record and stores it in a data record storage area 9 in a data file 7; The address conversion information storage area in the data file 'f is set as address conversion information, which corresponds to the record serial number stored by the data record storage means 2 and the storage address in the data record storage area 9 in the data file 7 for the data record stored by the data record storage means 2. The key value is the data value in the data record stored by the address conversion information storage means 3 stored in the address conversion information storage means 8 and the data record storage means 2, and the record serial number assigned to the data record by the record serial number assignment means l is used as the key value. Index record storage means 4 that generates an index record as pointer information for pointing to a data record and stores it in an index record storage area 6 in the index file 5
, an index search means lO that searches the index record stored by the index record storage means 4 using a specified key value, and obtains a record serial number from the pointer information section of the index record having the specified key value; The record sequence number obtained in step 10 is stored in the data record storage area 9 of the data file 7 of the data record by the address conversion information storage means 3 using the address conversion information stored in the address conversion information storage area 8 of the data file 7. an address conversion means 11 for converting the data record into a storage address of , and a data record reading means 12 for reading the data record according to the storage address on the data record storage area 9 in the data file 7 of the data record converted by the address conversion means ll; Data record relocation for relocating data records when it is necessary to change the storage position of the data record in the data record storage area 9 of the data file 7 due to processing such as reorganization or reconfiguration for the data file 7 means 14 and data record relocation means 14
and address conversion information changing means 13 for changing the address conversion information for the record serial number assigned to the rearranged data record by the rearrangement to the storage address of the rearranged data record.

第2図は、インデックスファイル5内のインデックスレ
コード格納域6とデータファイル7内のアドレス変換情
報格納域8とデータレコード格納域9との内容例を表し
た図である。
FIG. 2 is a diagram showing an example of the contents of the index record storage area 6 in the index file 5, the address translation information storage area 8 and the data record storage area 9 in the data file 7.

第3図は、第2図の状態のデータファイル7内のデータ
レコード格納域9に、新たなデータレコードDKを格納
した後のアドレス変換情報格納域8とデータレコード格
納域9とインデックスファイル5内のインデックスレコ
ード格納域6の内容例を表した図であり、上記データレ
コードDKの格納により、キー値kkとポインタ情報と
してのレコード通番nkとを持つインデックスレコード
TKがインデックスファイル5内に追加され、レコード
通番nkに対応してアドレスkがアドレス変換情報格納
域8に追加されている状態を示している。
FIG. 3 shows the address conversion information storage area 8, data record storage area 9, and index file 5 after a new data record DK is stored in the data record storage area 9 of the data file 7 in the state shown in FIG. is a diagram showing an example of the contents of the index record storage area 6, and by storing the data record DK, an index record TK having a key value kk and a record serial number nk as pointer information is added to the index file 5, A state in which an address k is added to the address conversion information storage area 8 in correspondence with a record serial number nk is shown.

第4図は、第3図のようにデータファイル7内のデータ
レコード格納域9に格納されていたデータレコードDJ
がアドレスjからアドレスXに再配置されたときの状態
を示し、アドレス変換情報格納域8内のレコード通番n
jに対応するアドレスjがアドレスXに更新されている
状態を表している。
FIG. 4 shows the data record DJ stored in the data record storage area 9 in the data file 7 as shown in FIG.
indicates the state when is relocated from address j to address
This shows a state where address j corresponding to j has been updated to address X.

次に、第2図に示す状態のデータファイル7に対してデ
ータレコードDKを格納したことにより、第3図の状態
になる例を参照して、本実施例における新たなデータレ
コードの格納処理について説明する。
Next, with reference to an example in which the data record DK is stored in the data file 7 in the state shown in FIG. 2, the state shown in FIG. explain.

第2図の状態のアドレス変換情報格納域8には、レコー
ド通番ni、nj順に格納アドレスi、jが並んでおり
、最大のレコード通番はレコード通番njである。デー
タレコード格納域9には、データレコードDIとデータ
レコードDJとがそれぞれアドレスiおよびアドレスj
に格納されている。インデックスレコード格納域6には
、データレコードDIのデータ値diをキー値kiとし
、ポインタ情報部にレコード通番niを格納したインデ
ックスレコードTIと、データレコードDJのデータ値
djをキー値kjとし、ポインタ情報部にレコード通番
njを格納したインデックスレコードIJが格納されて
いる。
In the address conversion information storage area 8 in the state shown in FIG. 2, storage addresses i and j are lined up in the order of record serial numbers ni and nj, and the largest record serial number is record serial number nj. In the data record storage area 9, a data record DI and a data record DJ are stored at addresses i and j, respectively.
is stored in. In the index record storage area 6, there is an index record TI in which the data value di of the data record DI is set as the key value ki and the record serial number ni is stored in the pointer information field, and the data value dj of the data record DJ is set as the key value kj, and the pointer An index record IJ storing a record serial number nj is stored in the information section.

このような第2図の状態のデータファイル7に対してデ
ータレコードDKを新規に格納する場合、格納するデー
タレコードDKに対してレコード通番を割当てるために
レコード通番採番手段1は、データファイル7内のアド
レス変換情報格納域8から最大のレコード通番njを知
り、そのレコード通番njに1を加えることにより格納
するデータレコードDKに対してレコード通番nkを割
当てる。
When a new data record DK is to be stored in the data file 7 in the state shown in FIG. The maximum record sequence number nj is known from the address conversion information storage area 8 in the address conversion information storage area 8, and by adding 1 to the record sequence number nj, the record sequence number nk is assigned to the data record DK to be stored.

次にデータレコード格納手段2によりデータレコードD
K内のレコード通番としてレコード通番採番手段1によ
り割当てられたレコード通番nkを付加し、データファ
イル7内のデータレコード格納域9に第3図の如く格納
する。このときのデータファイル7上の格納アドレスは
kである。
Next, data record D is stored by data record storage means 2.
The record serial number nk assigned by the record serial number assigning means 1 is added as the record serial number in K, and is stored in the data record storage area 9 in the data file 7 as shown in FIG. The storage address on the data file 7 at this time is k.

次にアドレス変換情報格納手段3は、データレコードD
Kに対するレコード通番nkとデータファイル7上の格
納アドレスにとの対応情報をアドレス変換情報としてデ
ータファイル7内のアドレス変換情報格納域8に第3図
の如く格納する。このとき、レコード通番kが最大レコ
ード通番となる。
Next, the address conversion information storage means 3 stores the data record D.
The correspondence information between the record serial number nk for K and the storage address on the data file 7 is stored as address conversion information in the address conversion information storage area 8 in the data file 7 as shown in FIG. At this time, the record sequence number k becomes the maximum record sequence number.

次にインデックスレコード格納手段4は、格納されたデ
ータレコードDK内のデータ値dkをキー(直kkとし
、レコード通番採番手段1によりデータレコードDKに
対して割当てられたレコード通番nkをポインタ情報と
するインデックスレコード!Kを、第3図の如くインデ
ックスファイル5内のインデックスレコード格納域6に
格納する。
Next, the index record storage means 4 uses the data value dk in the stored data record DK as a key (directly kk), and uses the record serial number nk assigned to the data record DK by the record serial number assigning means 1 as pointer information. The index record !K is stored in the index record storage area 6 in the index file 5 as shown in FIG.

これで、新たなデータレコードDKの格納処理が完了す
る。
This completes the storage process of the new data record DK.

次に、第3図の状態のデータファイル7およびインデッ
クスファイル5に対して、例えばキー値rk jJが検
索用キーとして与えられた場合を例にして、本実施例に
おける検索処理について説明する。
Next, the search processing in this embodiment will be described using, for example, a case where the key value rk jJ is given as a search key to the data file 7 and index file 5 in the state shown in FIG. 3.

インデックス検索手段10は、指定されたキー値である
rk jJを用いてインデックスファイル5内のインデ
ックスレコード格納域6に格納されているインデックス
レコードを検索し、キー値であるrk jJに対応する
インデックスレコードIJを得て、インデックスレコー
ドIJのポインタ情報部からレコード通番njを得る。
The index search means 10 searches the index records stored in the index record storage area 6 in the index file 5 using the specified key value rk jJ, and searches for the index record corresponding to the key value rk jJ. IJ is obtained, and a record serial number nj is obtained from the pointer information section of index record IJ.

次にアドレス変換手段11は、インデックス検索手段l
Oによって得られたレコード通番njを、データファイ
ル7内のアドレス変換情報格納域8の内容を用いて、格
納アドレスjに変換する。
Next, the address conversion means 11 performs index search means l.
The record serial number nj obtained by O is converted into a storage address j using the contents of the address conversion information storage area 8 in the data file 7.

そして、データレコード読込み手段12は、アドレス変
換手段11によって変換された格納アドレスJを用いて
、データファイル7内のデータレコード格納域9からデ
ータレコードDJを読込む。
Then, the data record reading means 12 reads the data record DJ from the data record storage area 9 in the data file 7 using the storage address J converted by the address conversion means 11.

次に、再編成、再構成等により、第3図のデータレコー
ドDJに対する再配置が行なわれることにより、第4図
のような状態になる例を参照して、本実施例における再
配置時の処理について説明する。
Next, referring to an example in which the data record DJ in FIG. 3 is relocated due to reorganization, reconfiguration, etc., the state as shown in FIG. The process will be explained.

データレコード再配置手段14は、データファイル7内
のデータレコード格納域9のアドレスjに格納されてい
るデータレコードDJを第4図の如く新しい格納アドレ
スrxJに再配置し、アドレス変換情報を変更するため
にアドレス変換情報変更手段13を起動する。
The data record relocation means 14 relocates the data record DJ stored at address j of the data record storage area 9 in the data file 7 to a new storage address rxJ as shown in FIG. 4, and changes the address conversion information. Therefore, the address translation information changing means 13 is activated.

アドレス変換情報変更手段13は、データレコーFDJ
内のレコード通番njを得て、データファイル7内のア
ドレス変換情報格納域8のレコード通番njに対応する
格納アドレスをアドレスjからアドレスXに変更する。
The address conversion information changing means 13 is a data record FDJ.
The storage address corresponding to the record sequence number nj in the address conversion information storage area 8 in the data file 7 is changed from address j to address X.

このとき、インデックスレコードIJ内のポインタ情報
部のレコード通番njを変更する必要はない。
At this time, there is no need to change the record serial number nj in the pointer information section in the index record IJ.

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

以上説明したように、本発明は、データファイル上に格
納されているデータレコードの格納アドレスを直接ポイ
ンタ情報として用いないでデータレコードの格納順にレ
コード通番を採番し、そのレコード通番と格納アドレス
との対応情報をアドレス変換情報として持ち、そのレコ
ード通番をインデックスレコードからデータレコードを
指すためのポインタ情軸としてインデックスレコード内
のポインタ情報部に格納することによって、再編成、再
構成等の処理により、データファイル内の全て或いは一
部のデータレコードに対してデータファイル内の格納位
置を変える必要が発生した場合でも、その再配置される
データレコードに対応するアドレス変換情作を変更すれ
ば済み、インデックスファイル内のインデックスレコー
ドのポインタ情報部を変更する必要がなくなる。従って
、一つのデータファイルに対して複数のインデックスが
存在するファイルシステムにおいて、再編成。
As explained above, the present invention assigns record serial numbers in the order in which data records are stored, without directly using the storage addresses of data records stored on a data file as pointer information, and then combines the record serial numbers and storage addresses. By having the corresponding information as address conversion information and storing the record serial number in the pointer information section of the index record as a pointer information axis for pointing from the index record to the data record, processing such as reorganization and reconfiguration, Even if it becomes necessary to change the storage location in the data file for all or part of the data records in the data file, all you need to do is change the address conversion information corresponding to the data record to be relocated, and the index There is no need to change the pointer information part of the index record in the file. Therefore, in a file system where multiple indexes exist for one data file, reorganization is possible.

再構成等によりデータレコードのデータファイル内の再
配置を行なった場合に特に効果を発揮する。
This is particularly effective when data records are rearranged within a data file due to reconfiguration or the like.

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

第1図は本発明の実施例のブロック図、第2図乃至第4
図は本発明の実施例の動作説明図および、 第5図は従来方式の説明図である。 図において、 ■・・・レコード通番採番手段 2・・・データレコード格納手段 3・・・アドレス変換情報格納手段 4・・・インデックスレコード格納手段5・・・インデ
ックスファイル 6・・・インデックスレコード格納域 7・・・データファイル 8・・・アドレス変換情報格納域 9・・・データレコード格納域 lO・・・インデックス検索手段 11・・・アドレス変換手段 12・・・データレコード読込み手段 13・・・アドレス変換情報変更手段 14・・・データレコード再配置手段
FIG. 1 is a block diagram of an embodiment of the present invention, and FIGS.
The figure is an explanatory diagram of the operation of the embodiment of the present invention, and FIG. 5 is an explanatory diagram of the conventional system. In the figure, ■...Record serial numbering means 2...Data record storage means 3...Address conversion information storage means 4...Index record storage means 5...Index file 6...Index record storage Area 7...Data file 8...Address conversion information storage area 9...Data record storage area IO...Index search means 11...Address conversion means 12...Data record reading means 13... Address conversion information changing means 14...data record relocation means

Claims (1)

【特許請求の範囲】 データファイル上にデータレコードを格納し、該データ
レコード内のデータ値をキー値として持つインデックス
レコードをインデックスファイル上に格納し、インデッ
クスレコードを指定されたキー値により検索して得たポ
インタ情報に従ってデータレコードを読込むデータ格納
検索方式において、 データファイルに格納するデータレコードに割当てるレ
コード通番を採番するレコード通番採番手段と、 該レコード通番採番手段によって前記データレコードに
割当てられたレコード通番を前記データレコードに付加
しデータファイル内のデータレコード格納域に格納する
データレコード格納手段と、前記レコード通番採番手段
によって前記データレコードに割当てられたレコード通
番と前記データレコード格納手段によって格納された前
記データレコードのデータファイル上の格納アドレスと
の対応情報をアドレス変換情報としてデータファイル内
のアドレス変換情報格納域に格納するアドレス変換情報
格納手段と、 前記データレコード格納手段によって格納された前記デ
ータレコード内のデータ値をキー値とし、前記レコード
通番採番手段によって前記データレコードに割当てられ
たレコード通番を前記データレコードを指すためのポイ
ンタ情報とするインデックスレコードを生成し、インデ
ックスファイル内のインデックスレコード格納域に格納
するインデックスレコード格納手段と、 該インデックスレコード格納手段によって格納されたイ
ンデックスレコードを指定されたキー値により検索し、
指定されたキー値に対応するインデックスレコードのポ
インタ情報からレコード通番を得るインデックス検索手
段と、 該インデックス検索手段によって得たレコード通番を、
前記アドレス変換情報を用いてデータレコードのデータ
ファイル上の格納アドレスに変換するアドレス変換手段
と、 該アドレス変換手段によって変換されたデータレコード
のデータファイル上の格納アドレスによりデータレコー
ドを読込むデータレコード読込み手段とを含むことを特
徴とするデータ格納検索方式。
[Claims] A data record is stored on a data file, an index record having a data value in the data record as a key value is stored on the index file, and the index record is searched using a specified key value. In a data storage and retrieval method in which data records are read according to obtained pointer information, a record serial number assigning means assigns a record serial number to be assigned to a data record stored in a data file; data record storage means for adding a record serial number assigned to the data record to the data record and storing it in a data record storage area in a data file; and a record serial number assigned to the data record by the record serial number assigning means and the data record storage means. address conversion information storage means for storing, as address conversion information, correspondence information between the data record stored in the data file and the storage address on the data file in an address conversion information storage area in the data file; generates an index record that uses the data value in the data record as a key value and uses the record sequence number assigned to the data record by the record sequence numbering means as pointer information for pointing to the data record, and an index record storage means for storing in an index record storage area; searching an index record stored by the index record storage means using a specified key value;
an index search means for obtaining a record sequence number from pointer information of an index record corresponding to a specified key value; and a record sequence number obtained by the index search means;
an address conversion means for converting a data record into a storage address on a data file using the address conversion information; and a data record read for reading a data record using the storage address on the data file of the data record converted by the address conversion means. A data storage and retrieval method characterized by comprising means.
JP62298240A 1987-11-26 1987-11-26 Data storage retrieving system Pending JPH01140228A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62298240A JPH01140228A (en) 1987-11-26 1987-11-26 Data storage retrieving system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62298240A JPH01140228A (en) 1987-11-26 1987-11-26 Data storage retrieving system

Publications (1)

Publication Number Publication Date
JPH01140228A true JPH01140228A (en) 1989-06-01

Family

ID=17857049

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62298240A Pending JPH01140228A (en) 1987-11-26 1987-11-26 Data storage retrieving system

Country Status (1)

Country Link
JP (1) JPH01140228A (en)

Similar Documents

Publication Publication Date Title
EP0124097B1 (en) Method for storing and retrieving data in a data base
CN101315628B (en) Internal memory database system and method and device for implementing internal memory data base
US5293616A (en) Method and apparatus for representing and interrogating an index in a digital memory
US4086628A (en) Directory generation system having efficiency increase with sorted input
EA006640B1 (en) Method of navigating database
RU2005105582A (en) DATABASE AND KNOWLEDGE MANAGEMENT SYSTEM
JPS63116232A (en) Method of memorizing and retrieving data using computer
JPS6115246A (en) Compression of data for memory
JPH08129551A (en) Hash system
JPH01140228A (en) Data storage retrieving system
JP2007048318A (en) Relational database processing method and relational database processor
JP2972548B2 (en) File management method
JPH0962697A (en) Merchandise code retrieving system
EP0394172A2 (en) Method of performing file services given partial file names
JPH09330322A (en) Data retrieval device
JPH07152623A (en) File system and its access method
KR100577516B1 (en) Method of construct codes support to electronic documents on the ISO9735 syntax rules
JP2643850B2 (en) File processing device
JPH05151060A (en) Lock control system using key value
JPH0451362A (en) Index retrieval processing system
JPH04354036A (en) Data base management method
JPH0833899B2 (en) Index update method
JP2000076106A (en) Management method for indexed sequential file
JPH01258125A (en) Key sequential retrieving system for record
JPH04138565A (en) Connection processing system of plural files