JP3002590B2 - How to manage the database - Google Patents

How to manage the database

Info

Publication number
JP3002590B2
JP3002590B2 JP4022513A JP2251392A JP3002590B2 JP 3002590 B2 JP3002590 B2 JP 3002590B2 JP 4022513 A JP4022513 A JP 4022513A JP 2251392 A JP2251392 A JP 2251392A JP 3002590 B2 JP3002590 B2 JP 3002590B2
Authority
JP
Japan
Prior art keywords
data
index
stored
area
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP4022513A
Other languages
Japanese (ja)
Other versions
JPH05225006A (en
Inventor
広史 渡部
政美 木藤
光 勅使川原
竹彦 中曽根
邦男 宮崎
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP4022513A priority Critical patent/JP3002590B2/en
Publication of JPH05225006A publication Critical patent/JPH05225006A/en
Application granted granted Critical
Publication of JP3002590B2 publication Critical patent/JP3002590B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、例えば、印鑑管理シス
テムのように、大容量のデータベースを具備したシステ
ムに利用されるデータベースの管理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database management method used in a system having a large-capacity database, such as a seal management system.

【0002】[0002]

【従来の技術】図5〜図7は、従来例を示した図であ
り、図5はシステム構成図、図6は処理フローチャー
ト、図7は処理説明図である。
2. Description of the Related Art FIGS. 5 to 7 are diagrams showing a conventional example, FIG. 5 is a system configuration diagram, FIG. 6 is a process flowchart, and FIG. 7 is a process explanatory diagram.

【0003】図中、1はホスト(ホストコンピュー
タ)、2はディスクコントローラ(例えば、磁気ディス
ク制御装置)、3は端末装置、4は通信回線、5はハッ
シュキー算出処理部、6はデータ格納処理部、D1〜D
3はディスク装置(例えば磁気ディスク装置)を示す。
In the figure, 1 is a host (host computer), 2 is a disk controller (for example, a magnetic disk controller), 3 is a terminal device, 4 is a communication line, 5 is a hash key calculation processing section, and 6 is a data storage processing. Part, D1-D
Reference numeral 3 denotes a disk device (for example, a magnetic disk device).

【0004】従来、例えば印鑑管理システムにおいて
は、大容量のデータベースが使用されていた。このよう
なデータベースでは、印鑑のデータと、このデータを検
索するためのインデックスキーとを対応させて管理して
いた。
Conventionally, for example, in a seal management system, a large-capacity database has been used. In such a database, seal stamp data and an index key for searching this data are managed in association with each other.

【0005】そして、新たにインデックスキーを作成す
る場合、インデックスキーの分布により、全体で未使用
の領域があっても、そのインデックスキーに関連するデ
ータ(印鑑のデータ)を格納したのと同一の物理ボリウ
ム内のインデックス領域にのみ、インデックスキーを作
成していた。
When a new index key is created, even if there is an unused area as a whole due to the distribution of the index key, the same data (seal stamp data) related to the index key is stored. An index key was created only in the index area in the physical volume.

【0006】この場合、同一のインデックス領域に空き
領域が無くなると、インデックスキーの格納ができなか
った。即ち、同一の物理ボリウムに閉じて管理してい
た。以下、図面に基づいて詳細に説明する。
In this case, if there is no free space in the same index area, the index key cannot be stored. In other words, the management is performed by being closed to the same physical volume. The details will be described below with reference to the drawings.

【0007】上記印鑑管理システムの構成例を図5に示
す。このシステムでは、ホスト(ホストコンピュータ)
1と端末装置3(実際には複数台)とが通信回線4を介
して接続されており、ホスト1には、ディスクコントロ
ーラ2と、複数台のディスク装置D1〜D3で構成され
たディスクサブシステムが接続されている。
FIG. 5 shows an example of the configuration of the seal management system. In this system, the host (host computer)
1 and a terminal device 3 (actually, a plurality of devices) are connected via a communication line 4. A host 1 has a disk controller 2 and a disk subsystem composed of a plurality of disk devices D1 to D3. Is connected.

【0008】そして印鑑のデータベースは、前記複数台
のディスク装置D1〜D3を用いて構成されている。以
下、前記データベースへのデータ格納処理を、図6の処
理フローチャートに基づいて説明する。なお、図6の各
処理番号は、カッコ内に示す。
[0008] The seal database is constructed using the plurality of disk devices D1 to D3. Hereinafter, a process of storing data in the database will be described with reference to a process flowchart of FIG. Note that the processing numbers in FIG. 6 are shown in parentheses.

【0009】先ず、端末装置3からデータ格納依頼が出
されると、ホスト1を経由して、ディスクコントローラ
2が受信する(S1)。この時、ディスクコントローラ
2ではハッシュキー算出処理部5にハッシュキーの算出
処理を指示する(S2)。
First, when a data storage request is issued from the terminal device 3, the disk controller 2 receives the data via the host 1 (S1). At this time, the disk controller 2 instructs the hash key calculation processing unit 5 to perform a hash key calculation process (S2).

【0010】ハッシュキー算出処理部5では、ハッシュ
キー算出プログラムにより、ハッシュキーの値を算出し
て応答する。なお、ハッシュキー算出処理は、ハッシュ
(hash)論理により、データを均等に振り分けるた
めの処理である。
The hash key calculation processing section 5 calculates a hash key value by a hash key calculation program and responds. The hash key calculation process is a process for uniformly distributing data by hash logic.

【0011】データ格納処理部6では、前記のハッシュ
キー算出応答に基づいて、データを格納するディスク番
号を決定する(S3)。その後、データ格納処理部6で
は、決定したディスクにデータが格納できるか否か(デ
ータ格納領域に空きがあるか否か)を判断する(S
4)。その結果、データが格納できる場合(空きが有る
場合)には、データを格納する(S8)。しかし、デー
タの格納ができない場合には、前記決定したディスクの
次のディスクにデータが格納できるか否かを判断し(S
5)、もしデータが格納できれば、データを格納する
(S8)。
The data storage processing unit 6 determines a disk number for storing data based on the hash key calculation response (S3). Thereafter, the data storage processing unit 6 determines whether data can be stored in the determined disk (whether there is a free space in the data storage area) (S).
4). As a result, if the data can be stored (if there is a space), the data is stored (S8). However, if the data cannot be stored, it is determined whether the data can be stored in the disk next to the determined disk (S).
5) If the data can be stored, the data is stored (S8).

【0012】しかし、次のディスクにもデータが格納で
きない場合には、更に次のディスクにデータが格納でき
るか否かを調べる。このように、データの格納できるデ
ィスクが見つかるまで各ディスクのデータ格納領域を調
べ、見つかったらそのディスクにデータを格納する(S
8)。
However, if data cannot be stored on the next disk, it is checked whether data can be stored on the next disk. In this way, the data storage area of each disk is checked until a disk that can store data is found, and if found, data is stored on that disk (S
8).

【0013】そして、全てのディスクに、データを格納
できる領域がなかった場合には(S6)、全てのディス
クのデータ格納領域が一杯である旨ホスト1に応答する
(S7)。また、ホスト1から端末3にも応答する。
If there is no area in which data can be stored in all the disks (S6), the host 1 is replied to the effect that the data storage areas of all the disks are full (S7). The host 1 also responds to the terminal 3.

【0014】次に、前記のようにして、所定のディスク
にデータが格納できた場合には(S8)、データを格納
したディスクと、同一のディスク内に、インデックスキ
ー(格納したデータのインデックスキー)が作成可能か
否かを判断する(S9)。
Next, when the data can be stored in the predetermined disk as described above (S8), the index key (the index key of the stored data) is stored in the same disk as the disk storing the data. ) Is determined (S9).

【0015】その結果、インデックスキーが作成できる
場合(空きが有る場合)には、データを格納したディス
ク内のインデックス領域に、インデックスキーを作成す
る(S10)。
As a result, if an index key can be created (if there is a free space), an index key is created in the index area in the disk storing the data (S10).

【0016】しかし、インデックスキーが格納できない
場合には、インデックスキーが格納できないので、デー
タ格納ができない旨ホスト1へ応答する(S11)。ま
たホスト1から端末装置3へも応答する。
However, if the index key cannot be stored, since the index key cannot be stored, the host 1 is replied to the effect that the data cannot be stored (S11). The host 1 also responds to the terminal device 3.

【0017】上記の処理を、図7の具体例について説明
する。データベースへのデータの格納処理としては、先
ずデータ格納領域内に、データ(例えば印鑑データ)を
格納した後、該データを格納したディスク(同一ディス
ク)内のインデックス領域に、インデックスキーを作成
する。
The above processing will be described with reference to a specific example of FIG. As a process of storing data in the database, first, data (for example, seal data) is stored in a data storage area, and then an index key is created in an index area in a disk (same disk) storing the data.

【0018】例えば図7のように、ディスク装置D1で
は、インデックス領域1内に、キー1〜キー3(インデ
ックスキー)が格納され、データ領域1にはキー1対応
データ〜キー3対応データが格納されている。
For example, as shown in FIG. 7, in the disk device D1, keys 1 to 3 (index keys) are stored in the index area 1, and data corresponding to keys 1 to 3 are stored in the data area 1. Have been.

【0019】また、ディスク装置D2では、インデック
ス領域2にキー4が格納され、データ領域2にはキー4
対応データが格納されている。更に、ディスク装置D3
では、インデックス領域3にキー5が格納され、データ
領域3にキー5対応データが格納されている。
In the disk drive D2, the key 4 is stored in the index area 2, and the key 4 is stored in the data area 2.
Corresponding data is stored. Further, the disk device D3
In the example, the key 5 is stored in the index area 3 and the data corresponding to the key 5 is stored in the data area 3.

【0020】これらのインデックスキーと、キー対応の
データは、それぞれハッシュ論理に基づいて、各ディス
ク装置に割り振られている。このような状態で、今、キ
ー6と、キー6対応データを格納しようとした場合、先
ず、ディスク装置D1のデータ領域1内に、キー6対応
データが格納できたとする。
The index keys and the data corresponding to the keys are allocated to the respective disk devices based on the hash logic. In this state, when the key 6 and the data corresponding to the key 6 are to be stored, it is assumed that first, the data corresponding to the key 6 can be stored in the data area 1 of the disk device D1.

【0021】この時、ディスク装置D1内のインデック
ス領域1には空き領域が存在していない。従って、キー
6はインデックス領域1内に作成できない。即ち、デー
タ(印鑑データ)を格納したのと同じディスク内のイン
デックス領域1内に、インデックスキーが作成できない
と、データの格納はさせない。これは、データ検索時に
高速で検索ができるようにするためである。
At this time, there is no free area in the index area 1 in the disk device D1. Therefore, the key 6 cannot be created in the index area 1. That is, if an index key cannot be created in the index area 1 in the same disk as the data (seal stamp data), the data is not stored. This is to enable a high-speed search at the time of data search.

【0022】従って、この場合には、キー6対応データ
はディスク装置に格納できないことになる。
Therefore, in this case, the data corresponding to the key 6 cannot be stored in the disk device.

【0023】[0023]

【発明が解決しようとする課題】上記のような従来のも
のにおいては、次のような課題があった。 (1) データを格納したのと同一ディスク内のインデック
ス領域に、インデックスキーが作成できない場合には、
データの格納をさせないようにしていた。
The above-mentioned conventional apparatus has the following problems. (1) If an index key cannot be created in the index area on the same disk where the data is stored,
The data was not stored.

【0024】このため、システム設計時には、データ領
域より先に、インデックス領域に空き領域が無くならな
いように、各ディスク単位に綿密な設計をする必要があ
った。このため、多くの手間と時間がかかっていた。
Therefore, at the time of designing the system, it is necessary to carefully design each disk unit so that there is no empty space in the index area before the data area. For this reason, much time and effort was required.

【0025】(2) インデックス領域全体としては空きが
あるのに、データを格納したのと同一ディスク内のイン
デックス領域に空きが無くなることで、データの追加作
成ができなくなる。従って、ディスクの有効利用ができ
ていない。
(2) Although there is a free space in the entire index area, no additional space can be created in the index area in the same disk where the data is stored, so that additional data cannot be created. Therefore, the disk cannot be used effectively.

【0026】本発明は、このような従来の課題を解決
し、インデックスキーの分布に関係なく、インデックス
領域の未使用部分(空き領域)を有効利用できるように
することを目的とする。
An object of the present invention is to solve such a conventional problem and to make it possible to effectively use an unused portion (free space) of an index area regardless of the distribution of index keys.

【0027】[0027]

【課題を解決するための手段】図1は本発明の原理説明
図であり、K1〜K3はインデックス領域のアドレス、
A1〜A4はデータ領域のアドレスを示す。
FIG. 1 is a diagram for explaining the principle of the present invention, wherein K1 to K3 are addresses of an index area,
A1 to A4 indicate addresses of the data area.

【0028】本発明は上記の課題を解決するため次のよ
うに構成した。 (1) 複数の物理ボリウムPV1、PV2にまたがったデ
ータベースを、複数のインデックス領域と、それに対応
する複数のデータ領域で管理しているシステムのデータ
ベースの管理方法において、ある物理ボリウム(例えば
PV1)のデータ領域に、データを格納した際、該デー
タを格納した物理ボリウム(PV1)のインデックス領
域に、該データのインデックスキーが作成できる場合に
は、前記インデックス領域に、インデックスキーを作成
し、前記インデックスキーが作成できない場合には、他
の物理ボリウム(PV2)のインデックス領域の空き領
域を探し、該空き領域に、前記データのインデックスキ
ーを作成して、データベースを管理するようにした。
The present invention is configured as follows in order to solve the above problems. (1) In a database management method of a system in which a database spanning a plurality of physical volumes PV1 and PV2 is managed by a plurality of index areas and a plurality of data areas corresponding to the index areas, a database of a certain physical volume (for example, PV1) is used. When storing data in the data area, if an index key for the data can be created in the index area of the physical volume (PV1) storing the data, an index key is created in the index area and the index key is created. If a key cannot be created, an empty area in the index area of another physical volume (PV2) is searched, and an index key for the data is created in the empty area to manage the database.

【0029】[0029]

【作用】上記構成に基づく本発明の作用を、図1を参照
しながら説明する。データベースを管理するシステムで
は、各物理ボリウムPV1、PV2単位で、インデック
ス領域とデータ領域とを設けている。
The operation of the present invention based on the above configuration will be described with reference to FIG. In the system for managing the database, an index area and a data area are provided for each physical volume PV1 and PV2.

【0030】例えば物理ボリウムPV1には、インデッ
クス領域1とデータ領域1とを設け、物理ボリウムPV
2には、インデックス領域2とデータ領域2を設けてい
る。データベースにデータを格納する際は、ハッシュキ
ーを算出して、データを格納する物理ボリウムを決定
し、データが格納できれば格納する。
For example, in the physical volume PV1, an index area 1 and a data area 1 are provided, and the physical volume PV1 is provided.
2, an index area 2 and a data area 2 are provided. When data is stored in the database, a hash key is calculated, a physical volume for storing the data is determined, and if the data can be stored, the data is stored.

【0031】しかし、データが格納できなければ、順
次、次の物理ボリウムを探し、データの格納できる(空
きのある)物理ボリウムのデータ領域にデータを格納す
る。その後、データを格納した物理ボリウム内のインデ
ックス領域に、該データのインデックスキーを作成でき
れば(空きがあれば)、作成する。
However, if the data cannot be stored, the next physical volume is searched for sequentially, and the data is stored in the data area of the physical volume where data can be stored (there is a free space). Thereafter, if an index key for the data can be created in the index area in the physical volume storing the data (if there is a free space), the index key is created.

【0032】しかし、インデックスキーが作成できなけ
れば、順次、次の物理ボリウムを探し、インデックスキ
ーの作成できるインデックス領域に、前記データのイン
デックスキーを作成する。
However, if an index key cannot be created, the next physical volume is searched for, and an index key for the data is created in an index area where an index key can be created.

【0033】例えば、物理ボリウムPV1では、インデ
ックス領域1のアドレスK1〜K3にキー1〜キー3が
格納されていて空きが無い状態であり、データ領域1の
アドレスA1〜A3にキー1対応データ〜キー3対応デ
ータが格納されていて空きが有る(アドレスA4)状態
とする。
For example, in the physical volume PV1, the keys 1 to 3 are stored in the addresses K1 to K3 of the index area 1 and there is no space, and the data A1 to A3 in the data area 1 are stored in the addresses A1 to A3. It is assumed that the data corresponding to the key 3 is stored and free (address A4).

【0034】また、物理ボリウムPV2は、インデック
ス領域2のアドレスK1に、キー4が格納されていて、
空きが有り(アドレスK2、K3)、データ領域2のア
ドレスA1には、キー4対応データが格納されていて空
きが有る(アドレスA2〜A4)状態とする。
In the physical volume PV2, the key 4 is stored in the address K1 of the index area 2;
There is a space (addresses K2 and K3), and the data corresponding to the key 4 is stored in the address A1 of the data area 2 and there is a space (addresses A2 to A4).

【0035】この状態で、物理ボリウムPV1のデータ
領域1にデータ(キー6対応データ)を格納した(アド
レスA4)場合、物理ボリウムPV1のインデックス領
域1には空きが無いので、前記データのインデックスキ
ーは作成できない。
In this state, when data (data corresponding to the key 6) is stored in the data area 1 of the physical volume PV1 (address A4), there is no space in the index area 1 of the physical volume PV1, so that the index key of the data is used. Cannot be created.

【0036】そこで、次の物理ボリウムPV2を探す
と、そのインデックス領域2に空きがあるため、この領
域に、前記データのインデックスキー(キー6)を作成
する。この場合、インデックスキーには、物理ボリウム
番号、データの格納アドレス等を作成しておき、データ
の検索時に使用する。
Therefore, when the next physical volume PV2 is searched, there is a space in the index area 2, and an index key (key 6) for the data is created in this area. In this case, a physical volume number, a data storage address, and the like are created in the index key, and are used when searching for data.

【0037】このようにすれば、各物理ボリウム単位
で、インデックス領域とデータ領域とを、綿密に設計し
ておく必要もなくなり、インデックス領域の有効利用が
可能となる。
In this way, it is not necessary to carefully design the index area and the data area for each physical volume, and the index area can be effectively used.

【0038】[0038]

【実施例】以下、本発明の実施例を図面に基づいて説明
する。 (第1実施例の説明)図2〜図4は、本発明の第1実施
例を示した図であり、図2はシステム構成図、図3は処
理フローチャート、図4は処理説明図である。
Embodiments of the present invention will be described below with reference to the drawings. (Explanation of First Embodiment) FIGS. 2 to 4 are views showing a first embodiment of the present invention, FIG. 2 is a system configuration diagram, FIG. 3 is a process flowchart, and FIG. 4 is a process explanatory diagram. .

【0039】図中、図1、図5と同符号は同一のものを
示す。また、7は制御部、3−1〜3−mは端末装置を
示す。本実施例は、例えば印鑑管理システムのような大
容量データベースに適用した例であり、前記システムの
構成を図2に示す。
In the figures, the same reference numerals as those in FIGS. 1 and 5 denote the same parts. Reference numeral 7 denotes a control unit, and 3-1 to 3-m denote terminal devices. This embodiment is an example applied to a large-capacity database such as a seal management system, and the configuration of the system is shown in FIG.

【0040】このシステムは、複数台の端末装置3−1
〜3−mと、該端末装置に、通信回線4を介して接続さ
れたホスト(ホストコンピュータ)1と、該ホスト1に
接続されたディスクサブシステム(例えば磁気ディスク
サブシステム)で構成される。
This system includes a plurality of terminal devices 3-1.
-M, a host (host computer) 1 connected to the terminal device via a communication line 4, and a disk subsystem (for example, a magnetic disk subsystem) connected to the host 1.

【0041】また、前記ディスクサブシステムは、ディ
スクコントローラ(例えば磁気ディスク制御装置)と、
複数台のディスク装置(例えば磁気ディスク装置)D1
〜D3で構成されている。
The disk subsystem includes a disk controller (for example, a magnetic disk controller),
A plurality of disk devices (for example, magnetic disk devices) D1
To D3.

【0042】そして、前記複数台のディスク装置D1〜
D3を用いて、データベースを構成しており、このデー
タベースへのデータの格納処理や、データの検索処理
は、ホスト1の指示に基づいて、ディスクコントローラ
2が行っている。
The plurality of disk devices D1 to D1
A database is configured using D3, and a process of storing data in the database and a process of retrieving data are performed by the disk controller 2 based on an instruction from the host 1.

【0043】この例では、ディスクコントローラ2内
に、制御部7、ハッシュキー算出部5、データ格納処理
部6等を設けて、各ディスク装置D1〜D3へのデータ
の格納処理を行っている。
In this example, a control unit 7, a hash key calculation unit 5, a data storage processing unit 6 and the like are provided in the disk controller 2, and data is stored in each of the disk devices D1 to D3.

【0044】以下、前記システムにおけるデータベース
へのデータ格納処理を、図3の処理フローチャートに基
づいて説明する。なお、図3の各処理番号はカッコ内に
示す。
Hereinafter, the process of storing data in the database in the above system will be described with reference to the processing flowchart of FIG. Each processing number in FIG. 3 is shown in parentheses.

【0045】各端末装置3−1〜3−mからのデータ格
納依頼は、通信回線4を介してホスト1へ送られ、その
後、ディスクコントローラ2へ送られる。ディスクコン
トローラ2内の制御部7では、前記のデータ格納依頼を
受信すると(S21)、ハッシュキー算出処理部5に、
受信したデータに対するハッシュキー算出処理を指示す
る。
A data storage request from each of the terminal devices 3-1 to 3-m is sent to the host 1 via the communication line 4, and then sent to the disk controller 2. When the control unit 7 in the disk controller 2 receives the data storage request (S21), the hash key calculation processing unit 5
The hash key calculation process is instructed for the received data.

【0046】ハッシュキー算出処理部5では、前記指示
に基づいて、ハッシュキーの算出処理を実行する(S2
2)。その後、ハッシュキーの算出処理が終了すると、
ハッシュキー算出処理部5から制御部7に対し、応答信
号を出す。
The hash key calculation processing section 5 executes a hash key calculation process based on the instruction (S2).
2). After that, when the hash key calculation process ends,
A response signal is sent from the hash key calculation processing unit 5 to the control unit 7.

【0047】制御部7では、前記応答信号を受け取る
と、データ格納処理部6に対して、データ格納指示を出
す。データ格納処理部6では、ハッシュキー算出処理部
5で算出したハッシュキーの値を受け取って、データを
格納するディスク装置の番号を決定する(S23)。
Upon receiving the response signal, the control section 7 issues a data storage instruction to the data storage processing section 6. The data storage processing unit 6 receives the value of the hash key calculated by the hash key calculation processing unit 5, and determines the number of the disk device that stores the data (S23).

【0048】その後、データ格納処理部6では、決定し
たディスク装置にデータが格納できるか否か(決定した
番号のディスク装置内のデータ領域に空きがあるか否
か)を判断する(S24)。
Thereafter, the data storage processing section 6 determines whether or not data can be stored in the determined disk device (whether or not there is a free space in the data area in the disk device of the determined number) (S24).

【0049】その結果、データが格納できる状態(空き
がある)ならば、データ領域にデータを格納する(S2
8)。しかし、データが格納できない場合には(S2
4)、次のディスクにデータが格納できるか否か(空き
があるか否か)を判断する(S25)。その結果、デー
タが格納できればデータ領域にデータを格納する。
As a result, if the data can be stored (there is a space), the data is stored in the data area (S2).
8). However, if the data cannot be stored (S2
4) It is determined whether data can be stored in the next disk (whether there is a free space) (S25). As a result, if the data can be stored, the data is stored in the data area.

【0050】また、データが格納できない場合には、更
に次のディスクにデータが格納できるか否かを判断す
る。このようにして、いずれかのディスク装置のデータ
領域にデータが格納できれば、そのディスク装置にデー
タを格納する。
If data cannot be stored, it is determined whether data can be stored in the next disk. In this way, if data can be stored in the data area of any disk device, the data is stored in that disk device.

【0051】しかし、全てのディスクのデータ領域にデ
ータが格納できない場合には(S26)、全てのディス
ク装置のデータ格納領域が一杯である旨、制御部7を介
してホスト1へ応答する(S27)。その後、ホスト1
から該当する端末装置に対して応答する。
However, if the data cannot be stored in the data areas of all the disks (S26), a response is sent to the host 1 via the control unit 7 that the data storage areas of all the disk devices are full (S27). ). Then host 1
Responds to the corresponding terminal device.

【0052】上記のようにして、いずれかのディスク装
置内のデータ領域にデータが格納できた場合には(S2
8)、次に、データを格納したディスク装置と同一ディ
スク装置内に、インデックスキーが作成可能か否か(空
きがあるか否か)を判断する(S29)。
When data can be stored in the data area in any of the disk devices as described above (S2
8) Next, it is determined whether an index key can be created (whether there is a free space) in the same disk device as the disk device storing the data (S29).

【0053】その結果、作成可能ならば、インデックス
領域にインデックスキーを格納する(S30)。しか
し、インデックスキーが作成できない場合には(S2
9)、次のディスク装置のインデックス領域にインデッ
クスキーが作成できるか否か(空きが有るか否か)を判
断する(S31)。
As a result, if it can be created, the index key is stored in the index area (S30). However, if an index key cannot be created (S2
9) It is determined whether an index key can be created in the index area of the next disk device (whether there is a free space) (S31).

【0054】もし、インデックスキーが作成できる場合
には、インデックス領域にインデックスキーを格納する
(S30)が、作成できない場合には、更に次のディス
ク装置に、インデックスキーが作成できるか否かを判断
する。
If the index key can be created, the index key is stored in the index area (S30). If the index key cannot be created, it is determined whether the index key can be created in the next disk device. I do.

【0055】このようにして、インデックスキーが作成
できるディスク装置を見つけるまで順次サーチを行い、
いずれかのディスク装置のインデックス領域が作成でき
る場合には、そのインデックス領域にインデックスキー
を作成する(S30)。
In this manner, the search is sequentially performed until a disk device capable of creating an index key is found.
If an index area of any of the disk devices can be created, an index key is created in that index area (S30).

【0056】しかし、全てのディスク装置をサーチして
も、インデックスキーが作成できない場合には(S3
2)、全てのディスク装置のインデックス領域が一極で
ある旨、制御部7を介してホスト1へ応答する(S3
2)。その後、ホスト1から端末装置へも応答する。
However, if an index key cannot be created even after searching all the disk devices (S3
2) A response is sent to the host 1 via the control unit 7 to the effect that the index areas of all the disk devices are unipolar (S3).
2). Thereafter, the host 1 also responds to the terminal device.

【0057】次に、図4の例について説明する。図4に
おいて、ディスク装置D1のインデックス領域1に、キ
ー1〜キー3が格納されており、データ領域1にキー1
対応データ〜キー3対応データが格納されていたとす
る。
Next, the example of FIG. 4 will be described. In FIG. 4, keys 1 to 3 are stored in the index area 1 of the disk device D1, and the key 1 is stored in the data area 1.
It is assumed that correspondence data to key 3 correspondence data are stored.

【0058】また、ディスク装置D2のインデックス領
域2にキー4が格納され、データ領域2に、キー4対応
データが格納されており、ディスク装置D3のインデッ
クス領域3にキー5が格納され、データ領域3にキー5
対応データが格納されていたとする。
The key 4 is stored in the index area 2 of the disk drive D2, the data corresponding to the key 4 is stored in the data area 2, the key 5 is stored in the index area 3 of the disk drive D3, and the data area is stored. 3 to key 5
It is assumed that corresponding data has been stored.

【0059】この状態で、ディスク装置D1のデータ領
域1内に、データ(キー6対応データ)を格納した場
合、インデックス領域1内に、前記データのインデック
スキーを作成しようとするが、空きが無くて作成できな
い。
In this state, when data (data corresponding to the key 6) is stored in the data area 1 of the disk device D1, an attempt is made to create an index key for the data in the index area 1, but there is no free space. Cannot be created.

【0060】そこで、次のディスク装置D2を探し、そ
のインデックス領域2内の空き領域に、前記データのイ
ンデックスキー(キー6)を作成する。この場合、各イ
ンデックスキーには、ディスク装置の番号、あるいは記
号(D1、D2、D3等)、及び、キー対応データの格
納アドレス(A1、A2、A3、A4等)の情報を併せ
て作成しておき、データの探索時に使用する。
Therefore, the next disk drive D2 is searched, and an index key (key 6) for the data is created in a free area in the index area 2. In this case, for each index key, information on the disk device number or symbol (D1, D2, D3, etc.) and the storage address (A1, A2, A3, A4, etc.) of the key corresponding data is created together. Use it when searching for data.

【0061】このようにすれば、データを格納したディ
スク装置に、インデックスキーを作成できる空き領域が
無い場合でも、他のディスク装置の空き領域にインデッ
クスキーを作成すればよいから、インデックス領域が有
効利用できる。
In this way, even if the disk device storing the data does not have an empty area where an index key can be created, the index key can be created in an empty area of another disk device. Available.

【0062】(他の実施例)以上実施例について説明し
たが、本発明は次のようにしても実施可能である。 (1) データベースには、ディスク装置に限らず、他の装
置(例えば磁気テープ装置)を用いてもよい。
(Other Embodiments) Although the embodiments have been described above, the present invention can be implemented as follows. (1) The database is not limited to the disk device, and another device (for example, a magnetic tape device) may be used.

【0063】(2) 図2に示したシステムに限らず、他の
システムにも適用可能である。例えば、複数の営業店
(例えば銀行の支店)のそれぞれに、データベースを備
えた印鑑管理システムを設置すると共に、各営業店のシ
ステムを、ISDN網を介して相互に接続可能にしたシ
ステムにも適用可能である。
(2) The present invention is not limited to the system shown in FIG. 2, but can be applied to other systems. For example, the present invention is also applied to a system in which a seal management system having a database is installed at each of a plurality of branches (for example, branches of a bank) and the systems of the branches can be connected to each other via an ISDN network. It is possible.

【0064】(3) 印鑑管理システムに限らず、他のデー
タベースにも適用可能である。即ち、データベースを、
インデックス領域と、それに対応するデータ領域とで管
理しているシステムならば,どのようなシステムでも適
用可能である。
(3) The present invention is applicable not only to the seal management system but also to other databases. That is, the database
Any system can be applied as long as the system manages the index area and the corresponding data area.

【0065】[0065]

【発明の効果】以上説明したように、本発明によれば、
次のような効果がある。 (1) データを格納したディスク装置と同じディスク装置
内のインデックス領域に空きがない場合には、他のディ
スク装置のインデックス領域にインデックスキーを作成
することができる。
As described above, according to the present invention,
The following effects are obtained. (1) If there is no free space in the index area in the same disk device as the disk device storing the data, an index key can be created in the index area of another disk device.

【0066】このため、システム設計時に、インデック
ス領域の綿密な設計をしなくて済む。 (2) インデックス領域は、各ディスク装置単位で綿密な
設計をする必要はなく、ディスクのトータルサイズで設
計しておけばよい。
For this reason, when designing the system, it is not necessary to carefully design the index area. (2) The index area does not need to be carefully designed for each disk device, but may be designed with the total size of the disk.

【0067】従って、システム設計が容易となり、イン
デックス領域の有効利用ができる。 (3) データとインデックスキーとを別々のディスク装置
に格納するのは、同一ディスク装置内で、データが格納
でき、かつインデックスキーが格納できなかった場合の
みである。
Therefore, the system design becomes easy, and the index area can be effectively used. (3) The data and the index key are stored in different disk devices only when the data can be stored and the index key cannot be stored in the same disk device.

【0068】従って、通常の場合は、データとインデッ
クスキーとが同一のディスク装置内に格納されるので、
実質的には、ほとんど検索速度を落とさずに済む。
Therefore, in a normal case, the data and the index key are stored in the same disk device.
Practically, the search speed is hardly reduced.

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

【図1】本発明の原理図である。FIG. 1 is a principle diagram of the present invention.

【図2】本発明の実施例におけるシステム構成図であ
る。
FIG. 2 is a system configuration diagram in an embodiment of the present invention.

【図3】実施例の処理フローチャートである。FIG. 3 is a processing flowchart of the embodiment.

【図4】実施例の処理説明図である。FIG. 4 is an explanatory diagram of a process according to the embodiment.

【図5】従来例のシステム構成図である。FIG. 5 is a system configuration diagram of a conventional example.

【図6】従来例の処理フローチャートである。FIG. 6 is a processing flowchart of a conventional example.

【図7】従来例の処理説明図である。FIG. 7 is an explanatory diagram of processing in a conventional example.

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

1 ホスト(ホストコンピュータ) 2 ディスクコントローラ 3−1〜3−m 端末装置 4 通信回線 5 ハッシュキー算出処理部 6 データ格納処理部 7 制御部 D1〜D3 ディスク装置 DESCRIPTION OF SYMBOLS 1 Host (host computer) 2 Disk controller 3-1-3-m Terminal device 4 Communication line 5 Hash key calculation processing part 6 Data storage processing part 7 Control part D1-D3 Disk device

───────────────────────────────────────────────────── フロントページの続き (72)発明者 中曽根 竹彦 群馬県前橋市問屋町1丁目1番地の1 NF2ビル 株式会社群馬富士通内 (72)発明者 宮崎 邦男 群馬県前橋市問屋町1丁目1番地の1 NF2ビル 株式会社群馬富士通内 (56)参考文献 特開 昭63−217417(JP,A) 特開 平2−16649(JP,A) 特開 平2−299037(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 12/00 ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Takehiko Nakasone 1-1-1, Tonya-machi, Maebashi-shi, Gunma NF2 Building Inside Gunma Fujitsu Co., Ltd. (72) Kunio Miyazaki 1-1-1, Tonya-cho, Maebashi-shi, Gunma Prefecture NF2 Building Gunma Fujitsu Co., Ltd. (56) References JP-A-63-217417 (JP, A) JP-A-2-16649 (JP, A) JP-A-2-299037 (JP, A) (58) Field surveyed (Int. Cl. 7 , DB name) G06F 12/00

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数の物理ボリウム(PV1、PV2)
にまたがったデータベースを、 複数のインデックス領域と、それに対応する複数のデー
タ領域で管理しているシステムのデータベースの管理方
法において、 ある物理ボリウム(例えばPV1)のデータ領域に、デ
ータを格納した際、 該データを格納した物理ボリウム(PV1)のインデッ
クス領域に、該データのインデックスキーが作成できる
場合には、 前記インデックス領域に、インデックスキーを作成し、 前記インデックスキーが作成できない場合には、 他の物理ボリウム(PV2)のインデックス領域の空き
領域を探し、 該空き領域に、前記データのインデックスキーを作成し
て、データベースを管理することを特徴としたデータベ
ースの管理方法。
1. A plurality of physical volumes (PV1, PV2)
In a method of managing a database of a system that manages a database spanning a plurality of index areas and a plurality of corresponding data areas, when data is stored in a data area of a certain physical volume (for example, PV1), If an index key for the data can be created in the index area of the physical volume (PV1) storing the data, an index key is created in the index area. If the index key cannot be created, another index key is created. A database management method comprising: searching for an empty area in an index area of a physical volume (PV2); creating an index key of the data in the empty area; and managing the database.
JP4022513A 1992-02-07 1992-02-07 How to manage the database Expired - Fee Related JP3002590B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4022513A JP3002590B2 (en) 1992-02-07 1992-02-07 How to manage the database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4022513A JP3002590B2 (en) 1992-02-07 1992-02-07 How to manage the database

Publications (2)

Publication Number Publication Date
JPH05225006A JPH05225006A (en) 1993-09-03
JP3002590B2 true JP3002590B2 (en) 2000-01-24

Family

ID=12084848

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4022513A Expired - Fee Related JP3002590B2 (en) 1992-02-07 1992-02-07 How to manage the database

Country Status (1)

Country Link
JP (1) JP3002590B2 (en)

Also Published As

Publication number Publication date
JPH05225006A (en) 1993-09-03

Similar Documents

Publication Publication Date Title
CN103635900B (en) Time-based data partitioning
EP4068070A1 (en) Data storage method and apparatus, and storage system
US6983351B2 (en) System and method to guarantee overwrite of expired data in a virtual tape server
US5446857A (en) Method and apparatus for writing files on nonerasable storage medium
US6336163B1 (en) Method and article of manufacture for inserting volumes for import into a virtual tape server
US6421767B1 (en) Method and apparatus for managing a storage system using snapshot copy operations with snap groups
CN103761053B (en) A kind of data processing method and device
EP0118954B1 (en) Volume recovery system for data sets in a word processing system
US5504888A (en) File updating system employing the temporary connection and disconnection of buffer storage to extended storage
US9996557B2 (en) Database storage system based on optical disk and method using the system
US6505213B1 (en) File management apparatus and method
CN110221782A (en) Video file processing method and processing device
EP0733235A1 (en) Incremental backup system
CN110018989A (en) A kind of method and apparatus that snapshot compares
US20050132162A1 (en) Generic reallocation function for heap reconstitution in a multi-processor shared memory environment
US5423022A (en) Method for adapting a relational database management system so that it can address foreign information
Langdon Jr A note on associative processors for data management
JPH039494B2 (en)
CN107832097A (en) Data load method and device
JP3002590B2 (en) How to manage the database
US6842843B1 (en) Digital data storage subsystem including arrangement for increasing cache memory addressability
US6904441B2 (en) Method and apparatus for providing file system access to a disk array
KR100570428B1 (en) Data storage method in file system using grouping
US5802557A (en) System and method for caching information in a digital data storage subsystem
US8356230B2 (en) Apparatus to manage data stability and methods of storing and recovering data

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19991102

LAPS Cancellation because of no payment of annual fees