JPH07121411A - Data base storage area allocation device - Google Patents

Data base storage area allocation device

Info

Publication number
JPH07121411A
JPH07121411A JP5263853A JP26385393A JPH07121411A JP H07121411 A JPH07121411 A JP H07121411A JP 5263853 A JP5263853 A JP 5263853A JP 26385393 A JP26385393 A JP 26385393A JP H07121411 A JPH07121411 A JP H07121411A
Authority
JP
Japan
Prior art keywords
area
database
data
data base
storage area
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
JP5263853A
Other languages
Japanese (ja)
Inventor
Tomoyuki Goto
知之 後藤
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP5263853A priority Critical patent/JPH07121411A/en
Publication of JPH07121411A publication Critical patent/JPH07121411A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide a data base storage area allocation device which optimizes a data base area and which can easily manage the data base area. CONSTITUTION:A data area use situation monitor part 10 inquires of DBMS 20 the use situation of the data base area, and informs a data base area allocation part 30 of the inquired result. When a notice result from the data area use situation monitor part 10 is that the data base area is used by exceeding a previously set threshold, the data base area allocation part 30 transmits information for allocating a storage area corresponding to a previously set data unit stored in a set value storage part 40 to DBMS 20. DBMS 20 allocates data to the data base area based on received information.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データベース領域の空
き領域が不足した際に、該データベース領域を拡張可能
なデータベース記憶領域割当装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database storage area allocation device capable of expanding a database area when the free area of the database area is insufficient.

【0002】[0002]

【従来の技術】従来においては、限られたディスク資源
の中で複数のリレーショナル・データベース・マネジメ
ント・システム(RDBMS)及び複数のデータベース
領域を効率良く使用するために、各RDBMSのデータ
ベース領域の初期値を最低限に設定しておき、運用して
いく中で、領域が不足してきたデータベースに限って、
領域を追加するようにしている。
2. Description of the Related Art Conventionally, in order to efficiently use a plurality of relational database management systems (RDBMS) and a plurality of database areas within a limited disk resource, the initial value of the database area of each RDBMS is used. Set it to the minimum and operate it only for databases that have run out of space.
I am trying to add an area.

【0003】このような処理を行うものとして、「OR
ACLEデータベース管理者ガイドVERSION 6.0、株式
会社オラクル、平成2年5月1日発行」(原典:ORACLE
Database Administrator ’s Guide Version 6.0=オ
ラクル・データベース・アドミストレーターズ・ガイド
・バージョン6・0、原典製作者:Oracle Corporation
=オラクル・コーポレーション)に開示された技術が知
られている。この文献に記載されているOracle
(上記Oracle Corporationの登録商標)の場合において
は、データベースの中に表領域を生成し、この表領域の
中にデータベースファイルを作成して、テーブルの生成
・削除・検索などの操作を行うようになっている。また
テーブルを多数生成しデータベースファイルの容量が不
足した場合には、ALTER TABLESPACE ADD FILE 文によっ
てデータベースファイルの容量を増やすことができる。
As a means for performing such processing, "OR
ACLE database administrator guide VERSION 6.0, Oracle Corporation, issued May 1, 1990 "(Original source: ORACLE
Database Administrator's Guide Version 6.0 = Oracle Database Administrators Guide Version 6.0, original author: Oracle Corporation
(= Oracle Corporation) is known. Oracle described in this document
In the case of (registered trademark of Oracle Corporation above), create a tablespace in the database, create a database file in this tablespace, and perform operations such as table creation / deletion / search. Has become. Also, if you create many tables and the database file space is insufficient, you can increase the database file size with the ALTER TABLESPACE ADD FILE statement.

【0004】なお上述したデータベース領域の不足は、
ユーザがSQL(構造化照会言語)により、データをリ
レーショナル・データベース(RDB)に登録しようと
した際に、そのRDBが出すエラーメッセージによって
知ることができる。またデータベース領域の追加は、対
象としているデータベースの管理者の権利を必要とする
のが一般的である。
The above-mentioned lack of database area causes
When a user tries to register data in a relational database (RDB) by SQL (Structured Query Language), it can be known by an error message issued by the RDB. Further, addition of a database area generally requires the right of the administrator of the target database.

【0005】このため、ユーザが、SQLにより所定の
データをRDBに登録しようとした際に、エラーメッセ
ージによってデータベース領域の不足を知った場合は、
データベース管理者に依頼して、データベース領域を増
やしてもらっていた。
Therefore, when a user tries to register predetermined data in the RDB by SQL and finds out that the database area is insufficient by an error message,
I asked the database administrator to increase the database area.

【0006】またInformix-Online やSybaseを用いた場
合も、上記Oracleと同様である。
[0006] Also, when Informix-Online or Sybase is used, it is the same as the above-mentioned Oracle.

【0007】なおSQLによる問合わせの操作性を向上
させるようにしたものとして、特開昭59−16366
1に記載されたものが知られている。この公報の発明
は、挿入や更新などSQLによる問い合わせに必要な照
会構文(例えば挿入照会構文や更新照会構文など)を、
ソース表又はターゲット表を含む例示表の行及び列の中
並びに任意に付加される条件ボックス中に表れる、例示
要素又は黙示的オペランド記述を含む、1つ以上の要素
として表現された図式的言語による照会として記述し表
示する。そして、この表示された図式的言語による照会
に対してユーザにより値が設定されると、この値が設定
された図式的言語による照会情報を、線型言語の照会に
翻訳するようにしている。すなわち、通常、SQLによ
る問い合わせは、具体的なコマンドを記述した複雑な構
文を用いなければならないが、この公報の発明において
は、コマンドに対応するメッセージを問い合わせ形式で
表示するようにしているので、ユーザはこの問い合わせ
に応答して値を設定すれば良いことになる。従って、S
QL構文を詳細に知らない場合であっても、実際に必要
なSQL構文が生成されるので、SQLを理解できるデ
ータベース管理者が、上記公報の技術を用いて、データ
ベース領域を追加する場合には、SQLによる問合わせ
の操作性を向上させることができる。
[0007] JP-A-59-16366 discloses a method for improving the operability of inquiry by SQL.
The one described in No. 1 is known. The invention of this publication uses a query syntax (eg, insert query syntax or update query syntax) required for a query by SQL such as insert or update,
In a schematic language expressed as one or more elements, including example elements or implicit operand descriptions, appearing in the rows and columns of the example table containing the source or target table and in any optional conditional boxes Describe and display as a query. Then, when the user sets a value for the displayed query in the graphical language, the query information in the graphical language in which the value is set is translated into a query in the linear language. That is, in general, an inquiry by SQL must use a complicated syntax that describes a specific command, but in the invention of this publication, a message corresponding to the command is displayed in an inquiry format. The user should set the value in response to this inquiry. Therefore, S
Even if the QL syntax is not known in detail, the SQL syntax that is actually required is generated. Therefore, when a database administrator who understands SQL uses the technique of the above publication to add a database area, , SQL, it is possible to improve the operability of the inquiry.

【0008】[0008]

【発明が解決しようとする課題】上述したように従来に
おいては、データベースを利用するに際して、以下のよ
うな問題があった。
As described above, in the prior art, there were the following problems in using the database.

【0009】(1)データベース領域の不足が実際に発
生するまで、そのデータベース領域の空き領域が不足で
あるということを知ることができない。このため、デー
タベースへのデータの登録操作をしなければ、データベ
ース領域の不足が分からないこととなり、データベース
へのデータの登録作業を迅速に行うことができない。 (2)データベース領域の追加を、わざわざデータベー
ス管理者に依頼する必要がある。このため、データを登
録しようとしているユーザやデータベース管理者の作業
が繁雑となり作業効率が悪い。
(1) It cannot be known that the free area of the database area is insufficient until the shortage of the database area actually occurs. Therefore, unless the data is registered in the database, the lack of the database area cannot be known, and the data registration in the database cannot be performed quickly. (2) It is necessary to request the database administrator to add the database area. For this reason, the work of the user who is trying to register the data and the database administrator becomes complicated, resulting in poor work efficiency.

【0010】このように従来では、データベースを利用
するに際し、データベース領域へのデータの登録作業及
びデータベース領域の追加作業の作業効率が悪かった。
As described above, conventionally, when using the database, the work efficiency of registering data in the database area and adding the database area was poor.

【0011】この発明は、データベース領域の最適化を
図る共に、データベース領域の管理を容易に行うことの
できるデータベース記憶領域割当装置を提供することを
目的とする。
It is an object of the present invention to provide a database storage area allocating device capable of optimizing a database area and easily managing the database area.

【0012】[0012]

【課題を解決するための手段】この発明は、データベー
スを記憶する記憶領域の空き領域が不足した際に、新た
な記憶領域を割当てるデータベース記憶領域割当装置に
おいて、前記記憶領域の使用状況を監視する監視手段
(図1の10)と、該監視手段の監視結果が、前記記憶
領域の空き領域が予め設定された閾値に対応する領域よ
り小さい旨の場合は、予め設定されたデータ単位の記憶
領域の割当て操作を実行する割当手段(図1の30)と
を具備している。
According to the present invention, when a free space in a storage area for storing a database is insufficient, a database storage area allocating device for allocating a new storage area monitors the usage status of the storage area. When the monitoring means (10 in FIG. 1) and the monitoring result of the monitoring means indicate that the free area of the storage area is smaller than the area corresponding to the preset threshold value, the storage area of the preset data unit Allocation means (30 in FIG. 1) for executing the allocation operation of

【0013】[0013]

【作用】この発明においては、監視手段が、データベー
スを記憶するために割当てられた記憶領域の使用状況を
監視し、割当手段は、監視手段の監視結果が、前記記憶
領域の空き領域が予め設定された閾値に対応する領域よ
り小さい旨の場合は、予め設定されたデータ単位の記憶
領域の割当て操作を実行する。従って、この発明では、
記憶領域の空き領域が閾値に対応する領域より小さくな
ったときに、新たな記憶領域が自動的に割当てられるの
で、データベース領域の最適化を図ることができる。
According to the present invention, the monitoring means monitors the use status of the storage area allocated for storing the database, and the allocation means presets the monitoring result of the monitoring means and the free area of the storage area. If it is determined that the area is smaller than the area corresponding to the threshold value, a storage area allocation operation of a preset data unit is executed. Therefore, in this invention,
When the free area of the storage area becomes smaller than the area corresponding to the threshold value, a new storage area is automatically allocated, so that the database area can be optimized.

【0014】[0014]

【実施例】以下、本発明の実施例を添付図面を参照して
説明する。
Embodiments of the present invention will be described below with reference to the accompanying drawings.

【0015】図1は、本発明に係るデータベース記憶領
域割当装置の原理図を示したものである。同図におい
て、データ領域使用状況監視部10は、図示しないディ
スク等の記憶手段に割当てられた記憶領域すなわちデー
タベースを記憶するデータベース領域の使用状況を監視
し、この監視結果をデータベース領域割当て部30に通
知する。このデータベース領域割当て部30では、デー
タ領域使用状況監視部10からの監視結果と、設定値記
憶部40に記憶されているデータベース領域の拡張に関
するパラメータ(これについては後述する)とに基づい
て、データベース領域変更情報をDBMS20に出力す
る。
FIG. 1 shows the principle of a database storage area allocation device according to the present invention. In FIG. 1, the data area usage monitoring unit 10 monitors the usage status of a storage area allocated to a storage unit such as a disk (not shown), that is, a database area for storing a database, and the monitoring result is sent to the database area allocation unit 30. Notice. In the database area allocation unit 30, the database is allocated based on the monitoring result from the data area use status monitoring unit 10 and the parameters (which will be described later) related to the expansion of the database area stored in the set value storage unit 40. The area change information is output to the DBMS 20.

【0016】このデータベース領域変更情報は、現在の
データベース領域の残り容量すなわち空き領域が予め設
定された閾値に対応する領域より小さく、且つ現在まで
割当てられているデータベース領域が予め設定された最
大値に対応する領域より小さい場合に、予め設定された
データ単位のデータベース領域を追加する旨の情報とし
て発行される。
This database area change information is such that the remaining capacity of the current database area, that is, the free area is smaller than the area corresponding to the preset threshold value, and the database area that has been allocated up to now has the preset maximum value. If it is smaller than the corresponding area, it is issued as information to add a database area of a preset data unit.

【0017】そしてDBMS20は、上記データベース
領域変更情報に基づいて、新たなデータベース領域を上
記記憶手段に追加する。
Then, the DBMS 20 adds a new database area to the storage means based on the database area change information.

【0018】図2は、本発明に係るデータベース記憶領
域割当装置の一実施例を機能ブロック図で示したもので
ある。この機能ブロック図は、基本的には図1に示した
原理図の構成と同様になっている。なおこの機能ブロッ
ク図の構成においては、データ領域使用状況監視部10
は、設定値記憶部40に設定されているデータに基づい
て、DBMS20に対してデータベース領域の使用状況
を問合わせすることにより、データベース領域の使用状
況を監視するようになっている。なおこの実施例では、
DBMS20として、リレーショナル・データベース・
マネジメント・システム(RDBMS)を適用してい
る。従って以降の説明においてDBMS20はRDBM
Sを意味している。
FIG. 2 is a functional block diagram showing an embodiment of the database storage area allocation device according to the present invention. This functional block diagram is basically the same as the configuration of the principle diagram shown in FIG. In the configuration of this functional block diagram, the data area usage monitoring unit 10
Is configured to monitor the usage status of the database area by inquiring the usage status of the database area with respect to the DBMS 20 based on the data set in the setting value storage unit 40. In this example,
Relational database as DBMS 20
Management system (RDBMS) is applied. Therefore, in the following description, the DBMS 20 is the RDBM.
It means S.

【0019】設定値記憶部40にはデータベース領域の
拡張に関するパラメータデータが記憶されている。すな
わち、少なくとも、データベース領域を追加するか否か
の基準となるデータベース領域の残り容量(すなわち空
き領域の容量)の閾値(以下、閾値データという)、1
回について追加可能な追加容量の単位(以下、追加容量
単位データという)と、データベース管理者によって予
め割当てされるデータベース領域の最大値(以下、最大
値データという)とが記憶されている。
The set value storage unit 40 stores parameter data relating to the expansion of the database area. That is, at least the threshold value of the remaining capacity of the database area (that is, the capacity of the free area) that serves as a criterion for whether or not to add the database area (hereinafter referred to as threshold data), 1
The unit of additional capacity that can be added for each time (hereinafter referred to as additional capacity unit data) and the maximum value (hereinafter referred to as maximum value data) of the database area pre-allocated by the database administrator are stored.

【0020】データ領域使用状況監視部10は、設定値
記憶部40に記憶されている閾値データに従って、デー
タベース領域の使用状況を問合わせするためのSQLを
生成して、DBMS20へ発行すると共に、このDBM
S20からの問合わせ結果に基づいて、データベース領
域の使用状況の監視結果をデータベース領域割当て部3
0に通知する。
The data area usage status monitoring unit 10 generates an SQL for inquiring the usage status of the database area according to the threshold value data stored in the set value storage unit 40, issues it to the DBMS 20, and issues it to the DBMS 20. DBM
Based on the inquiry result from S20, the monitoring result of the usage status of the database area is sent to the database area allocation unit 3
Notify 0.

【0021】データベース領域割当て部30では、デー
タ領域使用状況監視部10からの監視結果と、設定値記
憶部40に記憶されている最大値データや及び追加容量
単位データとに基づいて、データベース領域の追加が必
要か否かを判断し、必要の場合は、データベース領域の
追加のためのSQLを生成して、DBMS20へ発行す
る。なお、データベース領域割当て部30では、割当て
られているデータベース領域の容量を知っているので、
「最大値データに基づくデータベース領域の容量」−
「現在割当てられているデータベース領域の容量」を演
算し、この演算結果である「残り容量」が、上記「追加
容量単位データに基づく容量」以上ある場合に、データ
ベース領域の追加が可能であると判断する。
The database area allocation unit 30 stores the database area based on the monitoring result from the data area usage status monitoring unit 10 and the maximum value data and the additional capacity unit data stored in the set value storage unit 40. It is determined whether addition is necessary, and if it is necessary, SQL for adding the database area is generated and issued to the DBMS 20. Since the database area allocation unit 30 knows the capacity of the allocated database area,
“Capacity of database area based on maximum value data” −
When the "currently allocated database area capacity" is calculated and the "remaining capacity" resulting from this calculation is greater than or equal to the "capacity based on the additional capacity unit data" above, it is possible to add a database area. to decide.

【0022】図3は、データベース領域の論理構造を示
したものである。この論理構造においては、データベー
ス領域は表領域から構成され、更に表領域はテーブルか
ら構成される。データベース領域100が割当てられる
ということは、表領域が割当てられるということを意味
している。従ってデータベース領域=全ての表領域の関
係が成立することになる。この例では、表領域110、
120が割当てられており、表領域110にはテーブル
111、112、113が登録され、一方、表領域12
0にはテーブル121が登録されている。この状態での
データベース領域100は、最初に表領域110が割当
てられたが、この表領域100の空き領域が不足したの
で、次に表領域120が割当てられたものである。表領
域の追加は、上述した追加容量単位データに対応する領
域毎に実施される。従って、上記各表領域110、12
0がそれぞれ追加容量単位データに対応する領域という
ことになる。
FIG. 3 shows the logical structure of the database area. In this logical structure, the database area is composed of table areas, and the table area is composed of tables. The allocation of the database area 100 means that the table area is allocated. Therefore, the relation of database area = all table areas is established. In this example, tablespace 110,
120 is allocated, and the tables 111, 112, and 113 are registered in the table area 110, while the table area 12
A table 121 is registered in 0. In the database area 100 in this state, the table area 110 is initially allocated, but since the free area of the table area 100 is insufficient, the table area 120 is allocated next. The addition of the table area is performed for each area corresponding to the above-mentioned additional capacity unit data. Therefore, each of the above table areas 110, 12
The area 0 corresponds to the additional capacity unit data.

【0023】この図3に示されるデータベース領域10
0においては、符号130で示される範囲が使用済領域
を表し、符号140で示される範囲が未使用領域を表
し、符号150で示される範囲が上述した閾値データに
対応する領域を表している。また図3に示す例におい
て、符号160で示される範囲が上述した最大値データ
に対応するデータベース領域の最大領域を表している。
また最大領域160からデータベース領域100を減算
した値すなわち符号170で示される範囲が、現在のデ
ータベース領域の割当て状態において、さらにデータベ
ース領域つまり表領域を、割当て可能な領域(追加可能
な領域)を表している。
The database area 10 shown in FIG.
At 0, the range indicated by reference numeral 130 represents a used area, the range indicated by reference numeral 140 represents an unused area, and the range indicated by reference numeral 150 represents an area corresponding to the above-mentioned threshold data. Further, in the example shown in FIG. 3, the range indicated by reference numeral 160 represents the maximum area of the database area corresponding to the maximum value data described above.
Further, a value obtained by subtracting the database area 100 from the maximum area 160, that is, a range indicated by reference numeral 170 represents an area (addable area) to which a database area, that is, a table area can be further allocated in the current allocation state of the database area. ing.

【0024】次に、本実施例のデータベース領域の割当
て処理について、図4及び図5を参照して説明する。図
4はデータ領域使用状況監視部10によるデータベース
領域の監視処理動作を示すフローチャートであり、図5
はデータベース領域割当て部30によるデータベース領
域の割当て処理動作を示すフローチャートである。
Next, the database area allocation processing of this embodiment will be described with reference to FIGS. 4 and 5. FIG. 4 is a flowchart showing the monitoring processing operation of the database area by the data area usage monitoring unit 10, and FIG.
6 is a flowchart showing a database area allocation processing operation by the database area allocation unit 30.

【0025】最初に、図4において、データ領域使用状
況監視部10は、設定値記憶部40から読み出した閾値
データ(Kbytes)をLとし、また予め設定される
テーブル1行当たりの容量(Kbytes)をRとした
場合に、必要な行数nを、n=L/Rを演算することに
より求める(ステップ201)。次に、予め設定されて
いる見出し行(テーブルを構成する行中の第1行目)デ
ータをデータベースに登録するためのSQL(これをS
QL(1)とする)を生成し、該SQL(1)をDBM
S20へ発行する(ステップ202)。
First, in FIG. 4, the data area use status monitoring unit 10 sets the threshold value data (Kbytes) read from the set value storage unit 40 to L, and the capacity (Kbytes) per table row set in advance. Where R is R, the required number of rows n is obtained by calculating n = L / R (step 201). Next, the SQL for registering preset heading row (first row in the rows constituting the table) data in the database (this is S
QL (1)) and generate the SQL (1) in DBM.
It is issued to S20 (step 202).

【0026】上記SQL(1)を受け取ったRDBMS
20からは、上記見出し行を登録できたか否かすなわち
エラーか否かの結果が、データ領域使用状況監視部10
に返されるので、データ領域使用状況監視部10は、返
された結果がエラーか否かを判断する(ステップ20
3)。
RDBMS receiving the above SQL (1)
From FIG. 20, the result of whether or not the above-mentioned heading line has been registered, that is, whether or not there is an error is displayed as the data area use status monitoring unit
The data area usage monitoring unit 10 determines whether the returned result is an error (step 20).
3).

【0027】ここで、エラー無しの場合は、n>0の式
が成立するか否かを判断し(ステップ204)、この式
が成立する場合は、上記見出し行以降に登録されるべき
予め設定された1行分のデータをデータベースに登録す
るためのSQL(これをSQL(2)とする)を生成
し、該SQL(2)を、DBMS20へ発行する(ステ
ップ205)。次に、n=n−1とし(ステップ20
6)、その後、上記ステップ203に戻る。
Here, if there is no error, it is judged whether or not the expression of n> 0 is satisfied (step 204), and if this expression is satisfied, a preset value to be registered after the above-mentioned heading line is set. SQL for registering the one line of the data thus created (referred to as SQL (2)) in the database is generated, and the SQL (2) is issued to the DBMS 20 (step 205). Next, n = n-1 is set (step 20).
6) Then, the process returns to step 203.

【0028】ステップ204において、n>0の式が成
立しない場合はリターン値=OKとする(ステップ20
7)。またステップ203においてエラーがある場合は
リターン値=NGとする(ステップ208)。
At step 204, if the expression of n> 0 is not satisfied, the return value = OK (step 20).
7). If there is an error in step 203, the return value = NG is set (step 208).

【0029】ここで、リターン値=OKということは、
データベース領域の残りの容量が少なくとも上記閾値デ
ータに対応する容量以上あり、データベース領域を追加
する必要がないうことを意味している。一方、リターン
値=NGということは、データベース領域の残りの容量
が上記閾値データに対応する容量より少ないので、デー
タベース領域を追加する必要があるということを意味し
ている。
Here, the return value = OK means that
This means that the remaining capacity of the database area is at least the capacity corresponding to the threshold value data and it is necessary to add the database area. On the other hand, the return value = NG means that the database area needs to be added because the remaining capacity of the database area is smaller than the capacity corresponding to the threshold data.

【0030】なお、上記予め設定されるテーブル1行当
たりの容量データ、見出し行データ及び1行分のデータ
は、データ領域使用状況監視部10に保持されていても
良いし、設定値記憶部40に記憶されていても良い。
The capacity data per one row of the preset table, the heading row data, and the data for one row may be held in the data area usage monitoring section 10 or the set value storage section 40. May be stored in.

【0031】この実施例においては、図4に示される処
理手順はデータ領域使用状況監視部10によって定期的
に実行されるようになっている。すなわちDBMS20
に対して定期的にデータベース領域の使用状況の問合わ
せが行われる。
In this embodiment, the processing procedure shown in FIG. 4 is regularly executed by the data area usage monitoring unit 10. That is, the DBMS 20
Is periodically inquired about the usage status of the database area.

【0032】次に、図5において、データベース領域割
当て部30は、データ領域使用状況監視部10からのリ
ターン値を得て(ステップ301)、このリターン値が
“NG”か“OK”かを調べる(ステップ302)。
Next, in FIG. 5, the database area allocation unit 30 obtains a return value from the data area usage monitoring unit 10 (step 301) and checks whether this return value is "NG" or "OK". (Step 302).

【0033】ステップ302において、リターン値がN
Gの場合は、データベース領域の最大領域(最大容量)
から、現在までに割当てられているデータベース領域
(の容量)を引いた値が、上記追加容量単位データに対
応する容量分以上あり、領域を追加することが可能かを
チェック(ステップ303)。
In step 302, the return value is N
In case of G, maximum area of database area (maximum capacity)
Then, it is checked whether the value obtained by subtracting (the capacity of) the database area allocated up to now is equal to or larger than the capacity corresponding to the additional capacity unit data and the area can be added (step 303).

【0034】ここで、領域を追加可能な場合は、図示し
ない上記記憶手段に新たなデータベース領域(つまり表
領域)を割当てするためのSQL(これをSQL(3)
とする)を生成して、DBMS20へ発行し(ステップ
304)、一方、領域を追加することが不可能な場合は
警告メッセージを出力する(ステップ305)。このメ
ッセージは、図示しない表示手段によって表示される。
If an area can be added, SQL for allocating a new database area (that is, table area) to the storage means (not shown) (this is SQL (3))
Is generated) and is issued to the DBMS 20 (step 304). On the other hand, when the area cannot be added, a warning message is output (step 305). This message is displayed by a display unit (not shown).

【0035】そして上記SQL(3)を受け取ったRD
BMS20では、図示しない記憶手段に表領域の割当て
を実施することになる。
Then, the RD that has received the above SQL (3)
In the BMS 20, the table area is assigned to the storage means (not shown).

【0036】すなわちステップ304の処理が行われる
場合というのは、図6に示す様に、上記最大値データに
対応するデータベース領域の最大値がMAX1(図3の
データベース領域の最大領域160に相当)のときに、
データベース領域610(図3のデータベース領域10
0に相当)が既に割当てられ、その領域のうち、未使用
領域620(図3の未使用領域140に相当)が閾値デ
ータに対応する領域630(図3の閾値に対応する領域
150に相当)より少ない場合に、表領域640(図中
斜線部分)が新たに追加されることになる。すなわち、
最大領域MAX1からデータベース領域610を減算し
て得られる拡張可能領域E1(図3の拡張可能領域17
0に相当)が、上記追加要領単位データに対応する領域
(図3の例えば表領域120に相当)よりも大きい場合
には、追加要領単位データに対応する表領域640が追
加される。この結果として、最大領域MAX1から既に
割り当てられているデータベース領域(つまり領域61
0と領域640とを加算した領域)を減算して得られる
拡張可能領域E2が追加要領単位データに対応する領域
より小さいとする。
That is, when the process of step 304 is performed, as shown in FIG. 6, the maximum value of the database area corresponding to the maximum value data is MAX1 (corresponding to the maximum area 160 of the database area of FIG. 3). When
Database area 610 (database area 10 in FIG. 3)
(Corresponding to 0) is already allocated, and an unused area 620 (corresponding to the unused area 140 in FIG. 3) of that area is the area 630 corresponding to the threshold data (corresponding to the area 150 corresponding to the threshold in FIG. 3). When the number is smaller, the table area 640 (hatched portion in the drawing) is newly added. That is,
Expandable area E1 (expandable area 17 in FIG. 3) obtained by subtracting database area 610 from maximum area MAX1.
(Corresponding to 0) is larger than the area (corresponding to, for example, the table area 120 in FIG. 3) corresponding to the additional procedure unit data, the table area 640 corresponding to the additional procedure unit data is added. As a result, the database area already allocated from the maximum area MAX1 (that is, the area 61
It is assumed that the expandable area E2 obtained by subtracting (the area obtained by adding 0 and the area 640) is smaller than the area corresponding to the additional procedure unit data.

【0037】そして次回にデータベース領域の追加が必
要となり、図5に示される処理手順が実行された場合に
おいては、拡張可能な領域は拡張可能領域E2であるの
で、新たな表領域640を追加するだけの空きの領域が
存在していないことになり、結果としてステップ305
の処理すなわち警告メッセージが出力されることとな
る。
When the database area needs to be added next time and the processing procedure shown in FIG. 5 is executed, the expandable area is the expandable area E2, so that a new table area 640 is added. There is no free area, and as a result, step 305
That is, the warning message is output.

【0038】なお従来においては、図6において、表領
域640が追加される前の状態であっても、既に説明し
たようにデータベース領域の空き領域が不足していると
いうことを知ることはできなかった。そしてこの状態か
ら、未使用領域620以上のデータをデータベースに登
録しようとした際に、初めて、データベース領域の不足
を知ることになる。
Conventionally, in FIG. 6, even before the table area 640 is added, it is not possible to know that the free area of the database area is insufficient as already described. It was Then, from this state, when the data of the unused area 620 or more is to be registered in the database, the shortage of the database area is first known.

【0039】ここで、上述したOracleを使用する
場合の上述したSQL(1)、SQL(2)及びSQL
(3)の形式の具体例を以下に述べる。なお、これはあ
くまでも一例であり、これに限定されるものではない。
Here, the above-mentioned SQL (1), SQL (2) and SQL when using the above-mentioned Oracle
A specific example of the format of (3) will be described below. Note that this is merely an example, and the present invention is not limited to this.

【0040】SQL(1)の具体例 create table<table name>(col0 long,col1 longraw,co
l2 char,,…,col9 char) ここで、create tableはデータを保持する基本的な構造
である表(テーブル)を作成するということを意味し、
<table name>は表の名前を表し、col0 long においてco
l0は列の名前、longはデータ型の名前を表し、col1 lon
grawにおいてcol1は列の名前、longraw はデータ型を表
し、col2 char においてcol2は列の名前、charはデータ
型、col9 char においてcol9は列の名前、charはデータ
型を表している。そしてSQL(1)全体では、1列目
がcol0という名前で型がlong、2列目がcol1という名前
で型がlongraw 、…という、全部で10列の<table nam
e>という名前の表を作成するということを意味してい
る。
Concrete example of SQL (1) create table <table name> (col0 long, col1 longraw, co
l2 char ,, ..., col9 char) where create table means to create a table (table) that is a basic structure to hold data,
<table name> represents the name of the table, and in col0 long, co
l0 is the column name, long is the data type name, col1 lon
In graw, col1 represents a column name, longraw represents a data type, col2 char represents col2 a column name, char represents a data type, col9 char represents col9 a column name, and char represents a data type. In the whole SQL (1), the first column is named col0, the type is long, the second column is named col1, the type is longraw, and so on.
This means creating a table named e>.

【0041】SQL(2)の具体例 insert into<table name>value('a','b', …, 'aa') ここで、insert into は指定した表に新しい行を追加す
るということを意味し、<table name>は表の名前を表
し、'a','b',…, 'aa'は上記create table文で指定した
列の名前の位置(列)に対応する値を表し、例えば'a'
はcol0の名前の列に対応する値であり、また'aa'はcol9
の名前の列に対応する値である。そしてSQL(2)全
体では、'a','b',…, 'aa'という値を持つ行を<tablena
me>という名前の表に追加するということを意味してい
る。
Concrete example of SQL (2) insert into <table name> value ('a', 'b', ..., 'aa') Here, insert into means to add a new row to the specified table. Meaning, <table name> represents the name of the table, 'a', 'b',…, 'aa' represents the value corresponding to the position (column) of the column name specified in the create table statement above, For example, 'a'
Is the value corresponding to the column named col0, and'aa 'is col9
The value corresponding to the column of the name of. Then, in the entire SQL (2), the rows having the values'a ',' b ', ...
This means adding to the table named me>.

【0042】SQL(3)の具体例 alter tablespace add file 又は create tablespace ここで、alter tablespace add file は表領域として利
用可能な領域を追加するということを意味し、create t
ablespace は表領域を作成するということを意味してい
る。
Concrete example of SQL (3) alter tablespace add file or create tablespace Here, alter tablespace add file means that an area usable as a tablespace is added, and create t
ablespace means to create a tablespace.

【0043】なお、この実施例においては、DBMS2
0に対して問合わせする際に使用するSQLを上述した
Oracleとした場合には、データ領域使用状況監視
部10は、[select*from sys.dba segments]あるいは[s
elect*from sys.dba−free−space]などのSQLをDB
MS20に発行することにより、ビュー(すなわちテー
ブル)を検索し、この検索結果を解析して、データベー
ス領域の使用状況を監視するようにしても良い。ここで
例示した2つのSQLはいずれも、sys.dba-segments o
r sys.dba-free-spaceというデータディクショナリの全
ての列を検索する、ということを意味している。なおデ
ータディクショナリとは、RDBMS自身とユーザのた
めのシステム中の基本情報であり、表の形式で保持され
るものである。
In this embodiment, the DBMS2
When the SQL used when making an inquiry to 0 is the above-mentioned Oracle, the data area usage monitoring unit 10 selects [select * from sys.dba segments] or [s
elect * from sys.dba-free-space]
The view (that is, the table) may be searched by issuing it to the MS 20, and the search result may be analyzed to monitor the usage status of the database area. The two SQLs illustrated here are both sys.dba-segments o
It means to search all columns in the data dictionary called r sys.dba-free-space. The data dictionary is basic information in the system for the RDBMS itself and the user, and is held in the form of a table.

【0044】以上説明したように本実施例によれば、割
当てられたデータベース領域の未使用領域が予め設定さ
れた閾値に対応する領域より少ない場合に、予め設定さ
れた追加単位の表領域が割当てされるので、一般ユーザ
は、データベース領域の未使用領域を意識することな
く、作業を実施することができる。すなわち、一般ユー
ザにおいては、従来の如く、データベース領域の不足を
知った後に、データベースの管理者に領域の追加の依頼
をする必要がない。従って作業効率を向上させることが
できる。またデータベースの管理者においても、一般ユ
ーザからの上記依頼が無くなるので、作業効率を向上さ
せることができる。
As described above, according to this embodiment, when the unused area of the allocated database area is smaller than the area corresponding to the preset threshold value, the table area of the preset additional unit is allocated. Therefore, the general user can perform the work without being aware of the unused area of the database area. That is, a general user does not need to request the database administrator to add an area after he / she knows that the database area is insufficient, as in the conventional case. Therefore, working efficiency can be improved. In addition, the database administrator can also improve work efficiency because the above-mentioned request from a general user is eliminated.

【0045】以上述べた実施例では、DBMS20がR
DBMSの場合について説明したが、本発明は、例えば
オブジェクト指向データベース(OODB)を扱うオブ
ジェクト指向データベース管理システム(OODBM
S)等その他のデータベース・マネジメント・システム
にも適用することができる。
In the above-described embodiment, the DBMS 20 uses R
Although the case of the DBMS has been described, the present invention is directed to an object-oriented database management system (OODBM) that handles an object-oriented database (OODB), for example.
It can also be applied to other database management systems such as S).

【0046】[0046]

【発明の効果】以上詳細に説明したように、本発明によ
れば、監視手段が、データベースを記憶するために割当
てられた記憶領域の使用状況を監視し、割当手段は、監
視手段の監視結果が、前記記憶領域の空き領域が予め設
定された閾値に対応する領域より小さい旨の場合は、予
め設定されたデータ単位の記憶領域の割当て操作を実行
するようにしたので、記憶領域の空き領域が閾値より小
さくなったときに、新たな記憶領域が自動的に割当てら
れることとなり、よって記憶領域の最適化を図ることが
できる。
As described in detail above, according to the present invention, the monitoring means monitors the usage status of the storage area allocated for storing the database, and the allocation means determines the monitoring result of the monitoring means. However, if the free space of the storage area is smaller than the area corresponding to the preset threshold value, the storage area allocation operation of the preset data unit is executed. When becomes smaller than the threshold value, a new storage area is automatically allocated, and thus the storage area can be optimized.

【0047】また上述したことから、データベース領域
の空き領域が閾値に対応する領域より少なくなる以前
に、新たなデータベース領域が割当てされるので、デー
タベースへのデータの登録操作作業を高率良く実施する
ことができる。
Further, from the above, a new database area is allocated before the free area of the database area becomes smaller than the area corresponding to the threshold value, so that the operation of registering data in the database can be performed with high efficiency. be able to.

【0048】更に従来と比較して、データベース領域の
不足を知った後に、データベースの管理者に領域の追加
の依頼をする必要がないので、データベース領域の管理
を容易に行うことができる。
Further, as compared with the conventional method, it is not necessary to request the database administrator to add the area after the shortage of the database area is known, so that the database area can be easily managed.

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

【図1】本発明の基本的原理を示す原理図。FIG. 1 is a principle diagram showing the basic principle of the present invention.

【図2】本発明に係るデータベース領域割当装置の一実
施例を示す機能ブロック図。
FIG. 2 is a functional block diagram showing an embodiment of a database area allocation device according to the present invention.

【図3】本実施例におけるデータベース領域の論理構造
を説明するための図。
FIG. 3 is a diagram for explaining a logical structure of a database area in this embodiment.

【図4】本実施例におけるデータ領域使用状態監視部に
よるデータベース領域の監視処理動作を示すフローチャ
ート。
FIG. 4 is a flowchart showing a database area monitoring processing operation by a data area usage state monitoring unit in the present embodiment.

【図5】本実施例におけるデータベース領域割当て部に
よるデータベース領域の割当て処理動作を示すフローチ
ャート。
FIG. 5 is a flowchart showing a database area allocation processing operation by a database area allocation unit in the present embodiment.

【図6】データベース領域の割当て処理を説明するため
の図。
FIG. 6 is a diagram for explaining a database area allocation process.

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

10…データ領域使用状況監視部、20…DBMS、3
0…データベース領域割当て部、40…設定値記憶部。
10 ... Data area usage monitoring unit, 20 ... DBMS, 3
0 ... Database area allocation unit, 40 ... Set value storage unit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】データベースを記憶する記憶領域の空き領
域が不足した際に、新たな記憶領域を割当てるデータベ
ース記憶領域割当装置において、 前記記憶領域の使用状況を監視する監視手段と、 前記監視手段の監視結果が、前記記憶領域の空き領域が
予め設定された閾値に対応する領域より小さい旨の場合
は、予め設定されたデータ単位の記憶領域の割当て操作
を実行する割当手段とを具備したことを特徴とするデー
タベース記憶領域割当装置。
1. A database storage area allocating device for allocating a new storage area when a free area of a storage area for storing a database is insufficient, and monitoring means for monitoring the usage status of the storage area; When the monitoring result indicates that the free space of the storage area is smaller than the area corresponding to the preset threshold value, the storage device further comprises allocation means for executing a storage area allocation operation of a preset data unit. Characteristic database storage area allocation device.
JP5263853A 1993-10-21 1993-10-21 Data base storage area allocation device Pending JPH07121411A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5263853A JPH07121411A (en) 1993-10-21 1993-10-21 Data base storage area allocation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5263853A JPH07121411A (en) 1993-10-21 1993-10-21 Data base storage area allocation device

Publications (1)

Publication Number Publication Date
JPH07121411A true JPH07121411A (en) 1995-05-12

Family

ID=17395144

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5263853A Pending JPH07121411A (en) 1993-10-21 1993-10-21 Data base storage area allocation device

Country Status (1)

Country Link
JP (1) JPH07121411A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7162693B2 (en) 2000-10-02 2007-01-09 Fujitsu Limited Process for managing data in which existing data item is moved to neighbor page before insertion or after deletion of another data item

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7162693B2 (en) 2000-10-02 2007-01-09 Fujitsu Limited Process for managing data in which existing data item is moved to neighbor page before insertion or after deletion of another data item

Similar Documents

Publication Publication Date Title
US6366901B1 (en) Automatic database statistics maintenance and plan regeneration
US5404510A (en) Database index design based upon request importance and the reuse and modification of similar existing indexes
US7289999B2 (en) Automatic database statistics creation
US6092061A (en) Data partitioning by co-locating referenced and referencing records
US7587383B2 (en) Redundant join elimination and sub-query elimination using subsumption
US20180060389A1 (en) Query optimization over distributed heterogeneous execution engines
US10120901B2 (en) System and program for joining source table rows with target table rows
US6643636B1 (en) Optimizing a query using a non-covering join index
US20160350347A1 (en) Techniques for evaluating query predicates during in-memory table scans
US6834279B1 (en) Method and system for inclusion hash joins and exclusion hash joins in relational databases
US7702627B2 (en) Efficient interaction among cost-based transformations
EP1049997B1 (en) Method and apparatus for optimizing query generation by selectively utilizing attributes or key values
US20100138456A1 (en) System, method, and computer-readable medium for a locality-sensitive non-unique secondary index
US6301581B1 (en) Method and system for managing access to a plurality of data objects
WO2017088666A1 (en) Data storage method and coordinator node
US8126905B2 (en) System, method, and computer-readable medium for optimizing the performance of outer joins
US9342545B2 (en) Using a partially built index in a computer database system
Suganya et al. Efficient fragmentation and allocation in distributed databases
JPH07121411A (en) Data base storage area allocation device
US11048692B2 (en) Partition move in case of table update
US11294903B2 (en) Partition-wise processing distribution
US20020138464A1 (en) Method and apparatus to index a historical database for efficient multiattribute SQL queries
JP2001142898A (en) Execution propriety judging method of inquiry processing
US20200320076A1 (en) Determination of query operator execution location
KR0175579B1 (en) Version Control Method of Object-Oriented SDL Specification