JPH0660120A - Variable length data storage method and retrieval device - Google Patents

Variable length data storage method and retrieval device

Info

Publication number
JPH0660120A
JPH0660120A JP4231473A JP23147392A JPH0660120A JP H0660120 A JPH0660120 A JP H0660120A JP 4231473 A JP4231473 A JP 4231473A JP 23147392 A JP23147392 A JP 23147392A JP H0660120 A JPH0660120 A JP H0660120A
Authority
JP
Japan
Prior art keywords
file
data
item
variable
length
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
JP4231473A
Other languages
Japanese (ja)
Inventor
Atsushi Sakamoto
篤 坂本
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP4231473A priority Critical patent/JPH0660120A/en
Publication of JPH0660120A publication Critical patent/JPH0660120A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To reduce the retrieval time considerably by generating an auxiliary file group storing retrieval information or index information. CONSTITUTION:An external storage device 1 stores various files in a database and a central processing unit 2 references each file in the external storage device 1 to retrieve required information actually. A terminal equipment 3 informs the result of retrieval to the user and uses a printer 4 to print out the result of retrieval. Variable length data stored in the external storage device 1 and data files being text files in which variable length data is processed as a format as an auxiliary file groups for the retrieval, an index information file corresponding one to one to the data file, a retrieval information file not always corresponding one to one to the data file and a data base definition file are provided.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、可変長データの格納方
法及び検索装置に関し、より詳細には、書式化されたテ
キストファイルをデータファイルとして利用するデータ
の格納方法及び検索装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of storing variable length data and a search device, and more particularly to a method of storing data and a search device that uses a formatted text file as a data file.

【0002】[0002]

【従来の技術】可変長データを取り扱うデータの格納方
法及び検索装置として挙げる第1の従来例を図29に示
す。図29において、191は、データ数と項目数と各
項目の項目長と項目名からなるデータベースの形式を定
義する項目定義ファイル、192は、実際のデータを格
納するデータファイルである。図29においては、可変
長データの最大長を項目長とする固定長データ領域をデ
ータファイルに確保することで、疑似的に可変長データ
を扱えるようになる。しかし、この方法においては、常
に可変長データの最大長の大きさの記憶領域が確保され
るために、記憶領域に無駄が生じるという問題点と、項
目長を保持するために、多くの場合には255バイト=
127文字という項目長の制限が存在し、それ以上の長
さの可変長データを格納することができないという問題
点がある。
2. Description of the Related Art FIG. 29 shows a first conventional example as a data storage method and a retrieval device for handling variable length data. In FIG. 29, 191 is an item definition file that defines the format of a database that includes the number of data items, the number of items, the item length of each item, and the item name, and 192 is a data file that stores actual data. In FIG. 29, by allocating a fixed-length data area having the maximum length of variable-length data as the item length in the data file, pseudo-variable-length data can be handled. However, in this method, the storage area of the maximum length of the variable-length data is always secured, which causes waste of the storage area, and in many cases in order to retain the item length, Is 255 bytes =
There is a limitation in the item length of 127 characters, and there is a problem that variable length data having a length longer than that cannot be stored.

【0003】図29に示す従来例の問題点を回避した例
(特開昭59−90142号公報の変形例)を第2の従
来例として図30に示す。図30において、201,2
02は図29同様の形式を持つ項目定義ファイルとデー
タファイルであるが、項目長が、例えば0である場合に
は、その項は可変長データとして特殊な扱いをするもの
とする。この例においては、項目xのみが可変長データ
である。203は、可変長データを格納する可変長デー
タ格納ファイルである。図30において、項目xが参照
された場合、その項目長が0であるので、可変長データ
であると認識される。その場合、データファイル202
の項目xには、可変長データ格納ファイル203中の対
応する可変長データの先頭位置が格納されているので、
それを元に可変長データ格納ファイル203より実際の
データが取り出される。
FIG. 30 shows a second conventional example in which the problem of the conventional example shown in FIG. 29 is avoided (a modified example of Japanese Patent Laid-Open No. 59-90142). In FIG. 30, 201,2
Reference numeral 02 denotes an item definition file and a data file having the same format as in FIG. 29. However, when the item length is 0, the item is treated specially as variable length data. In this example, only item x is variable length data. A variable-length data storage file 203 stores variable-length data. In FIG. 30, when the item x is referred to, the item length is 0, so it is recognized as variable length data. In that case, the data file 202
Since the head position of the corresponding variable length data in the variable length data storage file 203 is stored in the item x of
Based on this, actual data is taken out from the variable length data storage file 203.

【0004】前記第1の従来例及び第2の従来例に共通
している点は、可変長データをあたかも固定長データと
して扱うという点であり、その目的は各データ各項目の
記憶領域中での位置を、下記(1)式により求められる
ように単純化することであるといえる。 [データ全体の先頭番地]+[一件のデータの大きさ]×[データの番号]+ [項目番号までの大きさ] …(1)
The point common to the first and second conventional examples is that variable-length data is treated as if it were fixed-length data, and its purpose is in the storage area of each item of each data. It can be said that the position of is simplified as obtained by the following equation (1). [Start address of all data] + [Size of one data] x [Data number] + [Size up to item number] (1)

【0005】一方、別の手法で可変長データの検索を行
う例として、一般に「ストリームエディタ」と呼ばれ
る、SEDあるいはAWKの様な動作制御の可能なフィ
ルタプログラムを用いる例を図31に示す。図31にお
いて、211はユーザの設定する検索条件を格納する検
索式記述ファイル、212は検索式記述ファイル211
より変換される検索スクリプト、213は検索式記述フ
ァイル211を検索スクリプト212に変換するストリ
ームエディタA、214は検索式記述ファイル211よ
り検索スクリプト212への変換動作を記述した検索式
変換スクリプト、215は可変長データの集合体である
データファイル、216は検索結果、217はデータフ
ァイル215より検索スクリプト214に従って216
を検索するストリームエディタBである。なお、ストリ
ームエディタA213とストリームエディタB217が
同一のプログラムである場合も考えられる。
On the other hand, as an example of searching variable length data by another method, FIG. 31 shows an example of using a filter program which is generally called "stream editor" and capable of operation control such as SED or AWK. In FIG. 31, 211 is a search formula description file that stores search conditions set by the user, and 212 is a search formula description file 211.
A search script to be converted by 213 is a stream editor A that converts the search expression description file 211 into a search script 212. A search expression conversion script 215 describes conversion operation from the search expression description file 211 to the search script 212. A data file that is a collection of variable-length data, 216 is a search result, and 217 is a data file 215 from the data file 215 according to the search script 214
Is a stream editor B for searching. The stream editor A 213 and the stream editor B 217 may be the same program.

【0006】第3の従来例においては、前述した第1の
従来例及び第2の従来例に比較して、データの新規作
成,追加,更新,消除,閲覧,出力のために特別なプロ
グラムを用意する必要がなく、データ検索方法及び装置
の構築の負担が軽減されると同時に、利用者側において
も、データの編集あるいはデータベースの定義の変更の
ために使用するプログラムは、ユーザがふだん使いなれ
ているテキストエディタのみでよく、新しいデータの編
集装置の操作法を憶える必要がないという利点がある。
In the third conventional example, as compared with the first conventional example and the second conventional example described above, a special program for newly creating, adding, updating, deleting, browsing and outputting data is provided. Since there is no need to prepare it, the data retrieval method and the burden of building the device are reduced, and at the same time, the user does not have to use the program used to edit the data or change the definition of the database. It has the advantage that it does not need to remember the operation method of the new data editing device, since it only requires a text editor.

【0007】[0007]

【発明が解決しようとする課題】前述のように、従来の
可変長データを取り扱うデータの格納方法及び検索装置
においては、以下のような問題点がある。すなわち、第
1及び第2の従来例においては、先にも述べたように、
データの新規作成,追加,更新,削除,閲覧,出力のた
めに、それぞれ特別なプログラムを用意する必要があ
り、利用者が新しいデータの編集及び検索装置の操作法
を憶える必要があるという問題点がある。また、第3の
従来例においては、前述したフィルタプログラムの基本
的な動作が、検索しようとするテキストファイルを先頭
から順次走査する動作であるために、検索対象項目に関
するテキストファイルの部分以外の本来検索する必要の
無い他の項目以外の部分も検索するために、検索時間が
かかるという問題点、及びデータ自体を複製するため
に、データを記憶する図示しない外部記憶装置の記憶領
域を圧迫し、なおかつ元のデータ/複製されたデータに
対する更新事項が複製されたデータ/元のデータに反映
されないという問題点がある。
As described above, the conventional data storage method and search device for handling variable-length data have the following problems. That is, in the first and second conventional examples, as described above,
The problem is that it is necessary to prepare a special program for each of new creation, addition, update, deletion, browsing, and output of data, and the user needs to remember how to edit new data and operate the search device. There is. Further, in the third conventional example, since the basic operation of the above-described filter program is the operation of sequentially scanning the text file to be searched from the beginning, the original operation other than the part of the text file related to the search target item is originally performed. In order to search for a part other than other items that do not need to be searched, it takes a long time to search, and in order to copy the data itself, the storage area of an external storage device (not shown) that stores the data is compressed. In addition, there is a problem that the updated matter for the original data / the duplicated data is not reflected in the duplicated data / the original data.

【0008】本発明は、このような実情に鑑みてなされ
たもので、可変長データを含むテキストファイルよりデ
ータ形式の定義情報に従って、索引情報あるいは検索情
報を保持する補助ファイル群を予め生成することで、検
索時間の大幅な短縮を図ること、それと同時に、補助フ
ァイルの使用による弊害の1つである保守性の悪さを可
能な限り回避し、その結果として、利用者の使い勝手の
向上を図るようにした可変長データの格納方法及び検索
装置を提供することを目的としている。
The present invention has been made in view of the above circumstances, and preliminarily generates an auxiliary file group holding index information or search information from a text file containing variable-length data according to definition information of a data format. In this way, the search time should be greatly shortened, and at the same time, the poor maintainability, which is one of the harmful effects of using auxiliary files, should be avoided as much as possible, and as a result, the usability of the user should be improved. It is an object of the present invention to provide a variable length data storage method and a search device.

【0009】[0009]

【課題を解決するための手段】本発明は、上記目的を達
成するために、(1)複数の可変長項目の集合体である
可変長データを格納する少なくとも1つのデータファイ
ルと、該データファイルと1対1の対応関係を持ち、各
データの各項目のファイル中の位置情報を保持する索引
情報ファイルと、可変長データの存在場所を示す検索情
報を保持する少なくとも1つの検索情報ファイルと、デ
ータの項目の定義を含むデータベースの定義を保持する
1つのデータベース定義ファイルと、データベースの検
索,出力手段であって、前記可変長項目が、可変長項目
本体と、該可変長項目本体の直前に位置し、該可変長項
目本体の属性を規定する項目識別子と、前記可変長項目
本体の直後に位置し、該可変長項目本体の終了位置を規
定する項目終了識別子より構成され、前記可変長項目を
構成する個々の文字が通常のテキストファイルにみられ
る文字であること、更には、(2)前記可変長項目の構
成に加えて、データファイルの先頭あるいは末尾あるい
は各項目の項目終了識別子と項目識別子の間に位置する
検索の対象とならない不定長の付属データを含むこと、
更には、(3)前記(1)又は(2)において、前記索
引情報ファイルは、データファイル中の各項目の位置情
報に加えて、各データのファイル中での行番号であるフ
ァイル先頭からの改行コードの数を保持すること、更に
は、(4)前記(1),(2)又は(3)において、前
記検索情報ファイルは、各データファイル及び索引情報
ファイルと1対1に対応するデータ集合ファイルと、登
録されている全データの情報を保持する母集合ファイル
と、主要な検索テーマに応じて設定される不特定多数の
中間集合ファイルと、ユーザの問い合わせにつれて生
成,消滅をするユーザ集合ファイルからなること、更に
は、(5)前記(1)〜(4)のいずれかにおいて、前
記データベース定義ファイルは、データの項目の定義に
加えて、母集合ファイルより前記中間集合ファイルを生
成する中間集合生成式を保持すること、或いは、(6)
複数の可変長項目の集合体である可変長データを格納す
る少なくとも1つのデータファイルと、前記データファ
イルと1対1の対応関係を持ち、各データの各項目のフ
ァイル中の位置情報を保持する索引情報ファイルと、可
変長データの存在場所を示す検索情報を保持する少なく
とも1つの検索情報ファイルと、データの項目の定義を
含むデータベースの定義を保持する1つのデータベース
定義ファイルとからなるファイル群を格納する外部記憶
装置と、検索動作を行う中央処理装置と、ユーザからの
質問を受け付けあるいは回答を出力する端末より構成さ
れる可変長データの検索装置において、前記中央処理装
置内に規定の書式に整形されたテキストファイルから対
応する索引情報ファイルと検索集合ファイルを生成する
補助ファイル生成手段を備えること、更には、(7)前
記(6)において、前記補助ファイル生成手段に加え
て、母集合ファイルを更新する母集合ファイル更新手段
を備えること、更には、(8)前記(6)又は(7)に
おいて、前記データベース定義ファイルの中間集合生成
式に従い、中間集合より中間集合ファイルを更新する中
間集合更新手段を備えること、更には、(9)前記
(6),(7)又は(8)において、前記検索情報ファ
イル中の任意のデータに関する情報をもとに、対応する
データファイル中の可変長データの更新を行い、さらに
更新されたデータファイルより索引情報ファイルを再構
成するデータファイル更新手段を備えること、更には、
(10)前記(6)〜(9)のいずれかにおいて、前記
データベース定義ファイルを更新し、更新されたデータ
ベース定義ファイルより索引情報ファイルを再構成する
データベース定義更新手段を備えることを特徴とするも
のである。
In order to achieve the above object, the present invention provides (1) at least one data file for storing variable-length data, which is an aggregate of a plurality of variable-length items, and the data file An index information file having a one-to-one correspondence with the position information of each item of each data in the file, and at least one search information file holding search information indicating the location of the variable length data, One database definition file that holds the definition of the database including the definition of the item of data, and a database search and output means, wherein the variable-length item is a variable-length item body and immediately before the variable-length item body. And an item identifier that defines the attribute of the variable-length item body and an item end identifier that is located immediately after the variable-length item body and that defines the end position of the variable-length item body. Each character that is composed of children and that constitutes the variable length item is a character found in a normal text file, and (2) In addition to the configuration of the variable length item, the beginning or end of the data file Alternatively, include ancillary data of indefinite length located between the item end identifier of each item and the item identifier,
Furthermore, (3) In the above (1) or (2), the index information file includes, in addition to the position information of each item in the data file, the index number from the beginning of the file, which is the line number of each data in the file. Retaining the number of line feed codes, and further, (4) In (1), (2) or (3) above, the search information file corresponds to each data file and index information file in a one-to-one correspondence. A set file, a mother set file that holds information of all registered data, an unspecified number of intermediate set files that are set according to the main search themes, and a user set that is created and deleted according to the user's inquiry (5) In any one of the above (1) to (4), the database definition file includes a definition of a data item and a population file. Holding an intermediate set generation expression for generating the intermediate set file from the file, or (6)
At least one data file storing variable-length data, which is an aggregate of a plurality of variable-length items, has a one-to-one correspondence relationship with the data file, and holds position information in the file of each item of each data. A file group consisting of an index information file, at least one search information file that holds search information indicating the location of variable-length data, and one database definition file that holds the definition of the database that contains the definition of the data item A variable-length data search device comprising an external storage device for storing, a central processing unit for performing a search operation, and a terminal for accepting a question from a user or outputting an answer, in a format specified in the central processing unit. Auxiliary file generation that generates the corresponding index information file and search set file from the formatted text file (7) In (7) above, in addition to the auxiliary file generating means, a population set file updating means for updating the population file is provided, and (8) above (6) ) Or (7), an intermediate set update means for updating the intermediate set file from the intermediate set according to the intermediate set generation formula of the database definition file is provided, and (9) the above (6), (7) or In (8), the variable length data in the corresponding data file is updated based on the information about the arbitrary data in the search information file, and the index information file is reconstructed from the updated data file. A file updating means, and further,
(10) In any one of the above (6) to (9), a database definition updating means for updating the database definition file and reconstructing an index information file from the updated database definition file is provided. Is.

【0010】[0010]

【作用】可変長データを格納するデータファイルより、
各項目の索引情報を予め抽出しておくことで、検索対象
のデータを直接取り出すことができる。また、各データ
及びその索引情報と検索情報を分離して管理することに
より、母集合,中間集合,データ集合,ユーザ集合を同
一のプログラムで生成,編集,消滅の処理をすることが
できる一方、データベースの定義が変更された場合で
も、索引情報の再構築のみでデータベースの再使用が可
能となる。また、データベース定義ファイルに中間集合
ファイルの検索式を保持するようにしたので、データの
登録時に中間集合ファイルを自動的に更新することが可
能になる。さらに、索引情報ファイルに各データの行番
号を保持するようにしたので、データの更新時に迅先に
目的データを呼び出すことができる。
[Operation] From the data file that stores the variable length data,
By extracting the index information of each item in advance, it is possible to directly retrieve the search target data. Further, by separately managing each data and its index information and search information, it is possible to generate, edit, and delete a mother set, an intermediate set, a data set, and a user set with the same program. Even if the database definition is changed, the database can be reused only by rebuilding the index information. Further, since the search formula for the intermediate set file is held in the database definition file, the intermediate set file can be automatically updated when data is registered. Further, since the line number of each data is held in the index information file, the target data can be quickly called when updating the data.

【0011】[0011]

【実施例】実施例について、図面を参照して以下に説明
する。図1は、本発明による可変長データの検索装置の
一実施例を説明するための構成図で、図中、1は外部記
憶装置、2は中央処理装置、3は端末、4は印字装置で
ある。外部記憶装置1は、図2に示すデータベースの諸
ファイルを格納する。中央処理装置2は、図8に示す内
部構造を有しており、外部記憶装置1の各ファイルを参
照して実際に検索を行う。端末3は、少なくともテキス
ト画面とキーボードを備え、ユーザからの質問を受け付
け、あるいは前記中央処理装置2で行った検索結果をユ
ーザに知らせる。印字装置4は、最終的に検索結果を印
字する。
Embodiments will be described below with reference to the drawings. FIG. 1 is a block diagram for explaining an embodiment of a variable-length data retrieval device according to the present invention, in which 1 is an external storage device, 2 is a central processing unit, 3 is a terminal, and 4 is a printing device. is there. The external storage device 1 stores various files of the database shown in FIG. The central processing unit 2 has the internal structure shown in FIG. 8, and refers to each file in the external storage device 1 to actually perform a search. The terminal 3 is provided with at least a text screen and a keyboard, receives a question from the user, or informs the user of the search result performed by the central processing unit 2. The printer 4 finally prints the search result.

【0012】外部記憶装置1に格納される可変長データ
及びその検索のための補助ファイル群の構成を図2に示
す。図2において、11はk個の項目名をl(小文字の
エル)個のマクロ置換式とm個の中間ファイル生成式を
格納するデータベース定義ファイル、12は1中の全登
録データの検索情報を保持する母集合ファイル、13l
〜13nは複数の書式化されたテキストファイルである
n個のデータファイル群、14l〜14nは13l〜13n
と1対1に対応するn個の索引情報ファイル、15l〜
15nは14l〜14nと同様の対応関係を持つn個のデ
ータ集合ファイル、16l〜16nは11中の中間集合生
成式により12から導かれた中間集合ファイル、17o
〜17xはユーザの質問により生成,消滅し、検索履歴
を保持するユーザ集合ファイルである。以下、図3〜図
7を用いて前記ファイル群の構造及び「書籍データベー
ス」として実施した場合の1例を示す。
FIG. 2 shows the structure of variable-length data stored in the external storage device 1 and an auxiliary file group for searching the variable-length data. In FIG. 2, 11 is a database definition file that stores k item names, 1 (lowercase L) macro replacement expressions and m intermediate file generation expressions, and 12 is search information for all registered data in 1. Mother set file to hold, 13l
~ 13n is a group of n data files which are a plurality of formatted text files, 14l ~ 14n are 13l ~ 13n
And n index information files corresponding to one to one, 15l ~
15n is an n number of data set files having the same correspondence as 14l to 14n, 16l to 16n are intermediate set files derived from 12 by the intermediate set generation formula in 11, 17o
Reference numerals 17x to 17x are user set files that are created and deleted according to the user's question and hold the search history. Hereinafter, the structure of the file group and an example when it is implemented as a “book database” will be described with reference to FIGS. 3 to 7.

【0013】図3(a),(b)は、データベース定義
ファイルの書式(図(a))及び例(図(b))である書籍
データベース定義ファイル“SHOSEKI.RAT”である。デ
ータベース定義ファイルはテキストファイルである。例
の場合には、第1行“#RAT”が項目定義開始マーク、第
9行“#MCR”がマクロ定義開始マーク、第18行“#TD
B”が中間集合定義開始マーク、第20行“#END”が定
義終了マークとなっている。すなわち、項目数は7項
目、マクロ定義数は8、中間集合定義数は1となってい
る。
3A and 3B are a book database definition file "SHOSEKI.RAT" which is a format (FIG. 3A) and an example (FIG. 3B) of the database definition file. The database definition file is a text file. In the case of the example, the first line "#RAT" is the item definition start mark, the ninth line "#MCR" is the macro definition start mark, and the eighteenth line "#TD".
B "is the start mark of the intermediate set definition, and line 20"#END"is the end mark of the definition. That is, the number of items is 7, the number of macro definitions is 8, and the number of intermediate set definitions is 1.

【0014】図4(a),(b)は、データファイル1
3nの書式(図(a))及び例(図(b))“OHX_9205.DA
T”のダンプリスト(抜粋)である。なお、ダンプリス
トとは、表示不可能な文字コードを含むファイルの内容
を可視的に表示する場合に用いられる表示形式の代表的
なものであると同時に、ファイルに含まれる各文字の位
置を明確に記述し得る数少ない表示形式でもある。各行
の左端の8桁の英数字がファイル中の位置を16進表記
で、中間の16個の2桁の英数字が各文字の文字コード
を16進表記で、それに続く文字列の切れ端が、先の1
6文字のうち、表示可能な文字を表示した場合の文字列
を表す形式である。例においては、位置00000000(以
後、末尾4桁のみ記載)から0029までが注釈、002C〜00
3lがデータ1の項目名1、0032〜004Bがデータ1の項目
1、0050〜0055がデータ1の項目名2、0056〜005Bがデ
ータ1の項目2、(中略)、00D0〜00D5がデータ2の項目
名1、00D6〜00EFがデータ2の項目1、(以下略)を示し
ている。
4A and 4B show the data file 1
3n format (Figure (a)) and example (Figure (b)) “OHX — 9205.DA
It is a dump list (excerpt) of "T". The dump list is a typical display format used when visually displaying the contents of a file containing undisplayable character codes. It is also one of the few display formats that can clearly describe the position of each character included in the file. The leftmost 8 digits of each line are hexadecimal notation for the position in the file, and the middle 16 two-digit English characters. The number is the hexadecimal notation of the character code of each character, and the cutoff of the character string following it is the previous 1
It is a format that represents a character string when a displayable character is displayed among the 6 characters. In the example, positions 00000000 (only the last 4 digits are described) to 0029 are notes, and 002C to 00
3l is item name 1 of data 1, 0032 to 004B is item 1 of data 1, 0050 to 0055 is item name 2 of data 1, 0056 to 005B is item 2 of data 1, (omitted), 00D0 to 00D5 is data 2 Item name 1, 00D6 to 00EF indicates item 1 of data 2 (hereinafter omitted).

【0015】図5(a),(b)は、索引情報ファイル
14nの書式(図(a))及び例(図(b))“OHX_9205.
IDX”のダンプリスト(抜粋)である。例において、000
0〜0071がデータベース名照合用のデータベース定義フ
ァイル名、0081〜001Bが対応するデータファイル“OHX
_9205.DAT”中に存在するデータの総数、001C〜001F
がデータ1の項目1の位置情報、(中略)、0034〜0037が
データ1の項目7の位置情報、0038〜003Bがデータ1の
項目7の行番号、003C〜003Fがデータ2の項目1の位置
情報、(以下略)となっている。
5 (a) and 5 (b) show the format (FIG. (A)) and example (FIG. (B)) of the index information file 14n, “OHX — 9205.
IDX ”dump list (excerpt). In the example, 000
0 to 0071 is the database definition file name for database name matching, and 0081 to 001B is the corresponding data file “OHX.
_ 9205. Total number of data existing in “DAT”, 001C to 001F
Is the position information of item 1 of data 1, (Omitted), 0034 to 0037 is the position information of item 7 of data 1, 0038 to 003B is the line number of item 7 of data 1, and 003C to 003F of item 1 of data 2. It is the position information, (abbreviated below).

【0016】図6(a),(b)は、母集合ファイル1
2,データ集合ファイル15n,中間集合ファイル16
m,ユーザ集合ファイル17xとして、外部記憶装置中に
存在する検索情報ファイルの書式(図(a))及び例(図
(b))“KAGEYAMA.TDB”のダンプリストである。例に
おいて、0000〜0017がデータベース名照合用のデータベ
ース定義ファイル名、0018〜001Bが本検索情報ファイル
中に存在する情索情報の総数、001C〜0033が検索情報1
の索引情報ファイル名、0034〜0037が前記索引情報ファ
イル中でのデータ番号であり、001C〜0037で可変長デー
タの存在場所を明確に示すことが可能になる。0038〜00
4Fが検索情報2の索引情報ファイル名、0050〜0053が同
データ番号、(以下略)である。なお、検索情報3(0070
〜008B)に見られるように、複数のデータファイルにま
たがる検索情報ファイルが存在することも可能である。
FIGS. 6A and 6B show the population file 1
2, data set file 15n, intermediate set file 16
m, the format (Fig. (a)) and example (Fig.
(b)) A dump list of "KAGEYAMA.TDB". In the example, 0000 to 0017 are database definition file names for database name verification, 0018 to 001B are the total number of pieces of emotion information existing in this search information file, and 001C to 0033 are search information 1
Index information file name, 0034 to 0037 are data numbers in the index information file, and 001C to 0037 can clearly indicate the location of the variable length data. 0038 ~ 00
4F is the index information file name of the search information 2, 0050 to 0053 are the same data numbers, and are omitted below. Note that search information 3 (0070)
~ 008B), it is possible that there is a search information file that spans multiple data files.

【0017】図7(a)〜(c)は、前記図4〜図6の
もとめとして、中間集合ファイル“KAGEYAMA.TDB”の
最初の検索情報から対応する可変長データを参照するま
での様子を示したものである。図7において、矢印は参
照(検索情報ファイルから索引情報ファイルへはデータ
番号による、索引情報ファイルからデータファイルへは
位置情報による)を、白枠はデータ番号あるいは位置情
報を、黒枠は参照されるファイルの位置を示している。
7A to 7C are based on FIGS. 4 to 6 and show how the variable length data corresponding to the first search information of the intermediate set file "KAGEYAMA.TDB" is referred to. It is shown. In FIG. 7, an arrow refers to a reference (from a search information file to an index information file by a data number, from an index information file to a data file depends on position information), a white frame refers to a data number or position information, and a black frame refers to it. Shows the location of the file.

【0018】図8は、中央処理装置の内部構造を示す図
で、図中、201は中央処理装置2内部の各回路からさ
まざまなデータの1時保管用として使用される内部記憶
装置、202は各回路からの内部記憶装置201に対す
る記憶領域の要求を調停し、記憶領域の確保と開放を行
うメモリマネージャ、203は外部記憶装置1中に格納
されるファイルを読み書きするために使用される外部記
憶装置インターフェース、204は通常表記の論理式に
対してマクロ展開及び逆ポーランド変換を行う式変換回
路、205は一般に「クイックソート」として知られる
高速な整列アルゴリズムを用いて、外付けの比較回路と
整列対象の1データあたりの長さとデータ数に従って任
意データの整列を行う汎用整列回路、206は2つのI
D行の大きさを比較する汎用整列回路205の外付け比
較回路として使用されるID行比較回路、210は適正
な書式のテキストファイルより対応する索引情報ファイ
ルとデータ集合ファイルを生成する補助ファイル生成回
路、211は内部記憶装置201上のデータ集合に対し
て、そのID項目である第1項目をキーとして整列を行
う集合整列回路である。
FIG. 8 is a diagram showing the internal structure of the central processing unit. In the figure, 201 is an internal storage device used for temporary storage of various data from each circuit in the central processing unit 2, and 202 is an internal storage device. A memory manager that arbitrates a request for a storage area from each circuit to the internal storage device 201 and secures and releases the storage area. Reference numeral 203 denotes an external storage used for reading and writing a file stored in the external storage device 1. A device interface, 204 is an expression conversion circuit that performs macro expansion and inverse Polish conversion on a normal expression, and 205 uses a high-speed alignment algorithm generally known as "quick sort" to align with an external comparison circuit. A general-purpose alignment circuit that aligns arbitrary data according to the length and the number of data per target data, 206 is two I
An ID row comparison circuit used as an external comparison circuit of the general-purpose alignment circuit 205 for comparing the size of D rows, and 210 is an auxiliary file generation for generating a corresponding index information file and a data set file from a text file of a proper format. A circuit 211 is a set alignment circuit that performs alignment on the data set on the internal storage device 201 using the first item, which is its ID item, as a key.

【0019】また、212は指定されたデータ集合ファ
イルより母集合ファイルと中間集合ファイルを更新する
集合ファイル更新回路、213は内部記憶装置201上
のデータ集合及び式変換回路204により変換処理の済
んだキーワード検索式よりキーワード検索を行い、内部
記憶装置201上の第2のデータ集合に結果を残すキー
ワード検索回路、214〜216は内部記憶装置201
上の第1及び第2のデータ集合の論理和/論理積/論理
否定を求め、第3のデータ集合にその結果を残す集合間
論理(和/積/否定)回路、217はユーザの入力した
録理式に従って集合間演算を行う集合間演算回路、21
8は指定された検索情報を含むデータファイルを関連す
る索引情報ファイル及び検索集合ファイル群を含めて更
新するデータファイル更新回路、219はデータベース
定義ファイルと関連するファイル群の更新を行うデータ
ベース定義更新回路、297は201〜299を相互に
接続するデータバス、299は中央処理装置2全体を制
御する制御回路である。
Further, reference numeral 212 is a set file update circuit for updating the mother set file and the intermediate set file from the designated data set file, and 213 is the data set on the internal storage device 201 and the conversion processing is completed by the expression conversion circuit 204. A keyword search circuit that performs a keyword search from the keyword search formula and leaves the result in the second data set on the internal storage device 201. Reference numerals 214 to 216 denote the internal storage device 201.
An inter-set logic (sum / product / negation) circuit 217 is input by the user to obtain the logical sum / logical product / logical negation of the first and second data sets and leave the result in the third data set. An inter-set operation circuit for performing an inter-set operation according to a recording formula, 21
Reference numeral 8 is a data file update circuit for updating a data file including specified search information including related index information files and search aggregate file groups, and 219 is a database definition update circuit for updating a file group related to the database definition file. Reference numeral 297 is a data bus which connects 201 to 299 to each other, and 299 is a control circuit which controls the central processing unit 2 as a whole.

【0020】内部記憶装置201〜ID行比較回路20
6については本発明の主要な部分ではないので、これ以
上は説明しないが、以下の補助ファイル生成回路210
〜データベース定義更新回路219の説明において、内
部記憶装置201中の各記憶領域は適当なタイミングで
メモリマネージャ202により確保され、使用後廃棄さ
れる性質のものであり、又、ファイルに対する読み書き
を伴う場合には、適当なタイミングで外部記憶装置イン
ターフェース203が使用されており、さらに、検索式
はすでに式変換回路204によるマクロ展開,エラーチ
ェック,逆ポーランド変換を済ませているものとする。
Internal storage device 201 to ID row comparison circuit 20
No. 6 is not a main part of the present invention, so it will not be described further, but the following auxiliary file generation circuit 210
-In the description of the database definition update circuit 219, each storage area in the internal storage device 201 has a property of being secured by the memory manager 202 at an appropriate timing and being discarded after use, and when reading and writing a file. , The external storage device interface 203 is used at an appropriate timing, and the search expression has already undergone macro expansion, error checking, and reverse Polish conversion by the expression conversion circuit 204.

【0021】図9は、補助ファイル生成回路の内部構成
を示す図で、図10は、その動作手順を示すフローチャ
ートである。図9において、内部記憶装置201中に
は、処理を行う適当な書式を持つテキストファイルの名
前を表す文字列であるテキストファイル名M1と、テキ
ストファイルよりデータを1行ずつ読み込むのに使用さ
れる行メモリM2と、データ1件分の索引情報を保持す
る索引情報メモリM3と、データ1件分の検索情報ある
いは索引情報/検索情報ファイルの先頭に付加されるヘ
ッダ部を保持するヘッダメモリM4と、項目識別子とし
て作用する項目名を保持する文字列型配列である項目名
メモリM5と、一度生成した検索情報ファイル全体を整
列のために読み込むときに使用される検索情報メモリM
6が確保される。又、補助ファイル生成回路210の内
部には、テキストファイルの現在までの位置情報を保持
する位置レジスタ,物理行番号を保持する行カウンタ,
現在探している項目の番号を保持する項目カウンタ,現
在までに発見したデータの数を保持する登録件数カウン
タからなるレジスタ群が存在する。
FIG. 9 is a diagram showing the internal structure of the auxiliary file generating circuit, and FIG. 10 is a flow chart showing the operating procedure thereof. In FIG. 9, in the internal storage device 201, a text file name M1 which is a character string representing the name of a text file having an appropriate format to be processed and data for reading the data from the text file line by line are used. A row memory M2, an index information memory M3 that holds index information for one data item, and a header memory M4 that holds search information for one data item or a header portion added to the beginning of the index information / search information file. , An item name memory M5 that is a character string type array that holds item names that act as item identifiers, and a search information memory M that is used when reading the entire search information file that has been generated once for sorting
6 is secured. Further, inside the auxiliary file generation circuit 210, a position register that holds the position information of the text file up to the present, a line counter that holds the physical line number,
There is a register group consisting of an item counter that holds the number of the item currently searched for and a registered number counter that holds the number of data found up to now.

【0022】図10は、補助ファイル生成回路の動作手
順を示すフローチャートである。最初にM1より対応す
る索引情報ファイル名及びデータ集合ファイル名が生成
され、その名前でファイルが作られる。次に、図示しな
いデータベース定義ファイル名とデータ番号0からなる
ダミーヘッダがM4に生成され、索引情報ファイル及び
データ集合ファイルに書き込まれる(S1)。次に、補助
ファイル生成回路210内部のレジスタ群を0で初期化
する(S2)。次に、テキストファイルが終わりに達する
まで、以下の作業を行う(S3)。最初にファイルの現在
位置を位置レジスタに代入し、M2に1行読み込み、行
カウンタを1増やす(S4)。次に、M2の先頭部分と項
目カウンタ番目の項目名を比較し(S5)、一致した場合
には、項目カウンタ番目の索引情報メモリに位置レジス
タの内容を格納し、項目カウンタを1増やし(S6)、項
目カウンタが図示しない最大項目数と一致した場合には
(S7)、行カウンタをM6の行情報記憶領域に、索引情
報ファイル名と登録件数カウンタをM4にそれぞれ格納
し、M6を索引情報ファイルに、M4をデータ集合ファ
イルに追加し、登録件数カウンタを1増やし、項目カウ
ンタを0に初期化する(S8)。テキストファイルが終わ
りに達していた場合には(S3)、データベース定義ファ
イル名と登録件数カウンタからなる実ヘッダをM4に生
成し、索引情報ファイル,データ集合ファイルの先頭部
分に書き込む(S9)。次に、M3にデータ集合ファイル
全体を読み込み(S10)、図11に示す集合整列回路2
11によりID項目である第1項目をキーとして、昇順
に整列した上でデータ集合ファイルに書き戻す(S1
1,S12)。以上で、補助ファイル生成回路210の
動作は終了する。
FIG. 10 is a flow chart showing the operation procedure of the auxiliary file generation circuit. First, the corresponding index information file name and data set file name are generated from M1, and a file is created with that name. Next, a dummy header including a database definition file name (not shown) and a data number 0 is generated in M4 and written in the index information file and the data set file (S1). Next, the register group inside the auxiliary file generation circuit 210 is initialized to 0 (S2). Next, the following work is performed until the end of the text file is reached (S3). First, the current position of the file is assigned to the position register, one line is read into M2, and the line counter is incremented by 1 (S4). Next, the head part of M2 is compared with the item name at the item counter number (S5), and if they match, the contents of the position register are stored in the index information memory at the item counter number and the item counter is incremented by 1 (S6). ), If the item counter matches the maximum number of items not shown
(S7), the row counter is stored in the row information storage area of M6, the index information file name and the registration number counter are stored in M4, M6 is added to the index information file, M4 is added to the data set file, and the registration number counter is added. The value is incremented by 1, and the item counter is initialized to 0 (S8). When the end of the text file has been reached (S3), a real header consisting of the database definition file name and the registration number counter is generated in M4 and written in the head portion of the index information file and data set file (S9). Next, the entire data set file is read into M3 (S10), and the set sorting circuit 2 shown in FIG.
The first item, which is an ID item, is sorted in ascending order by 11 and written back to the data set file (S1).
1, S12). With the above, the operation of the auxiliary file generation circuit 210 ends.

【0023】図11は、集合整列回路の内部構成を示す
図で、図12は、その動作手順を示すフローチャートで
ある。図11において、内部記憶装置201中には、整
列対象の検索情報配列を格納する検索情報メモリM1
と、M1の各検索情報の第1項目と、通し番号からなる
ID行の配列を格納するID行メモリM2が確保され
る。又、集合整列回路211の内部には、整列対象の検
索情報の件数を保持する件数レジスタが存在する。
FIG. 11 is a diagram showing the internal structure of the set alignment circuit, and FIG. 12 is a flow chart showing the operating procedure thereof. In FIG. 11, in the internal storage device 201, a search information memory M1 that stores a search information array to be sorted
Then, an ID row memory M2 for storing the first item of each search information of M1 and an array of ID rows consisting of serial numbers is secured. Further, inside the set sorting circuit 211, there is a number register that holds the number of pieces of search information to be sorted.

【0024】図12は、集合整列回路の動作手順を示す
フローチャートである。最初にM1のヘッダ部に記録さ
れている件数を件数レジスタ代入する(S1)。次に、M
1の各検索情報の第1項目をM2に読みだし(S2)、M
2の各要素に対して通し番号を付ける(S3)。次に、比
較回路としてID行比較回路206を、整列件数として
件数レジスタの内容を1件の大きさとしてID行の大き
さを指定して、汎用整列回路205をM2に対して作用
させ、整列させる(S4)。最後に、M1中の検索情報を
M2に付与した通し番号によってM2と同じ順序に整列
する(S5)。以上で、集合整列回路211の動作は終了
する。
FIG. 12 is a flow chart showing the operation procedure of the set alignment circuit. First, the number of records recorded in the header part of M1 is assigned to the number of registers (S1). Then M
The first item of each search information of No. 1 is read to M2 (S2), M
A serial number is assigned to each element of 2 (S3). Next, the ID row comparison circuit 206 is designated as the comparison circuit, the content of the number register is designated as the size of the number of IDs, the size of the ID row is designated, and the general-purpose sorting circuit 205 is operated on M2 to perform the sorting. (S4). Finally, the search information in M1 is arranged in the same order as M2 by the serial number given to M2 (S5). With this, the operation of the set sorting circuit 211 ends.

【0025】図13は、集合ファイル更新回路の内部構
成を示す図で、図14は、その動作手順を示すフローチ
ャートである。図13において、内部記憶装置201中
には、更新対象の検索情報ファイル全体を読み込む更新
集合メモリM1と、更新後の検索情報を格納する更新結
果メモリM2と、母集合/中間集合に新たに追加される
検索情報を保持するデータ集合メモリM3と、中間集合
の定義情報の配列である中間集合定義M4と、中間集合
ファイル名の配列である中間集合名M5と、M4の各定
義によってM3により導かれる各中間集合ファイルの追
加分を格納する部分集合メモリM6が確保される。又、
集合ファイル更新回路212の内部には、現在更新中の
中間集合ファイルの番号を保持する中間集合カウンタが
存在する。
FIG. 13 is a diagram showing the internal structure of the aggregate file update circuit, and FIG. 14 is a flow chart showing the operation procedure thereof. 13, in the internal storage device 201, an update set memory M1 for reading the entire search information file to be updated, an update result memory M2 for storing the updated search information, and a new addition to the mother set / intermediate set. The data set memory M3 that holds the retrieved search information, the intermediate set definition M4 that is the array of the definition information of the intermediate set, the intermediate set name M5 that is the array of the intermediate set file name, and the definition of M4 are derived by M3. A subset memory M6 for storing the addition of each of the intermediate set files to be created is secured. or,
Inside the aggregate file update circuit 212, there is an intermediate aggregate counter that holds the number of the intermediate aggregate file that is currently being updated.

【0026】図14は、集合ファイル更新回路の動作手
順を示すフローチャートである。最初にM1に母集合フ
ァイルを読み込み(S1)、図17に示す集合間論理和回
路によりM1とM3の論理和をM2に求め(S2)、M2
を母集合ファイルに書き戻し、母集合ファイルの更新を
行う(S3)。次に、中間集合カウンタを0で初期化し
(S4)、中間集合カウンタが中間集合の定義数より小さ
い間、次の動作を繰り返す(S5,S6)。最初に図15
に示すキーワード検索回路を用いて、M3の中で中間集
合カウンタ番目のM4とマッチする検索情報をM6に抽
出する。次に、中間集合カウンタ番目のM5の全検索情
報をM1に読み込み(S7)、図17に示す集合間論理和
回路によりM1とM6の論理和をM2に求め(S8)、M
2を中間集合カウンタ番目のM5に書き戻す(S9,S
10)。以上で、集合ファイル更新回路212の動作は
終了する。
FIG. 14 is a flow chart showing the operation procedure of the aggregate file update circuit. First, the mother set file is read into M1 (S1), the logical sum of M1 and M3 is obtained in M2 by the inter-set logical sum circuit shown in FIG. 17 (S2), M2
To the mother set file and update the mother set file (S3). Next, initialize the intermediate set counter with 0
(S4), while the intermediate set counter is smaller than the defined number of intermediate sets, the next operation is repeated (S5, S6). Figure 15 first
Using the keyword search circuit shown in, the search information matching the intermediate set counter th M4 in M3 is extracted to M6. Next, all the search information of M5 of the intermediate set counter th is read into M1 (S7), and the logical sum of M1 and M6 is obtained in M2 by the inter-set OR circuit shown in FIG. 17 (S8), M
2 is written back to the intermediate set counter th M5 (S9, S
10). Thus, the operation of the aggregate file update circuit 212 is completed.

【0027】図15は、キーワード検索回路213の内
部構成を示す図で、図16は、その動作手順を示すフロ
ーチャートである。図15において、内部記憶装置20
1中には、検索元の検索情報の配列を保持する検索元メ
モリM1と、検索後の検索情報の配列を保持する検索後
メモリM2と、検索中のデータの索引情報を格納する索
引情報メモリM3と、検索中のデータの各項目のうち、
必要な物を格納するデータ格納メモリM4と、個々のキ
ーワードのデータの中の有無を保持する中間結果スタッ
クM5と、検索すべきキーワードの逆ポーランド記法の
式を保持するキーワードリストM6が確保される。又、
キーワード検索回路213の内部には、検索元の件数を
保持する件数レジスタ1と、検索に成功した件数を格納
する件数レジスタ2と、現在検索中の検索情報の番号を
格納する件数カウンタと、現在検索中のキーワードある
いは演算子を格納する検索項目レジスタからなるレジス
タ群が存在する。
FIG. 15 is a diagram showing the internal structure of the keyword search circuit 213, and FIG. 16 is a flow chart showing the operating procedure thereof. In FIG. 15, the internal storage device 20
1, a search source memory M1 that holds an array of search information of a search source, a post-search memory M2 that holds an array of search information after a search, and an index information memory that stores index information of data under search. Of M3 and each item of the data being searched,
A data storage memory M4 for storing necessary items, an intermediate result stack M5 for holding the presence / absence of individual keyword data in the data, and a keyword list M6 for holding a reverse Polish notation expression for a keyword to be searched are secured. . or,
Inside the keyword search circuit 213, a number register 1 for holding the number of search sources, a number register 2 for storing the number of successful searches, a number counter for storing the number of the search information currently being searched, and a current There is a register group consisting of search item registers that store the keyword or operator being searched.

【0028】図16は、キーワード検索回路の動作手順
を示すフローチャートである。最初に、M1の件数を件
数レジスタ1に取り出し(S1)、M2を消去し、件数レ
ジスタ2を0で初期化する(S2)。次に、件数カウンタ
を0から件数レジスタl−l(小文字のエル)まで変化
させながら(S3)、各検索情報について以下の処理を行
う。最初に、現在の検索情報に対応する索引情報をM3
に読み込む(S4)。次に、M4及びM5を消去し、検索
項目レジスタをM6の先頭に再設定する(S5)。次に、
検索項目レジスタを検索項目あるいは演算子単位でM6
を走査させ、M6の終わりに達するまで次の処理を行う
(S6,S7)。現在の検索項目レジスタの内容が演算
子だった場合には(S8)、M5より中間結果を2つ取り
出して、その2つに対して規定の演算(論理和/論理積
/論理否定)を行い、その結果をM5に積む(S9,S
10)。
FIG. 16 is a flowchart showing the operation procedure of the keyword search circuit. First, the number of cases M1 is taken out to the case number register 1 (S1), M2 is erased, and the case number register 2 is initialized to 0 (S2). Next, while changing the number counter from 0 to the number register l-1 (lowercase letter L) (S3), the following processing is performed for each search information. First, the index information corresponding to the current search information is set to M3.
Read in (S4). Next, M4 and M5 are erased, and the search item register is reset to the head of M6 (S5). next,
Search item register M6 by search item or operator
Are scanned, and the next processing is performed until the end of M6 is reached (S6, S7). If the current contents of the search item register is an operator (S8), two intermediate results are fetched from M5, and a prescribed operation (logical sum / logical product / logical negation) is performed on the two intermediate results. , The result is loaded in M5 (S9, S
10).

【0029】現在の検索項目レジスタの内容がキーワー
ドと項目からなる検索項目だった場合には(S8)、必要
に応じてその項目をM4に読み込み、項目中のキーワー
ドの有無に応じた結果をM5に積む(S11,S12)。
M6の終わりに達した場合には、M5の結果に応じて検
索成功の場合には(S13)、M2に現在の検索情報を追
加し(S14)、件数レジスタを1増やす(S15)。M1
に含まれる全検索情報についての処理が終了後、件数レ
ジスタ2をM2内の件数保持部に書き込み(S16)、キ
ーワード検索回路213の動作は終了する。
If the current contents of the search item register is a search item consisting of a keyword and an item (S8), that item is read into M4 as necessary, and the result depending on the presence or absence of a keyword in the item is M5. (S11, S12).
When the end of M6 is reached, if the search is successful according to the result of M5 (S13), the current search information is added to M2 (S14), and the number register is incremented by 1 (S15). M1
After the processing for all the search information included in is completed, the case number register 2 is written in the case number holding unit in M2 (S16), and the operation of the keyword search circuit 213 ends.

【0030】図17は、集合間論理和回路の内部構成を
示す図で、図18は、その動作手順を示すフローチャー
トである。図17において、内部記憶装置201中に
は、演算元の2つの検索情報配列を保持する検索情報メ
モリA/B M1/2と、M2のID行全部を格納するID行
メモリM3と、M1のある1行を読み込む行メモリM4
と、結果を格納する検索情報メモリC M5が確保され
る。又、集合間論理和回路214の内部には、M1/M2/
M5 の件数を保持する件数レジスタA/B/Cと、現在
処理中の検索情報の番号を保持する件数カウンタからな
るレジスタ群が存在する。
FIG. 17 is a diagram showing the internal structure of the inter-set OR circuit, and FIG. 18 is a flow chart showing its operating procedure. 17, in the internal storage device 201, a search information memory A / B M1 / 2 that holds two search information arrays of operation sources, an ID row memory M3 that stores all ID rows of M2, and Row memory M4 for reading a certain row
Then, the search information memory C M5 for storing the result is secured. Further, inside the inter-set logical sum circuit 214, M1 / M2 /
There is a register group consisting of a number register A / B / C for holding the number of M5 and a number counter for holding the number of the search information currently being processed.

【0031】図18は、集合間論理和回路の動作手順を
示すフローチャートである。最初に、M1及びM2の件
数を件数レジスタA/Bに取り出し(S1)、件数レジス
タA<件数レジスタB の場合には(S2)、M1とM2
および件数レジスタAと同Bを入れ替える(S3)。次
に、M2をM5に、件数レジスタBを同Cに複写し(S
4)、M2の全検索情報の第1項目をM3に読み込む(S
5)。次に、件数カウンタを0から件数レジスタA−1
まで変化させながら、M1の各検索情報について、以下
の処理を行う(S6)。最初に、処理中の検索情報の第
1項目をM4に読み込む(S7)。次に、M3中にM4と
同一の項目があるかどうかを調べ(S8)、無かった場合
には、処理中の検索情報をM5に加え(S9)、件数カウ
ンタCを1増やす(S10)。M1中の全検索情報の処理
の終了後、件数レジスタCをM5内の件数保持部に書き
込み(S11)、図11の集合整列回路を用いてM5を整
列する(S12)。以上で、集合間論理和回路214の動
作は終了する。
FIG. 18 is a flowchart showing the operation procedure of the inter-set OR circuit. First, the number of cases of M1 and M2 is taken out to the case number register A / B (S1), and when the case number register A <the case number register B (S2), M1 and M2
And the number register A and the same number B are replaced (S3). Next, copy M2 to M5 and copy the number register B to the same C (S
4), read the first item of all search information of M2 into M3 (S
5). Next, the number counter is changed from 0 to the number register A-1.
The following processing is performed for each piece of search information of M1 while changing to (S6). First, the first item of the search information being processed is read into M4 (S7). Next, it is checked whether or not there is the same item as M4 in M3 (S8). If there is not, the search information being processed is added to M5 (S9), and the number counter C is incremented by 1 (S10). After the processing of all search information in M1 is completed, the number register C is written in the number holding unit in M5 (S11), and M5 is sorted using the set sorting circuit of FIG. 11 (S12). With the above, the operation of the inter-set logical sum circuit 214 ends.

【0032】図19は、集合間論理積回路の内部構成を
示す図で、図20は、その動作手味を示すフローチャー
トである。図19において、内部記憶装置201中に
は、演算元の2つの検索情報配列を保持する検索情報メ
モリA/B M1/2と、M2のID行全部を格納するID行
メモリM3と、M1のある1行を読み込む行メモリM4
と、結果を格納する検索情報メモリC M5が確保され
る。又、集合間論理積回路215の内部には、M1/M
2/M5の件数を保持する件数レジスタA/B/Cと、
現在処理中の検索情報の番号を保持する件数カウンタか
らなるレジスタ群が存在する。
FIG. 19 is a diagram showing the internal structure of the inter-set AND circuit, and FIG. 20 is a flow chart showing the operational taste. In FIG. 19, in the internal storage device 201, search information memories A / B M1 / 2 that hold two search information arrays of operation sources, ID row memories M3 that store all ID rows of M2, and M1 of M1 are stored. Row memory M4 for reading a certain row
Then, the search information memory C M5 for storing the result is secured. Further, inside the inter-set logical product circuit 215, M1 / M
A number register A / B / C that holds the number of 2 / M5,
There is a register group consisting of a number counter that holds the number of the search information currently being processed.

【0033】図20は、集合間論理積回路の動作手順を
示すフローチャートである。最初に、M1及びM2の件
数を件数レジスタA/Bに取り出し(S1,S2)、件数
レジスタA<件数レジスタB の場合には(S3)、M1
とM2および件数レジスタAと同Bを入れ替える(S
4)。次に、M5を消去し、件数レジスタ同Cを0で初
期化し(S5)、M2の全検索情報の第1項目をM3に読
み込む(S6)。ここで、件数レジスタBが0の場合に
は、集合間論理積回路215の動作を終了する。次に、
件数カウンタを0から件数レジスタA−1まで変化させ
ながら(S7)、M1の各検索情報について以下の処理を
行う。最初に、処理中の検索情報の第1項目をM4に読
み込む(S8)。次に、M3中にM4と同一の項目がある
かどうかを調べ(S9)、あった場合には、処理中の検索
情報をM5に加え(S10)、件数カウンタCを1増やす
(S11)。M1中の全検索情報の処理の終了後、件数レ
ジスタCをM5内の件数保持部に書き込む(S12)。以
上で、集合間論理積回路215の動作は終了する。
FIG. 20 is a flow chart showing the operation procedure of the inter-set AND circuit. First, the number of cases of M1 and M2 is taken out to the case number register A / B (S1, S2), and if the case number register A <the case number register B (S3), M1
And M2 and number register A and same B are replaced (S
4). Next, M5 is deleted, the number register C is initialized to 0 (S5), and the first item of all search information of M2 is read into M3 (S6). If the number-of-cases register B is 0, the operation of the inter-set AND circuit 215 ends. next,
While changing the number of items counter from 0 to the number of items register A-1 (S7), the following process is performed for each search information of M1. First, the first item of the search information being processed is read into M4 (S8). Next, it is checked whether or not there is the same item as M4 in M3 (S9). If there is, the search information being processed is added to M5 (S10) and the number counter C is incremented by 1.
(S11). After the processing of all search information in M1 is completed, the number register C is written in the number holding unit in M5 (S12). With this, the operation of the inter-set AND circuit 215 ends.

【0034】図21は、集合間論理否定回路の内部構成
を示す図で、図22は、その動作手順を示すフローチャ
ートである。図21において、内部記憶装置201中に
は、演算元の2つの検索情報配列を保持する検索情報メ
モリA/B M1/2と、M2のID行全部を格納するID行
メモリM3と、M1のある1行を読み込む行メモリM4
と、結果を格納する検索情報メモリC M5が確保される。
又、集合間録理否定回路216の内部には、M1/M2
/M5の件数を保持する件数レジスタA/B/Cと、現
在処理中の検索情報の番号を保持する件数カウンタから
なるレジスタ群が存在する。
FIG. 21 is a diagram showing the internal structure of the inter-set logical NOT circuit, and FIG. 22 is a flow chart showing its operating procedure. 21, in the internal storage device 201, a search information memory A / B M1 / 2 that holds two search information arrays of operation sources, an ID row memory M3 that stores all ID rows of M2, and Row memory M4 for reading a certain row
Then, a search information memory C M5 for storing the result is secured.
In addition, inside the inter-set recording negation circuit 216, M1 / M2
There is a register group including a number register A / B / C that holds the number of / M5 and a number counter that holds the number of the search information currently being processed.

【0035】図22は、集合論理否定回路の動作手順を
示すフローチャートである。最初にM1及びM2の件数
を件数レジスタA/Bに取り出し(S1,S2)、件数レ
ジスタB=0の場合には(S3)、M1をM5に複写し
(S4)、動作を終了する。件数レジスタB>0であった
場合には(S3)M5を消去し、件数レジスタCを0で初
期化し、M2の全検索情報の第1項目をM3に読み込む
(S5)。次に、件数カウンタを0から件数レジスタA−
1まで変化させながら(S6)、M1の各検索情報につい
て、以下の処理を行う。最初に、処理中の検索情報の第
1項目をM4に読み込む(S7)。次に、M3中にM4と
同一の項目があるかどうかを調べ(S8)、なかった場合
には、処理中の検索情報をM5に加え(S9)、件数カウ
ンタCを1増やす(S10)。M1中の全検索情報の処理
の終了後、件数レジスタCをM5内の件数保持部に書き
込む(S11)。以上で、集合間論理否定回路216の動
作は終了する。
FIG. 22 is a flow chart showing the operation procedure of the collective logic NOT circuit. First, the number of cases of M1 and M2 is taken out to the case number register A / B (S1, S2). When the case number register B = 0 (S3), M1 is copied to M5.
(S4), the operation ends. If the count register B> 0, (S3) M5 is erased, the count register C is initialized to 0, and the first item of all search information of M2 is read into M3.
(S5). Next, the number counter is changed from 0 to the number register A-
While changing to 1 (S6), the following process is performed for each search information of M1. First, the first item of the search information being processed is read into M4 (S7). Next, it is checked whether or not there is the same item as M4 in M3 (S8). If there is not, the search information being processed is added to M5 (S9), and the number counter C is incremented by 1 (S10). After the processing of all search information in M1 is completed, the number register C is written in the number holding unit in M5 (S11). With the above, the operation of the inter-set logical NOT circuit 216 ends.

【0036】図23は、集合間演算回路の内部構成を示
す図で、図24は、その動作手順を示すフローチャート
である。図23において、内部記憶装置201中には、
複数の検索情報の配列先入れ後だし(LIFO)方式で格納
する検索情報スタックM1と、逆ポーランド記法で記述
された演算式を保持する検索式M2が確保される。又、
集合間演算回路217の内部には、現在処理中の検索項
目あるいは演算子を保持する検索項目レジスタが存在す
る。
FIG. 23 is a diagram showing the internal structure of the inter-set arithmetic circuit, and FIG. 24 is a flow chart showing its operating procedure. In FIG. 23, in the internal storage device 201,
A search information stack M1 for storing a plurality of pieces of search information in an array first-in-first-out (LIFO) format and a search expression M2 for holding an arithmetic expression described in reverse Polish notation are secured. or,
Inside the inter-set operation circuit 217, there is a search item register that holds the search item or operator currently being processed.

【0037】図24は、集合間演算回路の動作手順を示
すフローチャートである。最初に、M1を消去し(S
1)、M2の各項目あるいは演算子について検索項目レ
ジスタを用いて順次走査し、以下の処理を行う(S2)。
最初に、M2より項目あるいは演算子を検索項目レジス
タに1つ取り出し(S3)、それが演算子であった場合に
は(S4)、M1より検索集合を2つ取り出し、演算子に
対応する集合間論理(和/積/否定)回路(図17/図19
/図21)を用いて論理演算を行い、結果をM1に積み
(S5)、検索項目レジスタが演算子でなかった場合に
は、それを検索情報ファイル名とする検索情報を読み込
み、M1に積む(S6)。M2の走査の終了をもって、集
合間演算回路217の動作は終了する。
FIG. 24 is a flow chart showing the operation procedure of the inter-set arithmetic circuit. First, erase M1 (S
1), each item or operator of M2 is sequentially scanned using the search item register, and the following processing is performed (S2).
First, one item or operator is retrieved from M2 into the retrieval item register (S3), and if it is an operator (S4), two retrieval sets are retrieved from M1 and the set corresponding to the operator is retrieved. Inter-logic (sum / product / negation) circuit (Figure 17 / Figure 19
/ Figure 21) is used to perform a logical operation and the result is stacked in M1.
(S5) If the search item register is not an operator, the search information having that as the search information file name is read and loaded in M1 (S6). When the scanning of M2 ends, the operation of the inter-set arithmetic circuit 217 ends.

【0038】図25は、データファイル更新回路の内部
構成を示す図で、図26(a),(b)は、その動作手
順を示すフローチャートである。図25において、内部
記憶装置201中には、更新するデータファイルと対応
する検索情報を含む検索情報の配列である検索情報メモ
リM1と、更新前後のデータファイルと対応する索引情
報ファイルを読み込む索引情報メモリM2と、更新前の
データファイルの各データの第1項目の配列を格納する
ID行メモリA M3と、更新後のデータファイルの各デー
タの第1項目の配列を格納するID行メモリB M4が確保
される。又、データファイル更新回路218の内部に
は、M1での更新するデータに対応する検索情報の番号
を保持するデータ番号レジスタと、更新するデータに対
応する索引情報中の行番号情報を保持する行番号レジス
タからなるレジスタ群が存在する。
FIG. 25 is a diagram showing the internal structure of the data file updating circuit, and FIGS. 26 (a) and 26 (b) are flowcharts showing the operating procedure. 25, in the internal storage device 201, a search information memory M1 which is an array of search information including search information corresponding to the data file to be updated, and index information for reading the index information file corresponding to the data files before and after the update. A memory M2, an ID row memory A M3 that stores an array of the first item of each data of the data file before updating, and an ID row memory B M4 that stores an array of the first item of each data of the data file after updating Is secured. Also, inside the data file update circuit 218, a data number register that holds the number of the search information corresponding to the data to be updated in M1, and a line that holds the line number information in the index information that corresponds to the data to be updated. There is a register group consisting of number registers.

【0039】図26(a),(b)は、データファイル
更新回路の動作手順を示すフローチャートである。最初
に、M2に更新するデータに対応する索引情報ファイル
を読み込み(S1)、更新するデータに対応する索引情報
よりデータの行番号を行番号レジスタに取り出す(S
2)。次に、M2に格納されている第1項目の索引情報
をもとに更新するデータファイルの全データの第1項目
をM3に読み込む(S3)。次に、データファイルを適当
な名前の一時ファイルに複写し、行番号レジスタの内容
を編集開始行番号として、一時ファイルをテキストエデ
ィタで編集する(S4)。次に、編集後の一時ファイルよ
り対応する索引情報ファイル及びデータ集合ファイルを
補助ファイル生成回路(図9)を用いて生成する(S5)。
FIGS. 26A and 26B are flow charts showing the operation procedure of the data file updating circuit. First, the index information file corresponding to the data to be updated in M2 is read (S1), and the line number of the data is extracted from the index information corresponding to the data to be updated in the line number register (S1).
2). Next, the first item of all the data of the data file to be updated is read into M3 based on the index information of the first item stored in M2 (S3). Next, the data file is copied to a temporary file with an appropriate name, and the temporary file is edited with a text editor using the contents of the line number register as the edit start line number (S4). Next, the corresponding index information file and data set file are generated from the edited temporary file using the auxiliary file generation circuit (FIG. 9) (S5).

【0040】次に、一時ファイルより生成した索引情報
ファイルをM2に読み込み(S6)、M2に従って一時フ
ァイルの全データの第1項目をM4に読み込む(S7)。
次に、M3とM4を比較し(S8)、まったく同一である
場合、すなわち、データファイルの更新前後でデータの
追加,削除,順序変更あるいは第1項目の更新が行われ
ていない場合に限って、更新前のデータファイルと索引
情報ファイルを削除し(S9)、一時ファイルと対応する
索引情報ファイルの名前を先に削除したデータファイル
と対応する索引情報ファイルの名前に変更することで、
データの更新を反映させる(S10)。最後に、一時ファ
イルより生成したデータ集合ファイルを削除して(S1
1)、データファイル更新回路218の動作は終了す
る。
Next, the index information file generated from the temporary file is read into M2 (S6), and the first item of all data of the temporary file is read into M4 according to M2 (S7).
Next, M3 and M4 are compared (S8), and only when they are exactly the same, that is, when data addition, deletion, order change or first item update has not been performed before and after updating the data file. By deleting the data file and the index information file before the update (S9) and changing the name of the index information file corresponding to the temporary file to the name of the index information file corresponding to the data file deleted earlier,
The update of the data is reflected (S10). Finally, delete the data set file generated from the temporary file (S1
1), the operation of the data file update circuit 218 ends.

【0041】図27は、データベース定義更新回路の内
部構成を示す図で、図28は、その動作手順を示すフロ
ーチャートである。図27において、内部記憶装置20
1中には、項目名文字列の配列である項目定義メモリM
1と、マクロ定義文字列の配列であるマクロ定義メモリ
M2と、更新前の中間集合の定義式を保持する中間集合
定義メモリA M3と、更新後の中間集合の定義式を保持す
る中間集合定義メモリA M4が確保される。又、データベ
ース定義更新回路219の内部には、中間集合ファイル
群の更新の必要性の有無を保持する更新フラグが存在す
る。
FIG. 27 is a diagram showing the internal structure of the database definition updating circuit, and FIG. 28 is a flow chart showing the operating procedure thereof. In FIG. 27, the internal storage device 20
In 1 is an item definition memory M which is an array of item name character strings.
1, a macro definition memory M2 that is an array of macro definition character strings, an intermediate set definition memory A M3 that holds the definition expression of the intermediate set before updating, and an intermediate set definition that holds the definition expression of the intermediate set after updating Memory A M4 is reserved. Further, inside the database definition updating circuit 219, there is an update flag for holding the necessity of updating the intermediate set file group.

【0042】図28は、データベース定義更新回路の動
作手順を示すフローチャートである。最初に、データベ
ース定義ファイルを一時ファイルに複写し(S1)、それ
をテキストエディタで編集する(S2)。次に、一時ファ
イルの項目定義部/マクロ定義部/中間集合定義部 を
それぞれ M1/M2/M4 に読み込む(S3)。次に、
M3とM4比較し(S4)、定義内容が同一であった場合
には、更新フラグを「否」に、そうでなければ「是」に
設定する。次に、外部記憶装置1に存在する全てのデー
タファイルに対して、補助ファイル生成回路(図9)を用
いて、索引情報ファイル及びデータ集合ファイルを生成
する(S5,S6)。次に、更新フラグが「是」であった
場合には(S7)、M3で定義されている中間集合ファイ
ルを削除し(S8)、M4をM3に複写し、集合ファイル
更新回路(図13)を用いて母集合ファイル及びM4に記述
されている中間集合ファイルを生成する(S9,S1
0)。以上で、データベース定義更新回路219の動作
は終了する。
FIG. 28 is a flow chart showing the operation procedure of the database definition updating circuit. First, the database definition file is copied to a temporary file (S1) and edited with a text editor (S2). Next, the item definition part / macro definition part / intermediate set definition part of the temporary file is read into M1 / M2 / M4 respectively (S3). next,
M3 and M4 are compared (S4), and if the definition contents are the same, the update flag is set to "no", and if not, "correct" is set. Next, the index information file and the data set file are generated for all the data files existing in the external storage device 1 by using the auxiliary file generation circuit (FIG. 9) (S5, S6). Next, if the update flag is "yes" (S7), the intermediate aggregate file defined in M3 is deleted (S8), M4 is copied to M3, and the aggregate file update circuit (Fig. 13) To generate a mother set file and an intermediate set file described in M4 (S9, S1
0). Thus, the operation of the database definition update circuit 219 ends.

【0043】[0043]

【発明の効果】本発明は、以上説明したように構成され
ているので、以下のような効果を奏する。すなわち、可
変長データの検索装置において、可変長データを書式化
されたテキストファイルであるデータファイルに格納
し、加えてそれと1対1に対応する索引情報ファイル
と、必ずしも1対1には対応しない検索情報ファイルの
2種類の補助ファイルを用いることにより、データの検
索速度を大きく短縮することが可能となり、しかも補助
ファイル群の保守を自動化する手段が検索装置に完備さ
れているために、ユーザが煩雑な保守を行う必要がな
い。
Since the present invention is constructed as described above, it has the following effects. That is, in the variable-length data retrieval device, the variable-length data is stored in a data file which is a formatted text file, and in addition, there is not necessarily a one-to-one correspondence with the index information file corresponding to the data file. By using two types of auxiliary files of the search information file, it is possible to greatly reduce the data search speed, and the search device is equipped with means for automating the maintenance of the auxiliary file group. No need for complicated maintenance.

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

【図1】本発明による可変長データの検索装置の一実施
例を説明するための構成図である。
FIG. 1 is a configuration diagram for explaining an embodiment of a variable length data search device according to the present invention.

【図2】図1の外部記憶装置に格納されるデータベース
を構成するファイル群を示す図である。
FIG. 2 is a diagram showing a group of files constituting a database stored in the external storage device of FIG.

【図3】図2におけるデータベース定義ファイルの書式
及び実施例を示す図である。
FIG. 3 is a diagram showing a format and an embodiment of a database definition file in FIG.

【図4】図2におけるデータファイルの書式及び実施例
を示す図である。
FIG. 4 is a diagram showing a format and an embodiment of a data file in FIG.

【図5】図2における索引情報ファイルの書式及び実施
例を示す図である。
5 is a diagram showing a format and an embodiment of an index information file in FIG.

【図6】図2における検索情報ファイルの書式及び実施
例を示す図である。
FIG. 6 is a diagram showing a format and an example of a search information file in FIG.

【図7】図2における検索情報ファイル,索引情報ファ
イル及びデータファイルの参照状態の例を示す図であ
る。
FIG. 7 is a diagram showing an example of a reference state of a search information file, an index information file and a data file in FIG.

【図8】図1の中央処理装置の構成図である。8 is a block diagram of the central processing unit of FIG. 1. FIG.

【図9】図8における補助ファイル生成回路の構成図で
ある。
9 is a configuration diagram of an auxiliary file generation circuit in FIG.

【図10】図8における補助ファイル生成回路の動作手
順を示すフローチャートである。
10 is a flowchart showing an operation procedure of the auxiliary file generation circuit in FIG.

【図11】図8における集合整列回路の構成図である。11 is a configuration diagram of a set alignment circuit in FIG.

【図12】図8における集合整列回路の動作手順を示す
フローチャートである。
12 is a flowchart showing an operation procedure of the set alignment circuit in FIG.

【図13】図8における集合ファイル更新回路の構成図
である。
13 is a configuration diagram of a set file update circuit in FIG.

【図14】図8における集合ファイル更新回路の動作手
順を示すフローチャートである。
14 is a flowchart showing an operation procedure of the collective file update circuit in FIG.

【図15】図8におけるキーワード検索回路の構成図で
ある。
15 is a configuration diagram of a keyword search circuit in FIG.

【図16】図8におけるキーワード検索回路の動作手順
を示すフローチャートである。
16 is a flowchart showing an operation procedure of the keyword search circuit in FIG.

【図17】図8における集合間論理和回路の構成図であ
る。
FIG. 17 is a configuration diagram of an inter-set OR circuit in FIG.

【図18】図8における集合間論理和回路の動作手順を
示すフローチャートである。
18 is a flowchart showing an operation procedure of the inter-set logical sum circuit in FIG.

【図19】図8における集合間論理和回路の構成及び動
作手順の構成図である。
19 is a configuration diagram of a configuration and an operation procedure of the inter-set OR circuit in FIG.

【図20】図8における集合間論理和回路の構成及び動
作手順を示すフローチャートである。
20 is a flowchart showing a configuration and an operation procedure of the inter-set OR circuit in FIG.

【図21】図8における集合間論理否定回路の構成及び
動作手順の構成図である。
21 is a configuration diagram of the configuration and operation procedure of the inter-set logical NOT circuit in FIG.

【図22】図8における集合間論理否定回路の構成及び
動作手順を示すフローチャートである。
22 is a flowchart showing a configuration and an operation procedure of the inter-set logical NOT circuit in FIG.

【図23】図8における集合間論理演算回路の構成及び
動作手順の構成図である。
23 is a configuration diagram of the configuration and operation procedure of the inter-set logical operation circuit in FIG.

【図24】図8における集合間論理演算回路の構成及び
動作手順を示すフローチャートである。
24 is a flowchart showing a configuration and an operation procedure of the inter-set logical operation circuit in FIG.

【図25】図8におけるデータファイル更新回路の構成
及び動作手順の構成図である。
25 is a configuration diagram of a configuration and an operation procedure of the data file update circuit in FIG.

【図26】図8におけるデータファイル更新回路の構成
及び動作手順を示すフローチャートである。
26 is a flowchart showing the configuration and operation procedure of the data file update circuit in FIG.

【図27】図8におけるデータベース定義更新回路の構
成及び動作手順の構成図である。
27 is a configuration diagram of a configuration and an operation procedure of the database definition update circuit in FIG.

【図28】図8におけるデータベース定義更新回路の構
成及び動作手順を示すフローチャートである。
28 is a flowchart showing the configuration and operation procedure of the database definition update circuit in FIG.

【図29】従来例1を説明するための図である。FIG. 29 is a diagram for explaining Conventional Example 1.

【図30】従来例2を説明するための図である。FIG. 30 is a diagram for explaining a second conventional example.

【図31】従来例3を説明するための図である。FIG. 31 is a diagram for explaining Conventional Example 3.

【符号の説明】[Explanation of symbols]

1…外部記憶装置、2…中央処理装置、3…端末、4…
印字装置。
1 ... External storage device, 2 ... Central processing unit, 3 ... Terminal, 4 ...
Printing device.

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 複数の可変長項目の集合体である可変長
データを格納する少なくとも1つのデータファイルと、
該データファイルと1対1の対応関係を持ち、各データ
の各項目のファイル中の位置情報を保持する索引情報フ
ァイルと、可変長データの存在場所を示す検索情報を保
持する少なくとも1つの検索情報ファイルと、データの
項目の定義を含むデータベースの定義を保持する1つの
データベース定義ファイルと、データベースの検索,出
力手段であって、前記可変長項目が、可変長項目本体
と、該可変長項目本体の直前に位置し、該可変長項目本
体の属性を規定する項目識別子と、前記可変長項目本体
の直後に位置し、該可変長項目本体の終了位置を規定す
る項目終了識別子より構成され、前記可変長項目を構成
する個々の文字が通常のテキストファイルにみられる文
字であることを特徴とする可変長データの格納方法。
1. At least one data file for storing variable-length data, which is an aggregate of a plurality of variable-length items,
An index information file having a one-to-one correspondence with the data file and holding position information in the file of each item of each data, and at least one search information holding search information indicating the location of the variable length data A file, a database definition file that holds a definition of a database including definitions of data items, and a database search / output unit, wherein the variable-length item is a variable-length item body and the variable-length item body. And an item identifier that is located immediately before the variable length item body and that defines the attribute of the variable length item body, and an item end identifier that is located immediately after the variable length item body and that defines the end position of the variable length item body. A method for storing variable-length data, in which the individual characters that make up the variable-length item are characters found in ordinary text files.
【請求項2】 前記可変長項目の構成に加えて、データ
ファイルの先頭あるいは末尾あるいは各項目の項目終了
識別子と項目識別子の間に位置する検索の対象とならな
い不定長の付属データを含むことを特徴とする請求項1
記載の可変長データの格納方法。
2. In addition to the structure of the variable length item, it includes ancillary data of indefinite length located at the beginning or the end of the data file or between the item end identifier of each item and the item identifier Claim 1 characterized by
How to store the described variable length data.
【請求項3】 前記索引情報ファイルは、データファイ
ル中の各項目の位置情報に加えて、各データのファイル
中での行番号であるファイル先頭からの改行コードの数
を保持することを特徴とする請求項1又は2記載の可変
長データの格納方法。
3. The index information file holds, in addition to the position information of each item in the data file, the number of line feed codes from the beginning of the file, which is the line number in the file of each data. The method for storing variable length data according to claim 1 or 2.
【請求項4】 前記検索情報ファイルは、各データファ
イル及び索引情報ファイルと1対1に対応するデータ集
合ファイルと、登録されている全データの情報を保持す
る母集合ファイルと、主要な検索テーマに応じて設定さ
れる不特定多数の中間集合ファイルと、ユーザの問い合
わせにつれて生成,消滅をするユーザ集合ファイルから
なることを特徴とする請求項1,2又は3記載の可変長
データの格納方法。
4. The search information file is a data set file corresponding to each data file and index information file in a one-to-one correspondence, a mother set file holding information of all registered data, and a main search theme. 4. The variable length data storage method according to claim 1, comprising an unspecified number of intermediate set files that are set according to the above, and a user set file that is created and deleted in response to a user inquiry.
【請求項5】 前記データベース定義ファイルは、デー
タの項目の定義に加えて、母集合ファイルより前記中間
集合ファイルを生成する中間集合生成式を保持すること
を特徴とする請求項1〜4いずれかに記載の可変長デー
タの格納方法。
5. The database definition file holds an intermediate set generation formula for generating the intermediate set file from a mother set file, in addition to the definition of data items. Storage method of variable length data described in.
【請求項6】 複数の可変長項目の集合体である可変長
データを格納する少なくとも1つのデータファイルと、
前記データファイルと1対1の対応関係を持ち、各デー
タの各項目のファイル中の位置情報を保持する索引情報
ファイルと、可変長データの存在場所を示す検索情報を
保持する少なくとも1つの検索情報ファイルと、データ
の項目の定義を含むデータベースの定義を保持する1つ
のデータベース定義ファイルとからなるファイル群を格
納する外部記憶装置と、検索動作を行う中央処理装置
と、ユーザからの質問を受け付けあるいは回答を出力す
る端末より構成される可変長データの検索装置におい
て、前記中央処理装置内に規定の書式に整形されたテキ
ストファイルから対応する索引情報ファイルと検索集合
ファイルを生成する補助ファイル生成手段を備えること
を特徴とする可変長データの検索装置。
6. At least one data file storing variable-length data, which is an aggregate of a plurality of variable-length items,
An index information file having a one-to-one correspondence with the data file and holding position information in the file of each item of each data, and at least one search information holding search information indicating the location of the variable length data An external storage device that stores a file group including a file and a database definition file that holds a definition of a database that includes definitions of data items, a central processing unit that performs a search operation, and accepts a question from a user or In a variable-length data retrieval device composed of a terminal for outputting an answer, auxiliary file generating means for generating a corresponding index information file and a retrieval set file from a text file shaped in a prescribed format in the central processing unit is provided. An apparatus for retrieving variable-length data, comprising:
【請求項7】 前記補助ファイル生成手段に加えて、母
集合ファイルを更新する母集合ファイル更新手段を備え
ることを特徴とする請求項6記載の可変長データの検索
装置。
7. The variable-length data retrieving apparatus according to claim 6, further comprising, in addition to the auxiliary file generating means, a mother set file updating means for updating a mother set file.
【請求項8】 前記データベース定義ファイルの中間集
合生成式に従い、中間集合より中間集合ファイルを更新
する中間集合更新手段を備えることを特徴とする請求項
6又は7記載の可変長データの検索装置。
8. The variable-length data search device according to claim 6, further comprising an intermediate set updating unit that updates the intermediate set file from the intermediate set according to the intermediate set generation formula of the database definition file.
【請求項9】 前記検索情報ファイル中の任意のデータ
に関する情報をもとに、対応するデータファイル中の可
変長データの更新を行い、さらに更新されたデータファ
イルより索引情報ファイルを再構成するデータファイル
更新手段を備えることを特徴とする請求項6,7又は8
記載の可変長データの検索装置。
9. Data for updating variable-length data in a corresponding data file based on information about arbitrary data in the search information file, and reconstructing an index information file from the updated data file. 9. A file updating means is provided, wherein the file updating means is provided.
Retrieval device for described variable length data.
【請求項10】 前記データベース定義ファイルを更新
し、更新されたデータベース定義ファイルより索引情報
ファイルを再構成するデータベース定義更新手段を備え
ることを特徴とする請求項6〜9いずれかに記載の可変
長データの検索装置。
10. The variable length according to claim 6, further comprising database definition updating means for updating the database definition file and reconstructing an index information file from the updated database definition file. Data retrieval device.
JP4231473A 1992-08-06 1992-08-06 Variable length data storage method and retrieval device Pending JPH0660120A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4231473A JPH0660120A (en) 1992-08-06 1992-08-06 Variable length data storage method and retrieval device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4231473A JPH0660120A (en) 1992-08-06 1992-08-06 Variable length data storage method and retrieval device

Publications (1)

Publication Number Publication Date
JPH0660120A true JPH0660120A (en) 1994-03-04

Family

ID=16924050

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4231473A Pending JPH0660120A (en) 1992-08-06 1992-08-06 Variable length data storage method and retrieval device

Country Status (1)

Country Link
JP (1) JPH0660120A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6312296A (en) * 1986-04-09 1988-01-19 イ−ライ・リリ−・アンド・カンパニ− Method for using eucaryotic development vector containing bkvirus enhancer
US7106749B1 (en) 1999-11-10 2006-09-12 Nds Limited System for data stream processing
US7756201B2 (en) 2001-07-23 2010-07-13 Nds Limited System for random access to content
US8166082B2 (en) 2007-11-30 2012-04-24 Seiko Epson Corporation Variable length data storage device, variable length data storage method, variable length data reading method, and a program for the same

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6312296A (en) * 1986-04-09 1988-01-19 イ−ライ・リリ−・アンド・カンパニ− Method for using eucaryotic development vector containing bkvirus enhancer
US7106749B1 (en) 1999-11-10 2006-09-12 Nds Limited System for data stream processing
US7580416B2 (en) 1999-11-10 2009-08-25 Nds Limited System for data stream processing
US7756201B2 (en) 2001-07-23 2010-07-13 Nds Limited System for random access to content
US8166082B2 (en) 2007-11-30 2012-04-24 Seiko Epson Corporation Variable length data storage device, variable length data storage method, variable length data reading method, and a program for the same
US8386539B2 (en) 2007-11-30 2013-02-26 Seiko Epson Corporation Variable length data storage device, variable length data storage method, variable length data reading method, and a program for the same

Similar Documents

Publication Publication Date Title
US8255398B2 (en) Compression of sorted value indexes using common prefixes
EP0293161B1 (en) Character processing system with spelling check function
JPH07152774A (en) Document retrieval method and device
JPH0660120A (en) Variable length data storage method and retrieval device
JPH05257774A (en) Information retrieving device compressing/storing index record number
JP2000339306A (en) Document preparing device
JP2925042B2 (en) Information link generation method
JP3649472B2 (en) Information retrieval device
JP2008059136A (en) Leaking personal information retrieval system, leaking personal information retrieval method, leaking personal information retrieval device and program
JPH11232149A (en) File comparison processing method and device, and medium storing file comparison processing program
JP2990312B2 (en) Data access method and device
JP2001318935A (en) Information processor, its method, recording medium recording information processing software, and relational database
JPH03209564A (en) Literature data registering method
JPH08115340A (en) Document retrieval device and generating device for index file used for the same
JPH09259132A (en) Device and method for information registration and retrieval
JP2556272B2 (en) Electronic filing information porting method and apparatus
JP3224917B2 (en) Name dictionary creation device
JP2751681B2 (en) Document search device
JPH0546607A (en) Document reading aloud device
JPH0667945A (en) Electronic filing device
JP3047400B2 (en) Data processing device
JPH05181719A (en) Variable length data storage and reference system
JP2888458B2 (en) File storage device
JPH06139061A (en) Program specification inverse preparing method
JPH09138809A (en) Whole sentence retrieval method