JPH0635769A - Data base system - Google Patents

Data base system

Info

Publication number
JPH0635769A
JPH0635769A JP4186422A JP18642292A JPH0635769A JP H0635769 A JPH0635769 A JP H0635769A JP 4186422 A JP4186422 A JP 4186422A JP 18642292 A JP18642292 A JP 18642292A JP H0635769 A JPH0635769 A JP H0635769A
Authority
JP
Japan
Prior art keywords
file
block
record
writing
held
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
JP4186422A
Other languages
Japanese (ja)
Inventor
Michiyo Asai
美千代 浅井
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.)
HOKKAIDO NIPPON DENKI SOFTWARE KK
NEC Solution Innovators Ltd
Original Assignee
HOKKAIDO NIPPON DENKI SOFTWARE KK
NEC Software Hokkaido Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by HOKKAIDO NIPPON DENKI SOFTWARE KK, NEC Software Hokkaido Ltd filed Critical HOKKAIDO NIPPON DENKI SOFTWARE KK
Priority to JP4186422A priority Critical patent/JPH0635769A/en
Publication of JPH0635769A publication Critical patent/JPH0635769A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve processing efficiency at the time of inserting records to a data base. CONSTITUTION:This data base system finds a record insertion position with a record position decision means 1 and then discriminates whether or not a block which the record belongs to is held at a temporary storage means 4 by a file input/output discrimination means 2. When the block is not held, the block found by a file read means 3 is read and the block is held at the temporary storage means 4. To the held block, record insertion processing is executed at a record insertion means 5 and the whether or not writing the block to a file is required, is discriminated at the file input/output discrimination means 2. When the writing the block to the file is required, the held block is written by a file write means 6.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はデータベースシステム、
特にファイルに対して順番にデータを格納するデータベ
ースシステムに関する。
The present invention relates to a database system,
In particular, it relates to a database system that stores data in order for files.

【0002】[0002]

【従来の技術】一般に、データベースシステムは、蓄積
されたデータを効率よく管理し、有効に利用するための
もので、販売管理や在庫管理等におけるデータ処理に利
用されている。
2. Description of the Related Art Generally, a database system is used for efficiently managing and effectively utilizing accumulated data, and is used for data processing in sales management, inventory management and the like.

【0003】従来のデータベースシステムの一例を図2
に示す。図2は、従来技術の一例を示すデータベースシ
ステムの構成図であり、処理の対象となるレコード位置
を求めるレコード位置判定手段1と、求めた位置をもと
にして、ファイルからレコードの属するブロックを読み
込むファイル読み込み手段3と、読み込んだブロックを
処理が終了するまで保持する一時記憶手段4と、保持さ
れているブロックに対してレコードを挿入するレコード
挿入手段5と、保持されているブロックをファイルに書
き出すファイル書き出し手段6で構成されている。
An example of a conventional database system is shown in FIG.
Shown in. FIG. 2 is a block diagram of a database system showing an example of a conventional technique. A record position determination means 1 for obtaining a record position to be processed and a block to which a record belongs from a file based on the obtained position. File reading means 3 for reading, temporary storage means 4 for holding the read block until processing is completed, record inserting means 5 for inserting a record into the held block, and the held block for the file It is composed of a file writing means 6 for writing.

【0004】図2のデータベースシステムにおいて、あ
るレコードを挿入する場合には、まず、処理の対象とな
るレコードの属するブロックのファイル内相対位置、及
び、ブロック内のレコードの存在する位置を、レコード
位置判定手段1を通じて求める。レコード位置判定手段
1は、ファイル読み込み手段3に、求めた位置を伝達
し、ファイルから読み込むように指示を与える。ファイ
ル読み込み手段3は、伝達されたファイル内相対位置情
報に基づいて、ファイルから目的とするブロックを読み
込む。このようにしてファイルより読み込まれたブロッ
クは、一時記憶手段4によって、処理が終了する迄一時
的に主記憶上の作業領域に保存される。処理の対象とな
るブロックを作業領域に保持した後に、レコード挿入手
段5は保持したブロックの、レコード位置判定手段1に
て求めたブロック内のレコード位置にレコードを書き込
む。一時的に保存されているブロックに対するレコード
挿入処理の終了後、一時的に保存されていたブロック
は、ファイル書き出し手段6によりファイルに書き出さ
れ、データベースファイルに対する1レコードの挿入処
理が終了する。
When inserting a certain record in the database system of FIG. 2, first, the relative position in the file of the block to which the record to be processed belongs and the position of the record in the block are determined as the record position. Determined through the judging means 1. The record position judging means 1 transmits the obtained position to the file reading means 3 and gives an instruction to read it from the file. The file reading means 3 reads the target block from the file based on the transmitted relative position information in the file. The blocks thus read from the file are temporarily stored in the work area on the main memory by the temporary storage means 4 until the processing is completed. After holding the block to be processed in the work area, the record insertion unit 5 writes the record at the record position in the block determined by the record position determination unit 1 of the held block. After the record insertion processing for the temporarily stored block is completed, the temporarily stored block is written to the file by the file writing means 6, and the one-record insertion processing for the database file is completed.

【0005】[0005]

【発明が解決しようとする課題】上述した従来のデータ
ベースシステムでは、1レコードを挿入する場合には、
毎回必ず、ファイルからレコードの属するブロックを読
み込み、レコードを挿入後、毎回必ずファイルにレコー
ドの属するブロックを書き出す処理を実行している。
In the above conventional database system, when one record is inserted,
Every time, the block to which the record belongs is read from the file, the record is inserted, and the block to which the record belongs is always written to the file.

【0006】このレコードの挿入は、ブロック内のレコ
ード位置にレコードを書き出す処理であり、レコードを
書き出す位置の以前のレコードに影響されることはな
い。従って、同一のブロックに対する処理が連続する場
合には、ファイルからブロックを読み込む処理、及びフ
ァイルにブロックを書き出す処理を毎回実行する必要は
ない。即ち、同一のブロックを使用する場合には、ブロ
ックの使用を終了するまで、ブロックを保持した状態で
処理を行うことが可能である。
This record insertion is a process of writing a record at a record position within a block, and is not affected by the record before the record writing position. Therefore, when the processing for the same block continues, it is not necessary to execute the processing of reading the block from the file and the processing of writing the block to the file every time. That is, when the same block is used, it is possible to perform the processing while holding the block until the use of the block is completed.

【0007】従って、ファイルからのブロックの読み込
み書き出し処理を毎回実行する従来方式は、同一ブロッ
クに対し不要なブロックの読み込み処理及び不要なブロ
ックの書き出し処理を行っており、システムの処理能力
の低下につながっていた。
Therefore, in the conventional method of reading and writing blocks from a file every time, unnecessary blocks are read from the same block and unnecessary blocks are written into the same block, resulting in a decrease in the processing capacity of the system. It was connected.

【0008】[0008]

【課題を解決するための手段】レコード位置判定手段
と、ファイル読み込み手段と、一時記憶手段と、レコー
ド挿入手段と、ファイル書き出し手段とを有し、レコー
ドを挿入するブロックのファイル内相対位置および前記
レコードの前記ブロック内相対位置を前記レコード位置
判定手段により求め、前記ファイル読み込み手段にて前
記ファイルから前記ブロックを読み込み、読み込まれた
前記ブロックを一時記憶手段によって保持し、保持され
ている前記ブロックに対して前記レコード挿入手段によ
り前記レコードを挿入した後保持されている前記ブロッ
クを前記ファイル書き出し手段によって前記ファイルに
書き出すデータベースシステムにおいて、前記レコード
位置判定手段によって伝達された前記ブロックを前記フ
ァイルより読み込む必要のある場合のみに前記ファイル
読み込み手段を介して前記ファイルより読み込み読み込
まれた前記ブロックに対する前記レコード挿入手段によ
るレコード挿入処理後レコード挿入後の前記ブロックを
前記ファイルに書き出す処理が必要である場合にのみ前
記ファイル書き出し手段を介して前記ファイルに書き出
すファイル入出力判断手段を備えたことを特徴とする。
A record position determining means, a file reading means, a temporary storage means, a record inserting means, and a file writing means are provided, and the relative position in a file of a block into which a record is inserted and the above-mentioned The relative position within the block of the record is obtained by the record position determination means, the block is read from the file by the file reading means, the read block is held by the temporary storage means, and the held block is stored in the block. On the other hand, in the database system for writing the block held after the record is inserted by the record inserting means to the file by the file writing means, the block transmitted by the record position judging means is read from the file. Only when necessary, after the record insertion processing by the record insertion means for the block read and read from the file through the file reading means, and when the processing for writing the block after the record insertion into the file is necessary. Only the file input / output determining means for writing to the file via the file writing means is provided.

【0009】[0009]

【実施例】次に、本発明の実施例につき図面を参照して
説明する。図1は、本発明の一実施例のデータベースシ
ステムを示す構成図である。
Embodiments of the present invention will now be described with reference to the drawings. FIG. 1 is a configuration diagram showing a database system according to an embodiment of the present invention.

【0010】本実施例のレコード位置判定手段1、ファ
イル読み込み手段3、一時記憶手段4、レコード挿入手
段5、ファイル書き出し手段6は、従来のデータベース
システムと同じ機能であり、本発明ではファイル入出力
判断手段2を新たに追加している。
The record position determining means 1, the file reading means 3, the temporary storage means 4, the record inserting means 5 and the file writing means 6 of this embodiment have the same functions as those of the conventional database system. The judging means 2 is newly added.

【0011】次にこのデータベースシステムの動作を説
明する。
Next, the operation of this database system will be described.

【0012】レコード位置判定手段1は、挿入するレコ
ードが入力されると、レコードを挿入するべきブロック
のファイル内相対位置、及びファイルのブロック内相対
位置を求め、求めたブロックのファイル内相対位置情報
をファイル入出力判断手段2に出力する。
When the record to be inserted is input, the record position judging means 1 obtains the relative position within the file of the block into which the record is to be inserted and the relative position within the block of the file, and the relative position information within the file of the obtained block. Is output to the file input / output determination means 2.

【0013】ファイル入出力判断手段2は、ファイルか
ら読み込みブロックが一時記憶手段4に既に保持されて
いるか否かを確認する。
The file input / output judging means 2 confirms whether or not the read block from the file is already held in the temporary storage means 4.

【0014】このブロックが既に一時記憶手段4に保持
されている場合には、ファイル読み込み処理を省略し、
レコード挿入手段5に制御を渡す。
If this block is already stored in the temporary storage means 4, the file reading process is omitted,
Control is passed to the record insertion means 5.

【0015】一方、このブロックが、一時記憶手段4に
保持されていない場合には、レコード位置判定手段1か
らのブロックのファイル内相対位置情報を、ファイル読
み込み手段3に出力し、ファイル読み込みの指示を与え
る。ファイル読み込み手段3は、指定された位置に存在
するブロックをファイルより読み込む。読み込んだブロ
ックは、一時記憶手段4により保持する。ブロックを保
持した後に、レコード挿入手段5に制御を渡す。
On the other hand, if this block is not held in the temporary storage means 4, the relative position information within the file of the block from the record position determination means 1 is output to the file reading means 3 to instruct the file reading. give. The file reading means 3 reads the block existing at the designated position from the file. The read block is held by the temporary storage means 4. After holding the block, control is passed to the record inserting means 5.

【0016】レコード挿入手段5は、レコードの挿入処
理を実行し、レコード挿入処理の終了後、ファイル入出
力判断手段2にレコードを挿入したブロックのファイル
への書き出しを要求する。ファイル入出力判断手段2
は、要求されたブロックのファイルへの書き出しの必要
性をチェックし、必要な場合のみファイルき書き出し手
段6にファイル書き出し指示を与える。指示を受けたフ
ァイル書き出し手段6は、ブロックをファイルに書き出
す。ファイル入出力判断手段2により、ファイルへの書
き出しが必要でないと判断された場合には、ファイルへ
の書き出し処理を省略する。
The record inserting means 5 executes the record inserting processing, and after the record inserting processing is completed, requests the file input / output judging means 2 to write the block in which the record is inserted into the file. File input / output determination means 2
Checks the necessity of writing the requested block to a file, and gives a file writing instruction to the file writing / writing means 6 only when necessary. Upon receiving the instruction, the file writing means 6 writes the block to the file. If the file input / output determination unit 2 determines that writing to the file is not necessary, the writing process to the file is omitted.

【0017】以上のように、既に読み込まれているブロ
ックを再度読み込むことをなくし、また、同一のブロッ
クをレコードが挿入される度に毎回書き出すことをなく
すことにより、余分な処理を省きデータベースシステム
の処理能力を向上させることができる。
As described above, by eliminating the re-reading of the already read block and by not writing out the same block each time a record is inserted, extra processing is omitted and the database system is saved. The processing capacity can be improved.

【0018】[0018]

【発明の効果】以上の説明で明らかであるように、本発
明によりデータベースシステムのレコード挿入の処理効
率が向上する効果がある。
As is apparent from the above description, the present invention has the effect of improving the record insertion processing efficiency of the database system.

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

【図1】本発明のデータベースシステムの構成図であ
る。
FIG. 1 is a configuration diagram of a database system of the present invention.

【図2】従来技術のデータベースシステムの構成図であ
る。
FIG. 2 is a configuration diagram of a conventional database system.

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

1 レコード位置判定手段 2 ファイル入出力判定手段 3 ファイル読み込み手段 4 一時記憶手段 5 レコード挿入手段 6 ファイルき書き出し手段 1 record position judging means 2 file input / output judging means 3 file reading means 4 temporary storage means 5 record inserting means 6 file writing / writing means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 レコード位置判定手段と、ファイル読み
込み手段と、一時記憶手段と、レコード挿入手段と、フ
ァイル書き出し手段とを有し、レコードを挿入するブロ
ックのファイル内相対位置および前記レコードの前記ブ
ロック内相対位置を前記レコード位置判定手段により求
め、前記ファイル読み込み手段にて前記ファイルから前
記ブロックを読み込み、読み込まれた前記ブロックを一
時記憶手段によって保持し、保持されている前記ブロッ
クに対して前記レコード挿入手段により前記レコードを
挿入した後保持されている前記ブロックを前記ファイル
書き出し手段によって前記ファイルに書き出すデータベ
ースシステムにおいて、前記レコード位置判定手段によ
って伝達された前記ブロックを前記ファイルより読み込
む必要のある場合のみに前記ファイル読み込み手段を介
して前記ファイルより読み込み読み込まれた前記ブロッ
クに対する前記レコード挿入手段によるレコード挿入処
理後レコード挿入後の前記ブロックを前記ファイルに書
き出す処理が必要である場合にのみ前記ファイル書き出
し手段を介して前記ファイルに書き出すファイル入出力
判断手段を備えたことを特徴とするデータベースシステ
ム。
1. A record position determination means, a file reading means, a temporary storage means, a record insertion means, and a file writing means, and a relative position in a file of a block into which a record is inserted and the block of the record. The inner relative position is obtained by the record position determination means, the block is read from the file by the file reading means, the read block is held by the temporary storage means, and the record is stored for the held block. In a database system in which the block held after inserting the record by the inserting unit is written to the file by the file writing unit, when the block transmitted by the record position determining unit needs to be read from the file Only after the record insertion processing by the record insertion means for the block read and read from the file through the file reading means, the block writing after the record insertion into the file is necessary. A database system comprising a file input / output judging means for writing the file to the file via a means.
JP4186422A 1992-07-14 1992-07-14 Data base system Pending JPH0635769A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4186422A JPH0635769A (en) 1992-07-14 1992-07-14 Data base system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4186422A JPH0635769A (en) 1992-07-14 1992-07-14 Data base system

Publications (1)

Publication Number Publication Date
JPH0635769A true JPH0635769A (en) 1994-02-10

Family

ID=16188153

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4186422A Pending JPH0635769A (en) 1992-07-14 1992-07-14 Data base system

Country Status (1)

Country Link
JP (1) JPH0635769A (en)

Similar Documents

Publication Publication Date Title
US6256232B1 (en) Data access method capable of reducing the number of erasing to flash memory and data patch and access device using the same
JPH0635769A (en) Data base system
US5170479A (en) File block managing system using next record header position data and delete history data from block header and record headers to locate requested record block
EP0539966B1 (en) A magneto-optical disc control system and method
US6112261A (en) Data transferring system reading and temporarily storing a record until a length of the record is different from a defined record length parameter value
JP4059452B2 (en) IC card
JPH0793101A (en) Data backup device
JPH05342817A (en) File management method and information recording and reproducing device
JP2549155Y2 (en) Optical filing system
JPS62192826A (en) File writing system
JP2747009B2 (en) Record addition method for indexed sequential files
JPS62137646A (en) Back-up file preparing system
JPH05151037A (en) Reorganization processing system for database in business processing
JPS6346553A (en) File copying method
JP2000047917A (en) File managing method and filing system
JPS63140350A (en) System for reducing output quantity of recovery point log
JP2946941B2 (en) File device
JPH03280136A (en) Record positioning system for sequentially programmed file
JPH054695B2 (en)
JPS63285787A (en) Information recording card system
JPH0334178A (en) Time series data editing system
JPH03257521A (en) Medium copy system
JPH05165686A (en) Data store control system
JPH05324217A (en) Information storage device controller
JPH0887829A (en) Data managing system for optical disc

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19981124