JPH0877044A - Data base controller - Google Patents

Data base controller

Info

Publication number
JPH0877044A
JPH0877044A JP6214412A JP21441294A JPH0877044A JP H0877044 A JPH0877044 A JP H0877044A JP 6214412 A JP6214412 A JP 6214412A JP 21441294 A JP21441294 A JP 21441294A JP H0877044 A JPH0877044 A JP H0877044A
Authority
JP
Japan
Prior art keywords
record
data
database
stored
memory
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.)
Withdrawn
Application number
JP6214412A
Other languages
Japanese (ja)
Inventor
Masashi Enomoto
正志 榎本
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP6214412A priority Critical patent/JPH0877044A/en
Publication of JPH0877044A publication Critical patent/JPH0877044A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE: To prevent the retrieval process speed of data from decreasing by compressing data stored in a data base in record units, expanding them in a memory, and retrieving the data stored in the memory at a request from an application. CONSTITUTION: The data in the data base stored on a hard disk 2 are compressed in record units and expanded in the memory 3. Then the data stored in the memory 3 are retrieved at the request from the application. Therefore, even when the data base is large in volume, the whole data base can be stored in the memory 3 or even if the whole data base can not be stored in the memory 3, the frequency of swapping can be decreased; and further the compressed data base in the memory 3 can be discriminated, so the retrieval process speed of the data can be prevented from decreasing.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データベースの管理、
制御を行うデータベースマネジメントシステムなどに用
いて好適なデータベース制御装置に関する。
BACKGROUND OF THE INVENTION The present invention relates to database management,
The present invention relates to a database control device suitable for use in a database management system for controlling.

【0002】[0002]

【従来の技術】図9は、従来のデータベースマネジメン
トシステム(DataBase Management System:DBMS)
を適用したデータベース装置の一例の構成を示してい
る。レコード単位でデータを記憶しているデータベース
は、低速ではあるが、大容量のハードディスク102
に、ファイルとして記憶されている。ハードディスク1
02に記憶されたデータベースは、CPU101により
読み出され、小容量ではあるが、高速のメモリ(例え
ば、RAMなど)103に供給されて記憶される(メモ
リ103に展開される)。
2. Description of the Related Art FIG. 9 shows a conventional database management system (DBMS).
The structure of an example of the database apparatus to which is applied is shown. A database that stores data in record units is a low-speed but large-capacity hard disk 102.
Is stored as a file. Hard disk 1
The database stored in 02 is read by the CPU 101 and supplied to and stored in a high-speed memory (for example, RAM) 103 having a small capacity (stored in the memory 103).

【0003】CPU101は、所定のアプリケーション
プログラムを実行し、そのアプリケーションプログラム
からデータの検索処理の要求があると、RAM103に
記憶されたデータベースから、検索の要求があったデー
タを検索し、アプリケーションプログラムに渡すように
なされている。
The CPU 101 executes a predetermined application program, and when there is a request for a data search process from the application program, the CPU 101 searches the database stored in the RAM 103 for the data requested to be searched, and stores it in the application program. It is designed to be handed over.

【0004】このように、従来のデータベース装置で
は、(ハードディスク102などと比較して)高速のメ
モリ103にデータベースを展開することにより、デー
タの検索処理を高速化で行うことができるようになされ
ている。
As described above, in the conventional database apparatus, the data retrieval processing can be performed at high speed by expanding the database in the high-speed memory 103 (compared to the hard disk 102 etc.). There is.

【0005】また、CPU101は、1回のデータの検
索処理中に、一度アクセスして抽出したレコード(レコ
ードそのものでも良いが、そのレコードを識別できるコ
ードなどでも良い)を記憶しておき、その後アクセスし
たレコードが、既に記憶したレコードと同一であるとき
には、そのレコードを抽出しない(アプリケーションプ
ログラムで処理しない)ようになされている。
Further, the CPU 101 stores a record that has been accessed and extracted once during one data search process (the record itself may be used, or a code that can identify the record may be used) and then accessed. When the recorded record is the same as the already stored record, the record is not extracted (not processed by the application program).

【0006】このようにして、従来のデータベース装置
においては、同一のレコードに記憶されたデータが、重
複してアプリケーションプログラムで処理されることに
よる、アプリケーションプログラムの誤動作を防止する
ことができるようになされている。
In this way, in the conventional database device, it is possible to prevent malfunction of the application program due to duplicate processing of data stored in the same record by the application program. ing.

【0007】[0007]

【発明が解決しようとする課題】ところで、データベー
スに記憶させるデータの増加とともに、そのファイルサ
イズも増加する。従って、データベースのファイルサイ
ズが、メモリ103の容量を超えた場合には、メモリ1
03に、その一部しか記憶させることができなくなり、
その結果、例えばデータベースのデータ全体が検索対象
とされた場合には、メモリ103に記憶させるデータの
入れ替え、即ちスワッピング(メモリスワッピング)を
行う必要を生じる。
By the way, as the data stored in the database increases, the file size thereof also increases. Therefore, if the file size of the database exceeds the capacity of the memory 103, the memory 1
In 03, only part of it can be stored,
As a result, for example, when the entire data of the database is to be searched, it is necessary to replace the data stored in the memory 103, that is, swap (memory swapping).

【0008】ここで、図10は、スワッピングの様子を
示している。ハードディスク102に記憶されているデ
ータベースのうち、メモリ103が記憶可能な分だけの
レコードは、メモリ103に展開される。また、例えば
ハードディスク102やその他の2次記憶媒体(例え
ば、RAMディスクなど)(図示せず)に、スワップエ
リア111が確保され、そこには、メモリ103に記憶
させ切れないレコードが記憶される。スワップエリア1
11に記憶されたレコードに対するアクセスが生じたと
きには、メモリ103に記憶されたレコードのうち、例
えば最近アクセスされていないレコードが、スワップエ
リア111に転送されて記憶されるとともに、スワップ
エリア111に記憶されていたレコードが、メモリ10
3に転送されて記憶される。このようにして、メモリ1
03に記憶させるデータが入れ替えられる。
Here, FIG. 10 shows a state of swapping. Of the databases stored in the hard disk 102, as many records as the memory 103 can store are expanded in the memory 103. Further, for example, a swap area 111 is secured in the hard disk 102 or another secondary storage medium (for example, a RAM disk or the like) (not shown), and records that cannot be stored in the memory 103 are stored therein. Swap area 1
When the record stored in 11 is accessed, of the records stored in the memory 103, for example, a record that has not been accessed recently is transferred to and stored in the swap area 111 and also stored in the swap area 111. The record that was on the memory 10
3 is stored and stored. In this way, memory 1
The data to be stored in 03 is replaced.

【0009】データベースのファイルサイズが、メモリ
103の容量に比較して、それほど大きくない場合は、
スワッピングの回数は少なくて済むが、データベースの
ファイルサイズが、メモリ103の容量に比較して、か
なり大きくなると、スワッピングが頻繁に発生するよう
になり、メモリ103に対するアクセス速度が低下す
る。従って、この場合、データの検索処理が遅くなる課
題があった。
When the file size of the database is not so large as compared with the capacity of the memory 103,
Although the number of times of swapping may be small, if the file size of the database becomes considerably larger than the capacity of the memory 103, swapping will frequently occur, and the access speed to the memory 103 will decrease. Therefore, in this case, there is a problem that the data search process becomes slow.

【0010】そこで、図11に示すように、データベー
スを圧縮し、そのファイルサイズを縮小して、メモリ1
03に展開する方法が考えられるが、データベース全体
(ファイル全体)を圧縮すると、その圧縮結果は、元の
データベースの構造とは異なるものとなり、そのままで
は、レコードに対してアクセスできなくなるため、その
伸張を行う必要があった。このため、やはりデータの検
索処理が遅くなる課題があった。
Therefore, as shown in FIG. 11, the database is compressed, its file size is reduced, and the memory 1
Although the method of expanding to 03 is conceivable, if the entire database (entire file) is compressed, the compression result will be different from the original database structure, and the record cannot be accessed as it is. Had to do. For this reason, there is still a problem that the data search process is delayed.

【0011】一方、上述した1回のデータの検索処理中
に、一度アクセスして抽出したレコードを記憶してお
き、その後アクセスしたレコードが、既に記憶したレコ
ードと同一であるときには、そのレコードを抽出しない
ようにする処理(アプリケーションプログラムで処理し
ないようにする処理)は、一般的には、アプリケーショ
ンプログラムの一部分がCPU101により実行される
ことにより行われるようになされている。即ち、従来で
は、アプリケーションプログラムが、上述の処理を担当
するようになされており、従ってアプリケーションプロ
グラムが複雑になり、その作成には、多大な労力を必要
としていた。
On the other hand, during the above-described one-time data retrieval processing, the record accessed and extracted once is stored, and when the record accessed thereafter is the same as the record already stored, that record is extracted. The processing (processing not to be processed by the application program) is generally performed by the CPU 101 executing a part of the application program. That is, conventionally, the application program is in charge of the above-described processing, and therefore the application program becomes complicated, and a lot of labor is required to create the application program.

【0012】また、上述の処理を行うにあたっては、一
度アクセスして抽出したレコードを記憶する領域を、例
えばメモリ103に確保する必要があるが、この場合、
メモリ103に記憶されるレコードの数は、最悪の場合
で、データベースのレコードの数と同一となるから、メ
モリ103の記憶領域が圧迫され、これによりスワッピ
ングが頻繁に発生するようになり、やはりデータの検索
処理が遅くなる課題があった。
Further, in performing the above-mentioned processing, it is necessary to secure an area for storing the record once accessed and extracted, for example, in the memory 103. In this case,
In the worst case, the number of records stored in the memory 103 will be the same as the number of records in the database, so the storage area of the memory 103 will be compressed, and this will cause frequent swapping. There was a problem that the search process of was slowed down.

【0013】本発明は、このような状況に鑑みてなされ
たものであり、データの検索処理速度の低下を防止する
ことができるようにするものである。
The present invention has been made in view of such a situation, and it is possible to prevent a decrease in data retrieval processing speed.

【0014】[0014]

【課題を解決するための手段】本発明の第1のデータベ
ース制御装置は、データを記憶しているデータベース
と、データベースに記憶されたデータを展開するメモリ
(例えば、図1に示すメモリ3など)とを備えるデータ
ベース装置を制御するデータベース制御装置であって、
データベースに記憶されたデータを、レコード単位で圧
縮して、メモリに展開し、アプリケーションからの要求
に応じて、メモリに記憶されたデータを検索することを
特徴とする。
A first database control device of the present invention is a database storing data and a memory for expanding the data stored in the database (for example, the memory 3 shown in FIG. 1). A database control device for controlling a database device comprising:
The data stored in the database is compressed in record units, expanded in a memory, and the data stored in the memory is searched in response to a request from an application.

【0015】このデータベース制御装置においては、デ
ータベースに記憶されたデータをメモリに展開するのに
スワッピングが必要なときのみ、データベースに記憶さ
れたデータを、レコード単位で圧縮させることができ
る。
In this database control device, the data stored in the database can be compressed in record units only when swapping is required to expand the data stored in the database into the memory.

【0016】本発明の第2のデータベース制御装置は、
アプリケーションからの要求に応じて、データベースの
データから、所定のレコードのデータを検索するデータ
ベース制御装置であって、レコードは、所定の値を記憶
する値記憶部(例えば、図3に示すフラグ記憶部など)
と、データを記憶するデータ記憶部(例えば、図3に示
すデータ記憶部など)とを含み、アプリケーションから
の要求に対し、その要求に固有の値を割り当て、アプリ
ケーションからの要求に応じて検索したデータが記憶さ
れたレコードの値記憶部の記憶値が、アプリケーション
からの要求に割り当てられた固有の値と異なるとき、そ
のレコードのデータ記憶部に記憶されたデータを、アプ
リケーションに渡し、アプリケーションからの要求に応
じて検索したデータが記憶されたレコードの値記憶部
に、固有の値を記憶させることを特徴とする。
A second database control device of the present invention is
A database control device that retrieves data of a predetermined record from data of a database in response to a request from an application, and the record is a value storage unit (for example, a flag storage unit illustrated in FIG. 3) that stores a predetermined value. Such)
And a data storage unit for storing data (for example, the data storage unit shown in FIG. 3), a unique value is assigned to a request from an application, and a search is performed according to the request from the application. When the value stored in the value storage of the record in which the data is stored differs from the unique value assigned to the request from the application, the data stored in the data storage of the record is passed to the application, It is characterized in that a unique value is stored in the value storage unit of the record in which the data retrieved in response to the request is stored.

【0017】このデータベース制御装置においては、固
有の値を、アプリケーションからの要求があった日時に
対応するタイムスタンプとすることができる。また、レ
コードが、所定の属性の親に属している場合、アプリケ
ーションからの要求に応じて、データの検索を行う際の
条件には、データが属する親を限定する親限定条件を、
少なくとも含ませ、親限定条件に合致するレコードの値
記憶部に、固有の値を記憶させることができる。
In this database control device, the unique value can be used as the time stamp corresponding to the date and time when the application makes a request. Further, when the record belongs to a parent of a predetermined attribute, in response to a request from the application, a condition for performing a data search includes a parent limiting condition that limits the parent to which the data belongs,
A unique value can be stored in the value storage unit of a record that contains at least the parent limitation condition.

【0018】[0018]

【作用】本発明の第1のデータベース制御装置において
は、例えばハードディスク2に記憶されたデータベース
のデータが、レコード単位で圧縮されて、メモリ3に展
開される。そして、アプリケーションからの要求に応じ
て、メモリ3に記憶されたデータが検索される。従っ
て、データベースが大容量であっても、その全体を、メ
モリ3に記憶させることができ、あるいは、その全体を
メモリ3に記憶させることができなくても、スワッピン
グの回数を少なくすることができ、さらに、メモリ3上
の圧縮されたデータベースのレコードの識別が可能であ
るから、データの検索処理速度の低下を防止することが
できる。
In the first database control apparatus of the present invention, the data of the database stored in the hard disk 2, for example, is compressed in record units and expanded in the memory 3. Then, the data stored in the memory 3 is searched in response to the request from the application. Therefore, even if the database has a large capacity, the entire database can be stored in the memory 3, or even if the entire database cannot be stored in the memory 3, the number of swapping can be reduced. Further, since it is possible to identify the record of the compressed database on the memory 3, it is possible to prevent the reduction of the data search processing speed.

【0019】本発明の第2のデータベース制御装置にお
いては、アプリケーションからの要求に応じて、データ
ベースのデータから、所定のレコードのデータが検索さ
れる。この場合において、アプリケーションからの要求
に対し、その要求に固有の値が割り当てられ、アプリケ
ーションからの要求に応じて検索したデータが記憶され
たレコードのフラグ記憶部の記憶値が、アプリケーショ
ンからの要求に割り当てられた固有の値と異なるとき、
そのレコードのデータ記憶部に記憶されたデータが、ア
プリケーションに渡される。そして、アプリケーション
からの要求に応じて検索したデータが記憶されたレコー
ドのフラグ記憶部には、固有の値が記憶される。従っ
て、1回のデータの検索処理中に、一度アクセスして抽
出したレコード再度抽出することを防止するのに、その
レコードを記憶しておかずに済むので、装置が有するメ
モリの記憶領域を圧迫することを防止することができ
る。その結果、データの検索処理速度の低下を防止する
ことができる。
In the second database control apparatus of the present invention, the data of the predetermined record is retrieved from the data of the database in response to the request from the application. In this case, a value unique to the request is assigned to the request from the application, and the storage value of the flag storage unit of the record in which the data retrieved in response to the request from the application is stored corresponds to the request from the application. When it is different from the assigned unique value,
The data stored in the data storage unit of the record is passed to the application. Then, a unique value is stored in the flag storage unit of the record in which the data retrieved in response to the request from the application is stored. Therefore, in order to prevent re-extraction of a record that has been accessed and extracted once during one data retrieval process, it is not necessary to store the record, and the storage area of the memory of the device is squeezed. Can be prevented. As a result, it is possible to prevent a decrease in the data search processing speed.

【0020】[0020]

【実施例】図1は、本発明を適用したデータベースマネ
ジメントシステムにより管理、制御されるデータベース
装置の一実施例の構成を示している。なお、データベー
スマネジメントシステムは、例えばソフトウェアで実現
され、そのプログラムは、低速ではあるが、大容量のメ
ディアである、例えばハードディスク2に記憶(記録)
されている。
FIG. 1 shows the configuration of an embodiment of a database device managed and controlled by a database management system to which the present invention is applied. The database management system is realized by, for example, software, and the program is stored (recorded) in the hard disk 2, which is a medium having a large capacity at a low speed.
Have been.

【0021】ハードディスク2には、上述したデータベ
ースマネジメントシステムのプログラムの他、データベ
ース、そのデータベースを利用するアプリケーションプ
ログラムなどが記憶されている。CPU1は、ハードデ
ィスク2に記憶されたプログラムを、小容量ではある
が、高速のメディアである、例えばメモリ(例えば、R
AMなどでなる)3にロードさせて実行するようになさ
れている。また、CPU1は、ポインティングデバイス
5やキーボード6の操作に応じて、所定の処理を行うよ
うになされている。さらに、CPU1は、CRT4の表
示制御、およびハードディスク2やメモリ3に対するデ
ータの読み書き制御なども行うようになされている。
The hard disk 2 stores a database, an application program that uses the database, and the like, in addition to the programs of the database management system described above. The CPU 1 executes a program stored in the hard disk 2 as a medium having a small capacity but high speed, for example, a memory (for example, R
It is designed to be loaded and executed in 3). Further, the CPU 1 is adapted to perform a predetermined process according to the operation of the pointing device 5 or the keyboard 6. Further, the CPU 1 is also configured to perform display control of the CRT 4 and read / write control of data with respect to the hard disk 2 and the memory 3.

【0022】メモリ3は、CPU1の動作上必要なデー
タやプログラムなどを記憶するようになされている。C
RT4は、CPU1の制御にしたがった表示を行うよう
になされている。ポインティングデバイス5およびキー
ボード6は、CPU1に対し、所定の入力を行うときに
操作される。なお、ポインティングデバイス5は、例え
ばマウスやペンなどで構成される。
The memory 3 stores data and programs necessary for the operation of the CPU 1. C
The RT4 is adapted to display according to the control of the CPU1. The pointing device 5 and the keyboard 6 are operated when performing a predetermined input to the CPU 1. The pointing device 5 is composed of, for example, a mouse or a pen.

【0023】次に、その動作について説明する。装置が
起動されると、ハードディスク2に記憶されたデータベ
ースマネジメントシステムのプログラムは、メモリ3に
ロードされる。そして、CPU1は、メモリ3にロード
されたデータベースマネジメントシステムのプログラム
を実行し、これによりデータベースをメモリ3に展開さ
せる。即ち、CPU1は、図2に示すように、ハードデ
ィスク2に記憶されたデータベースのデータを、レコー
ド単位で圧縮して、メモリ3に転送して記憶させる(メ
モリ3に展開させる)。
Next, the operation will be described. When the device is started up, the program of the database management system stored in the hard disk 2 is loaded into the memory 3. Then, the CPU 1 executes the program of the database management system loaded in the memory 3 to expand the database in the memory 3. That is, as shown in FIG. 2, the CPU 1 compresses the data of the database stored in the hard disk 2 in record units, transfers the data to the memory 3, and stores the compressed data (decompresses in the memory 3).

【0024】その後、ポインティングデバイス5やキー
ボード6が操作され、これによりCPU1に対し、ハー
ドディスク2に記憶されたアプリケーションプログラム
の起動が指令されると、CPU1は、そのアプリケーシ
ョンプログラムを、メモリ3にロードさせて実行する。
After that, when the pointing device 5 and the keyboard 6 are operated to instruct the CPU 1 to start the application program stored in the hard disk 2, the CPU 1 loads the application program into the memory 3. To execute.

【0025】そして、アプリケーションプログラムから
データベースの検索処理の要求があると、CPU1は、
その要求に応じたデータを、データベースマネジメント
システムのプログラムにしたがって、メモリ3に記憶さ
れたデータベースのデータから検索する。
When a database search request is issued from the application program, the CPU 1
The data corresponding to the request is searched from the database data stored in the memory 3 according to the program of the database management system.

【0026】ここで、メモリ3に記憶されたデータベー
スは、上述したようにレコード単位で圧縮されているか
ら、そのレコードを識別することができる。従って、C
PU1は、その圧縮されたデータベースから、アプリケ
ーションプログラムの要求に応じたデータを検索するこ
とができる。
Since the database stored in the memory 3 is compressed in record units as described above, the record can be identified. Therefore, C
PU1 can retrieve the data according to the request of the application program from the compressed database.

【0027】CPU1は、アプリケーションプログラム
の要求に応じたデータを得ると、データベースマネジメ
ントシステムのプログラムにしたがい、そのデータを伸
張して、アプリケーションプログラムに渡す。アプリケ
ーションプログラムでは、検索の結果得られたデータを
用いて、所定の処理が行われる(この処理は、CPU1
がアプリケーションプログラムにしたがって行う)。
When the CPU 1 obtains the data according to the request of the application program, the CPU 1 decompresses the data according to the program of the database management system and transfers the data to the application program. In the application program, a predetermined process is performed using the data obtained as a result of the search (this process is performed by the CPU 1
Is done according to the application program).

【0028】以上のように、データベースを、レコード
の識別が可能なように圧縮するようにしたので、従っ
て、データベースが大容量化しても、スワッピングの回
数を少なくすることができ、データの検索処理速度の低
下を防止することができる。また、データベースの容量
が同一ならば、従来に比較して、データの検索処理速度
を向上させることができる。
As described above, the database is compressed so that records can be identified. Therefore, even if the database has a large capacity, the number of swapping operations can be reduced and the data retrieval process can be performed. It is possible to prevent the speed from decreasing. Further, if the databases have the same capacity, the data retrieval processing speed can be improved as compared with the conventional case.

【0029】さらに、データの圧縮および伸張処理は、
データベースマネジメントシステムのプログラムによっ
て行われるので、アプリケーションプログラムには、そ
のような処理を含ませる必要がなく、従って、アプリケ
ーションプログラムを、容易に作成することが可能とな
る。
Further, data compression and decompression processing are
Since it is performed by the program of the database management system, it is not necessary to include such processing in the application program, so that the application program can be easily created.

【0030】なお、データベースの圧縮は、データベー
スの容量が、メモリ3の記憶容量より大きく、従ってデ
ータベースを、そのままメモリ3に展開すると、スワッ
ピングが必要になるときのみ行うようにすることが可能
である。これは、データベースマネジメントシステムの
プログラムに、データベースの容量と、メモリ3の記憶
容量とを比較させることにより行わせるようにすること
ができる。
It should be noted that the database can be compressed only when the database has a larger capacity than the storage capacity of the memory 3 and therefore the database is directly expanded in the memory 3 when swapping is required. . This can be performed by causing the program of the database management system to compare the capacity of the database with the storage capacity of the memory 3.

【0031】次に、図1のデータベース装置において、
ハードディスク2に記憶されているデータベースの各レ
コードは、例えば図3に示すように、レコードナンバ記
憶部、フラグ記憶部、およびデータ記憶部から構成され
ている。レコードナンバ記憶部には、そのレコードに対
して付されたユニークな識別番号としてのレコードナン
バRmが記憶されている。フラグ記憶部には、フラグF
(詳細は、後述する)が記憶される。データ記憶部に
は、実際のデータが記憶されている。
Next, in the database device of FIG.
Each record of the database stored in the hard disk 2 is composed of a record number storage unit, a flag storage unit, and a data storage unit, as shown in FIG. 3, for example. The record number storage unit stores a record number Rm as a unique identification number assigned to the record. Flag F is stored in the flag storage unit.
(Details will be described later) is stored. Actual data is stored in the data storage unit.

【0032】以上のように構成されるレコードは、例え
ばデータ記憶部に記憶されているデータに基づいて分類
され、その分類結果に応じて、図4に示すように、所定
の属性の親Pに属している。なお、レコードは、1つの
親だけに属するのではなく、例えば図5に示すように、
複数の親(図5においては、親PnおよびPn+1)に属す
る場合もある。
The records configured as described above are classified based on, for example, the data stored in the data storage unit, and according to the classification result, as shown in FIG. belong to. Note that a record does not belong to only one parent, for example, as shown in FIG.
It may belong to a plurality of parents (parents Pn and Pn + 1 in FIG. 5).

【0033】ここで、例えばいま、図6に示すように、
レコードナンバR1乃至R5の5つのレコードでなるデ
ータベースを考える。なお、図中、各親P1乃至P6を
始点とし、各レコードを終点とする矢印は、その終点に
おけるレコードが、その始点における親Pに属している
ことを意味する。
Here, for example, as shown in FIG.
Consider a database consisting of five records with record numbers R1 to R5. In the figure, an arrow having each parent P1 to P6 as a starting point and each record as an ending point means that the record at the ending point belongs to the parent P at the starting point.

【0034】図6に示すようなデータベースに対し、例
えば「親P2n(Pに続く数字が偶数の親)に属し、デー
タ記憶部に記憶されているデータが50以上のレコー
ド」という検索条件で、アプリケーションプログラムか
らデータの検索処理の要求があり、特に制限を設けずに
検索を行った場合には、次のような検索結果が、アプリ
ケーションプログラムに渡される。
For a database as shown in FIG. 6, for example, a search condition "a record belongs to a parent P2n (a parent whose number following P is an even number) and the data stored in the data storage section is 50 or more", When there is a request for data search processing from an application program and a search is performed without any particular restriction, the following search results are passed to the application program.

【0035】即ち、この場合、まず親P2に属すレコー
ドナンバR1およびR5のレコードが、検索結果の候補
とされる。(但し、検索は、図中、左側から右側へ行わ
れていくものとする)。
That is, in this case, first, the records of the record numbers R1 and R5 belonging to the parent P2 are set as the search result candidates. (However, the search is performed from left to right in the figure).

【0036】レコードナンバR1またはR5のレコード
のデータ記憶部に記憶されているデータは、それぞれ4
2または72であり、従って、この場合、検索条件に合
致する50以上のデータを有するレコードナンバR5の
レコードが抽出される。
The data stored in the data storage section of the record of record number R1 or R5 is 4 respectively.
2 or 72, and in this case, therefore, the record of the record number R5 having 50 or more data matching the search condition is extracted.

【0037】そして、次は、親P4に属すレコードナン
バR3のレコードが、検索結果の候補とされる。このレ
コードのデータ記憶部に記憶されているデータは55で
あり、従って、この場合、レコードナンバR3のレコー
ドは検索条件に合致するので、検索結果として抽出され
る。
Then, next, the record of the record number R3 belonging to the parent P4 is made a candidate for the search result. The data stored in the data storage section of this record is 55. Therefore, in this case, the record with the record number R3 matches the search condition and is extracted as the search result.

【0038】さらに、次は、親P6に属すレコードナン
バR3およびR5のレコードが、検索結果の候補とされ
る。これらのレコードのデータ記憶部に記憶されている
データは、いずれも検索条件に合致し、従って、この場
合、レコードナンバR3およびR5のレコードの両方
が、再度、検索結果として抽出される。
Next, the records of record numbers R3 and R5 belonging to the parent P6 are candidates for the search result. The data stored in the data storage unit of these records all match the search condition, and therefore, in this case, both the records of record numbers R3 and R5 are extracted again as the search result.

【0039】以上から、検索結果として、レコードナン
バR5,R3,R3,R5のレコードが順次得られ、こ
れによりレコードナンバR3またはR5のレコードが、
それぞれ重複して、アプリケーションプログラムに渡さ
れる。
From the above, the records with record numbers R5, R3, R3, and R5 are sequentially obtained as the search result, and the record with the record number R3 or R5 is obtained.
Each is duplicated and passed to the application program.

【0040】この場合、アプリケーションプログラムで
は、レコードナンバR3およびR5のレコードに記憶さ
れたデータが、重複して処理されることになり、従っ
て、同一のレコードが重複して、アプリケーションプロ
グラムに渡されるのを防止する必要がある。
In this case, in the application program, the data stored in the records of record numbers R3 and R5 will be processed in duplicate, and therefore the same record will be passed in duplicate to the application program. Need to be prevented.

【0041】そこで、図1のデータベース装置では、ア
プリケーションプログラムからの要求に応じて、データ
ベースのデータから、所定のレコードのデータを検索す
る場合において、まず最初に、アプリケーションプログ
ラムからの要求に対し、その要求に固有の値が割り当て
られる(これは、データベースマネジメントシステムの
プログラムにしたがってCPU1により行われる)。
Therefore, in the database apparatus of FIG. 1, when the data of a predetermined record is searched from the data of the database in response to the request from the application program, first, in response to the request from the application program, A unique value is assigned to the request (this is done by the CPU 1 according to the program of the database management system).

【0042】ここで、アプリケーションプログラムから
の要求に対して割り当てられる固有の値としては、例え
ばその要求があった日時に対応するタイムスタンプなど
が用いられる。
Here, as the unique value assigned to the request from the application program, for example, a time stamp corresponding to the date and time of the request is used.

【0043】そして、CPU1によって、上述したよう
に検索が行われ、検索条件に合致するレコードが得られ
ると、そのレコードのフラグ記憶部に記憶されたフラグ
Fが、アプリケーションからの要求に割り当てられたタ
イムスタンプと一致するか否かが判定される。そして、
そのレコードのフラグ記憶部に記憶されたフラグFが、
タイムスタンプと一致すると判定された場合、そのレコ
ードは、アプリケーションプログラムに渡されず、異な
る(一致しない)と判定された場合のみ、そのレコード
は、アプリケーションプログラムに渡される。
When the CPU 1 performs the search as described above and a record matching the search condition is obtained, the flag F stored in the flag storage section of the record is assigned to the request from the application. It is determined whether the time stamps match. And
The flag F stored in the flag storage unit of the record is
If it is determined that the record matches the time stamp, the record is not passed to the application program, and only if it is determined to be different (does not match), the record is passed to the application program.

【0044】その後、データベースの、そのレコードの
フラグ記憶部には、タイムスタンプが、フラグFとして
記憶される(フラグFにタイムスタンプが反映され
る)。
After that, the time stamp is stored as the flag F in the flag storage portion of the record in the database (the time stamp is reflected in the flag F).

【0045】以上から、図1のデータベース装置におい
て、アプリケーションプログラムから、図6における場
合と同様の検索条件によるデータの検索処理があった場
合、それは、次のように行われる。
From the above, in the database apparatus of FIG. 1, when the application program performs the data retrieval processing under the retrieval condition similar to that in FIG. 6, it is performed as follows.

【0046】即ち、まず最初に、アプリケーションプロ
グラムからの要求に対し、その要求にタイムスタンプが
割り当てられる。なお、ここでは、説明を簡単にするた
めに、タイムスタンプを、例えば1とする。また、デー
タベースの各レコードのフラグ記憶部に記録されている
フラグFは、図6に示したように、1以外の値である、
例えば0にされているものとする。
That is, first, for a request from an application program, a time stamp is assigned to the request. Note that the time stamp is set to 1, for example, in order to simplify the description. The flag F recorded in the flag storage unit of each record of the database is a value other than 1 as shown in FIG.
For example, it is assumed to be 0.

【0047】この場合、上述したように、まず親P2に
属すレコードナンバR1およびR5のうちのR5のレコ
ードが抽出される。そして、このレコードのフラグ記憶
部に記憶されたフラグFが、アプリケーションからの要
求に割り当てられたタイムスタンプと一致するか否かが
判定される。いまの場合、レコードナンバR5のレコー
ドのフラグFは、0であるから、フラグFは、タイムス
タンプと異なると判定され、このレコードは、アプリケ
ーションプログラムに渡される。
In this case, as described above, first, the record of R5 of the record numbers R1 and R5 belonging to the parent P2 is extracted. Then, it is determined whether or not the flag F stored in the flag storage unit of this record matches the time stamp assigned to the request from the application. In this case, since the flag F of the record of the record number R5 is 0, it is determined that the flag F is different from the time stamp, and this record is passed to the application program.

【0048】そして、図7に示すように、このレコード
ナンバR5のレコードのフラグ記憶部には、タイムスタ
ンプが、フラグFとして記憶される。即ち、レコードナ
ンバR5のレコードのフラグFは1とされる。
Then, as shown in FIG. 7, the time stamp is stored as the flag F in the flag storage portion of the record of the record number R5. That is, the flag F of the record of the record number R5 is set to 1.

【0049】次は、親P4に属すレコードナンバR3の
レコードが抽出される。いま、このレコードのフラグF
は0であるから、上述したレコードナンバR5のレコー
ドと同様に、レコードナンバR3のレコードは、アプリ
ケーションプログラムに渡され、さらに、図7に示すよ
うに、そのフラグ記憶部には、タイムスタンプが、フラ
グFとして記憶される。
Next, the record of the record number R3 belonging to the parent P4 is extracted. Now, the flag F of this record
Is 0, the record with the record number R3 is passed to the application program, like the record with the record number R5 described above, and further, as shown in FIG. It is stored as a flag F.

【0050】さらに、次は、親P6に属すレコードナン
バR3およびR5のレコードが検索結果として抽出され
る。しかしながら、この場合、レコードナンバR3およ
びR5のレコードのフラグFは、上述したようにいずれ
も1とされており、従って、いずれのフラグFも、タイ
ムスタンプと一致すると判定される。よって、この場
合、レコードナンバR3およびR5のレコードは、いず
れもアプリケーションプログラムに渡されない。
Further, next, records with record numbers R3 and R5 belonging to the parent P6 are extracted as the retrieval result. However, in this case, the flags F of the records of the record numbers R3 and R5 are both set to 1 as described above, and therefore, it is determined that any of the flags F matches the time stamp. Therefore, in this case, neither of the records of record numbers R3 and R5 is passed to the application program.

【0051】以上から、アプリケーションプログラムに
は、検索条件に合致するレコードナンバR3およびR5
のレコードが1つずつ渡されることになる。
From the above, the application programs are provided with record numbers R3 and R5 that match the search conditions.
Will be passed one by one.

【0052】従って、1回のデータの検索処理(アプリ
ケーションプログラムにしたがって行われる、例えばト
ランザクション処理などにおいて行われる検索処理)中
に、一度アクセスして抽出したレコード再度抽出するこ
と(アプリケーションプログラムに渡すこと)を防止す
るのに、そのレコードを記憶しておかずに済むので、メ
モリ3の記憶領域を圧迫することを防止することができ
る。その結果、データの検索処理速度の低下を防止する
ことができる。
Therefore, during one data retrieval process (retrieval process performed according to an application program, for example, transaction process), the record once accessed and extracted again is extracted (passed to the application program). ), It is not necessary to store the record, so that it is possible to prevent the storage area of the memory 3 from being pressed. As a result, it is possible to prevent a decrease in the data search processing speed.

【0053】なお、上述の場合においては、検索条件に
合致するレコードを得た後、そのレコードのフラグ記憶
部に、タイムスタンプをフラグFとして記憶させるよう
にしたが、この他、例えば親に関する条件(上述の場合
は、親Pmの添字mが偶数であること)に合致するレコ
ードが得られた場合に、そのレコードのフラグ記憶部
に、タイムスタンプをセットするようにしても良い。
In the above-mentioned case, after the record matching the search condition is obtained, the time stamp is stored as the flag F in the flag storage section of the record. When a record that matches the subscript m of the parent Pm is an even number in the above case is obtained, a time stamp may be set in the flag storage unit of the record.

【0054】即ち、例えば図7で説明した場合において
は、図8に示すように、検索条件すべてには合致しない
が、そのうちの親に関する条件には合致する、例えば親
P2に属するレコードナンバR1のレコードのフラグ記
憶部に、フラグFとして、タイムスタンプをセットする
ようにすることができる。
That is, for example, in the case described with reference to FIG. 7, as shown in FIG. 8, all the search conditions are not met, but the conditions regarding the parent among them are met, for example, of the record number R1 belonging to the parent P2. A time stamp can be set as the flag F in the flag storage unit of the record.

【0055】この場合、レコードナンバR1のレコード
が、親P2だけでなく、例えば親P4やP6に属すると
きには、このレコードは、親P2に関する検索時だけで
なく、親P4やP6に関する検索時にも、検索結果の候
補とされるが、そのフラグFがタイムスタンプと一致す
るので、そのデータ記憶部に記憶されたデータの評価を
行わずに、検索結果から除外することができる。従っ
て、この場合、検索処理の速度を向上させることができ
る。
In this case, when the record of record number R1 belongs to not only the parent P2 but also the parents P4 and P6, this record is not only searched for the parent P2 but also for the parents P4 and P6. Although it is a candidate for the search result, since the flag F matches the time stamp, it can be excluded from the search result without evaluating the data stored in the data storage unit. Therefore, in this case, the speed of the search process can be improved.

【0056】また、図3乃至図8で説明したような検索
は、データベースをメモリ3に展開して行うこともでき
るし、ハードディスク2に記憶されているデータベース
を対象として行うこともできる。
Further, the search as described with reference to FIGS. 3 to 8 can be performed by expanding the database in the memory 3 or can be performed on the database stored in the hard disk 2.

【0057】さらに、図3乃至図8で説明した場合にお
いては、データベースマネジメントシステムで、検索条
件のすべてを判定するようにしたが、例えばデータベー
スマネジメントシステムには、上述した親に関する条件
のみを判定させ、その他のデータ記憶部に記憶されたデ
ータについての条件は、アプリケーションプログラムに
判定させる(データの評価をアプリケーションプログラ
ムに行わせる)ようにすることが可能である。
Further, in the case described with reference to FIGS. 3 to 8, the database management system determines all the search conditions. However, for example, the database management system is caused to determine only the above-mentioned conditions relating to the parent. The other conditions for the data stored in the data storage unit can be determined by the application program (the application program is evaluated).

【0058】また、図3乃至図8で説明した場合では、
フラグ記憶部に、タイムスタンプをセットするようにし
たが、この他、例えば一度抽出されたレコードのフラグ
記憶部の所定のビットをたてるようにし、そのビットに
基づいて、抽出されたレコードをアプリケーションプロ
グラムに渡すかどうかを決めるようにすることも可能で
ある。但し、この場合、検索処理が終了するたびに、そ
のビットをクリアする必要があり、従って処理が煩雑に
なるので、上述したように、タイムスタンプなどの、ア
プリケーションプログラムの要求に固有の値を用いるよ
うにする方が好ましい。即ち、アプリケーションプログ
ラムの要求に割り当てた固有の値を用いる場合には、フ
ラグ記憶部のクリアを行わずに済み、処理の煩雑化、デ
ータベースマネジメントシステムのプログラムの複雑化
を防止することができる。
In the case described with reference to FIGS. 3 to 8,
Although the time stamp is set in the flag storage unit, in addition to this, for example, a predetermined bit in the flag storage unit of the once-extracted record is set, and the extracted record is applied to the application based on the bit. It is also possible to decide whether to pass it to the program. However, in this case, since it is necessary to clear the bit each time the search processing is completed, and therefore the processing becomes complicated, as described above, a value unique to the request of the application program such as a time stamp is used. It is preferable to do so. That is, when the unique value assigned to the request of the application program is used, it is not necessary to clear the flag storage unit, and it is possible to prevent complication of processing and complication of the program of the database management system.

【0059】さらに、アプリケーションプログラムの要
求に対して割り当てる固有の値は、タイムスタンプに限
定されるものではない。
Further, the unique value assigned to the request of the application program is not limited to the time stamp.

【0060】また、本実施例においては、アプリケーシ
ョンプログラムからの要求に応じてデータの検索を行う
ようにしたが、ソフトウェアであるプログラムからの要
求のみならず、端末その他のハードウェアからの要求に
応じて、データの検索を行うようにすることも可能であ
る(本明細書中では、これらを総称して、アプリケーシ
ョンと記述してある)。
In this embodiment, the data is searched in response to the request from the application program. However, not only the request from the software program but also the request from the terminal or other hardware is performed. It is also possible to search for data (in this specification, these are collectively referred to as an application).

【0061】[0061]

【発明の効果】以上の如く、本発明のデータベース制御
装置によれば、データの検索処理速度の低下を防止する
ことができる。
As described above, according to the database control apparatus of the present invention, it is possible to prevent a decrease in the data retrieval processing speed.

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

【図1】本発明を適用したデータベース装置の一実施例
の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of an embodiment of a database device to which the present invention is applied.

【図2】図1の実施例において、ハードディスク2に記
憶されたデータベースが圧縮されてメモリ3に展開され
る様子を示す図である。
FIG. 2 is a diagram showing how a database stored in a hard disk 2 is compressed and expanded in a memory 3 in the embodiment shown in FIG.

【図3】図1のハードディスク2に記憶されたデータベ
ースのレコードの構成を示す図である。
3 is a diagram showing a structure of a record of a database stored in a hard disk 2 of FIG.

【図4】レコードが親Pに属していることを示す図であ
る。
FIG. 4 is a diagram showing that a record belongs to a parent P.

【図5】レコードが親PnとPn+1に属していることを示
す図である。
FIG. 5 is a diagram showing that a record belongs to parents Pn and Pn + 1.

【図6】図1のハードディスク2に記憶されたデータベ
ースを示す図である。
6 is a diagram showing a database stored in a hard disk 2 of FIG.

【図7】図1の実施例で行われるデータベースの検索処
理を説明するための図である。
FIG. 7 is a diagram for explaining a database search process performed in the embodiment of FIG.

【図8】図1の実施例で行われるデータベースの検索処
理を説明するための図である。
8 is a diagram for explaining a database search process performed in the embodiment of FIG. 1. FIG.

【図9】従来のデータベース装置の一例の構成を示すブ
ロック図である。
FIG. 9 is a block diagram showing a configuration of an example of a conventional database device.

【図10】スワッピングを説明するための図である。FIG. 10 is a diagram for explaining swapping.

【図11】従来のデータベースの圧縮方法を説明する図
である。
FIG. 11 is a diagram illustrating a conventional database compression method.

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

1 CPU 2 ハードディスク 3 メモリ 4 CRT 5 ポインティングデバイス 6 キーボード 101 CPU 102 ハードディスク 103 メモリ 1 CPU 2 Hard Disk 3 Memory 4 CRT 5 Pointing Device 6 Keyboard 101 CPU 102 Hard Disk 103 Memory

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 データを記憶しているデータベースと、 前記データベースに記憶されたデータを展開するメモリ
とを備えるデータベース装置を制御するデータベース制
御装置であって、 前記データベースに記憶されたデータを、レコード単位
で圧縮して、前記メモリに展開し、 アプリケーションからの要求に応じて、前記メモリに記
憶されたデータを検索することを特徴とするデータベー
ス制御装置。
1. A database control device for controlling a database device comprising: a database storing data; and a memory for expanding the data stored in the database, wherein the data stored in the database is recorded as a record. A database control device, which compresses a unit, expands it in the memory, and retrieves data stored in the memory in response to a request from an application.
【請求項2】 前記データベースに記憶されたデータを
前記メモリに展開するのにスワッピングが必要なときの
み、前記データベースに記憶されたデータを、レコード
単位で圧縮することを特徴とする請求項1に記載のデー
タベース装置。
2. The data stored in the database is compressed in record units only when swapping is required to expand the data stored in the database into the memory. The database device described.
【請求項3】 アプリケーションからの要求に応じて、
データベースのデータから、所定のレコードのデータを
検索するデータベース制御装置であって、 前記レコードは、所定の値を記憶する値記憶部と、前記
データを記憶するデータ記憶部とを含み、 前記アプリケーションからの要求に対し、その要求に固
有の値を割り当て、 前記アプリケーションからの要求に応じて検索した前記
データが記憶されたレコードの前記値記憶部の記憶値
が、前記アプリケーションからの要求に割り当てられた
前記固有の値と異なるとき、そのレコードの前記データ
記憶部に記憶された前記データを、前記アプリケーショ
ンに渡し、 前記アプリケーションからの要求に応じて検索した前記
データが記憶されたレコードの前記値記憶部に、前記固
有の値を記憶させることを特徴とするデーベース制御装
置。
3. In response to a request from the application,
A database control device that retrieves data of a predetermined record from data of a database, wherein the record includes a value storage unit that stores a predetermined value and a data storage unit that stores the data. The request is assigned a unique value to the request, and the storage value of the value storage unit of the record storing the data retrieved in response to the request from the application is assigned to the request from the application. When the value is different from the unique value, the data stored in the data storage unit of the record is passed to the application, and the value storage unit of the record in which the data retrieved in response to a request from the application is stored The database controller stores the unique value in the.
【請求項4】 前記固有の値は、前記アプリケーション
からの要求があった日時に対応するタイムスタンプであ
ることを特徴とする請求項3に記載のデータベース制御
装置。
4. The database control device according to claim 3, wherein the unique value is a time stamp corresponding to a date and time when a request is made from the application.
【請求項5】 前記レコードは、所定の属性の親に属し
ており、 前記アプリケーションからの要求に応じて、前記データ
の検索を行う際の条件には、前記データが属する親を限
定する親限定条件が、少なくとも含まれ、 親限定条件に合致するレコードの前記値記憶部に、前記
固有の値を記憶させることを特徴とする請求項3または
4に記載のデータベース制御装置。
5. The record belongs to a parent having a predetermined attribute, and the condition when performing a search for the data in response to a request from the application is a parent limitation that limits the parent to which the data belongs. The database control device according to claim 3, wherein the unique value is stored in the value storage unit of a record that includes at least a condition and that matches a parental limit condition.
JP6214412A 1994-09-08 1994-09-08 Data base controller Withdrawn JPH0877044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6214412A JPH0877044A (en) 1994-09-08 1994-09-08 Data base controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6214412A JPH0877044A (en) 1994-09-08 1994-09-08 Data base controller

Publications (1)

Publication Number Publication Date
JPH0877044A true JPH0877044A (en) 1996-03-22

Family

ID=16655365

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6214412A Withdrawn JPH0877044A (en) 1994-09-08 1994-09-08 Data base controller

Country Status (1)

Country Link
JP (1) JPH0877044A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007310842A (en) * 2006-05-22 2007-11-29 Nomura Research Institute Ltd Data processing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007310842A (en) * 2006-05-22 2007-11-29 Nomura Research Institute Ltd Data processing system

Similar Documents

Publication Publication Date Title
US20060161539A1 (en) Method and system of database management with shared area
US7188124B2 (en) Method, system, computer product for recovering dropped database table specifying one or more table spaces, recovering the table space being restored using the dropped table history data structure
JPH0877044A (en) Data base controller
JPH08314957A (en) Database system
CN114443722A (en) Cache management method and device, storage medium and electronic equipment
JP2624170B2 (en) Logical deletion data physical deletion method
JPH04340163A (en) Keyword retrieval system
JPH04252342A (en) Data archive controller for information processing system
JPH07334406A (en) Multi-media data base system
JPH1185585A (en) Method and device for complete memory resident index
JP3130870B2 (en) Memory dump file reconstruction method
JPS62121532A (en) Data retrieving method
JP3226891B2 (en) Distributed database system and method for extending distributed database system
JPH02116936A (en) Reorganizing system
JP2938047B1 (en) Data buffering system
CN117743324A (en) Data storage method, device, storage medium and computer equipment
JPH08328929A (en) Database split management system
JP2000066933A (en) Time series data management system
JPH06149647A (en) Multi-media file managing system
JPH0553886A (en) Table access managing system
JPH08235044A (en) Journal retrieval systm
JPS58125155A (en) Data file processing system
JPH02222028A (en) Open system for designation of file label address of optical disk file
JPH0689262A (en) System for controlling dynamic record in conversaional processing
JPH05181717A (en) Data base application control system

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20011120