JPH0689219A - Data base system - Google Patents

Data base system

Info

Publication number
JPH0689219A
JPH0689219A JP4238245A JP23824592A JPH0689219A JP H0689219 A JPH0689219 A JP H0689219A JP 4238245 A JP4238245 A JP 4238245A JP 23824592 A JP23824592 A JP 23824592A JP H0689219 A JPH0689219 A JP H0689219A
Authority
JP
Japan
Prior art keywords
data
file
attribute
class
index
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
JP4238245A
Other languages
Japanese (ja)
Inventor
Ririan Harada
リリアン 原田
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 JP4238245A priority Critical patent/JPH0689219A/en
Publication of JPH0689219A publication Critical patent/JPH0689219A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To provide a data base system which speedily makes access to the data of a complicated structure where the information structure of the real world is directly reflected by means of an index. CONSTITUTION:A data base 1 where reference can be executed between data is provided. A file management part 2 adds the identifiers 6a-6n of data required for the access operation of a file at respective data and attributes 7a-7b as indexes 8a-8n, and holds the identifier 6i of data of the file and the attribute 7n of data in the file, correlating them with each other, as a new index 10 for directly retrieving the identifier 6i of data in a different file 4i where the value of the attribute 7n of data in the file 4n is set to be a retrieval key 9. A data base management part 3 operates the new index 10 so as to make access to the file when an inquiry for requesting the identifier of different data for the value of the attribute of data is given.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データベースに格納さ
れたデータをアクセスするデータベースシステムに関
し、特に、実世界の情報構造を直接的に反映させたより
複雑な構造のデータを効率よくアクセスするデータベー
スシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database system for accessing data stored in a database, and more particularly to a database system for efficiently accessing data having a more complicated structure that directly reflects the information structure of the real world. Regarding

【0002】[0002]

【従来の技術】データベースシステムとは、データベー
スに格納されたデータをアクセスするものであり、本質
的に計算機で処理される情報管理システムである。ま
た、最近のデータベースシステムは、比較的単純で規則
的なデータだけでなく、実世界の情報構造を直接的に反
映させたより複雑なデータ構造もアクセスする。このよ
うな複雑なデータ構造へのアクセスを効率良く行なう場
合には、実際にアクセスすべき二次記憶上のページを決
定するファイル管理が重要となる。特に、ファイル管理
において、データに補助的なアクセス情報を付加するイ
ンデクシング技術が大きな影響を与える。
2. Description of the Related Art A database system is an information management system that accesses data stored in a database and is essentially processed by a computer. Also, modern database systems access not only relatively simple and regular data, but also more complex data structures that directly reflect real world information structures. In order to efficiently access such a complicated data structure, file management that determines the page on the secondary storage to be actually accessed is important. In particular, in file management, the indexing technique of adding auxiliary access information to data has a great influence.

【0003】図11は従来のこの種のデータベースシス
テムの構成ブロック図である。図11において、データ
ベース1には複数のファイル(図示しない)が設けられ
各ファイルに複雑な構造のデータが格納されている。
FIG. 11 is a block diagram of a conventional database system of this type. In FIG. 11, the database 1 is provided with a plurality of files (not shown), and each file stores data having a complicated structure.

【0004】このデータに対するユーザからの問い合わ
せQは、まず問い合わせプロセッサ11によっていくつ
かのコマンドに変換され、さらにデータベース管理部3
によってファイル操作に変換される。ファイル管理部2
は、データベース1の二次記憶上の格納構造の情報を有
し、その情報に基づいて前記ファイル操作に必要となる
二次記憶上のアクセスするページを決定する。
The inquiry Q from the user for this data is first converted into a number of commands by the inquiry processor 11, and further the database management unit 3
Is converted into a file operation by. File management unit 2
Has information on the storage structure of the database 1 on the secondary storage, and determines the page to be accessed on the secondary storage required for the file operation based on this information.

【0005】ファイル管理部2は、データ検索処理を高
速化するために、データベース1に格納されているデー
タの中の前記問い合わせQに対応したデータをアクセス
するための補助的なアクセス情報としてのインデックス
を有している。
The file management unit 2 uses an index as auxiliary access information for accessing the data corresponding to the inquiry Q in the data stored in the database 1 in order to speed up the data retrieval process. have.

【0006】このインデックスを用いてファイル内のデ
ータを検索する場合、例えば本の索引を使用するときの
ような方法を用いている。すなわち、本の全ページを走
査するのではなく、索引で探している単語だけを見れ
ば、どのページを読めばいいかわかる。
When data in a file is searched by using this index, a method such as when using a book index is used. That is, instead of scanning every page of a book, you can see which page you should read by looking only at the word you are looking for in the index.

【0007】インデックスは(x、p)という組の集ま
りであり、ファイル中で、キーxをもつレコードへのポ
インタをpとする。このインデックスをみれば、ファイ
ル全体をアクセスする必要はなく、あるキーxを持つレ
コードがファイル内のどこにあるかわかる。
An index is a collection of a set (x, p), and a pointer to a record having a key x in a file is p. By looking at this index, it is possible to know where in the file the record having a certain key x is located, without having to access the entire file.

【0008】また、従来のデータベースシステムでは、
ファイル毎にインデックスが生成され、比較的に単純で
規則的なデータの場合には、データ処理速度の向上が期
待できる。
Further, in the conventional database system,
An index is generated for each file, and in the case of relatively simple and regular data, improvement in data processing speed can be expected.

【0009】[0009]

【発明が解決しようとする課題】しかしながら、最近良
く用いられる実世界の情報構造を直接的に反映させたよ
り複雑な構造のデータ、すなわち複数のインデックスを
操作しなければ検索できないようなデータに対する問い
合わせがあった場合には、ファイル毎にインデックスが
設けられているため、ファイル間の参照が多くなる。つ
まり、操作するインデックスが多いため、複雑な構造の
データを検索するにはかなりの時間を要することにな
り、データ処理速度が低下していた。
However, a query for data having a more complicated structure that directly reflects the information structure of the real world, which is often used recently, that is, data that cannot be searched without operating a plurality of indexes, is made. If there is, an index is provided for each file, so that there are many references between files. In other words, since there are many indexes to be operated, it takes a considerable amount of time to search for data having a complicated structure, and the data processing speed is reduced.

【0010】本発明は、このような点に鑑みてなされた
もので、その目的とするところは、実世界の情報構造を
直接的に反映させた複雑な構造のデータをインデックス
により迅速にアクセスするデータベースシステムを提供
することにある。
The present invention has been made in view of the above points, and an object thereof is to quickly access data having a complicated structure directly reflecting the information structure of the real world by an index. To provide a database system.

【0011】[0011]

【課題を解決するための手段】本発明は、上記課題を解
決し目的を達成するために下記の構成とした。図1は本
発明の原理図である。複数のファイル4a〜4nを有す
ると共にファイルの夫々にデータを有しデータ5a〜5
n間で参照を行なえるデータベース1を具備し、データ
ベース1のデータ毎にファイルのアクセス操作に必要な
データの識別子6a〜6nと属性7a〜7nとをインデ
ックス8a〜8nとして付加するファイル管理部2を設
け、データに対する問い合わせがあった場合に前記ファ
イル管理部2によりデータ毎に付加されたインデックス
8a〜8nを操作することで各ファイル4a〜4nをア
クセス操作するデータベース管理部3とを備えている。
In order to solve the above problems and achieve the object, the present invention has the following constitution. FIG. 1 shows the principle of the present invention. Data 5a to 5n having a plurality of files 4a to 4n and data in each of the files
A file management unit 2 having a database 1 that can be referred to between n and adding data identifiers 6a to 6n and attributes 7a to 7n necessary for file access operations as indexes 8a to 8n for each data of the database 1. And a database management unit 3 for accessing the files 4a to 4n by operating the indexes 8a to 8n added for each data by the file management unit 2 when a data inquiry is made. .

【0012】前記ファイル管理部2は、あるファイル4
nのデータの属性7nの値を検索キー9とする別のファ
イル4iのデータの識別子6iを直接検索するための新
たなインデックス10として、別のファイルのデータの
識別子6iとあるファイルのデータの属性7nとを関連
付けて保持している。
The file management unit 2 has a file 4
The attribute 6n of the data of another file is used as a new index 10 for directly searching the identifier 6i of the data of another file 4i using the value of the attribute 7n of the data of n as the search key 9. 7n are held in association with each other.

【0013】前記データベース管理部3は、利用者から
あるデータの属性の値に対する別のデータの識別子を求
める問い合わせがあった場合に前記新たなインデックス
10を操作することでファイルをアクセス操作するよう
構成する。
The database management unit 3 is configured to access the file by operating the new index 10 when the user makes an inquiry for the identifier of another data with respect to the value of the attribute of a certain data. To do.

【0014】より望ましくは以下のようにするのがよ
い。すなわち、前記ファイル管理部2は、前記問い合わ
せの頻度が所定の頻度を超えた場合に、前記各ファイル
4a〜4nを用いて新たなインデックス10を生成する
よう構成する。
More preferably, the following is preferable. That is, the file management unit 2 is configured to generate a new index 10 by using the files 4a to 4n when the inquiry frequency exceeds a predetermined frequency.

【0015】また、前記検索キー9は、参照される最後
のデータ7nの属性5nの値であり、前記別のデータの
識別子は参照される最初のデータ5aの識別子6aであ
ってもよい。
Further, the search key 9 may be a value of the attribute 5n of the last data 7n to be referred to, and the identifier of the other data may be the identifier 6a of the first data 5a to be referred to.

【0016】さらに、前記データベース1は、オブジェ
クト指向データベースであり、前記ファイルに対応する
クラスを複数用意し前記各クラスにオブジェクト識別子
を有するとともに各クラスが複数の属性を有しかつ上位
クラスの属性が下位クラスを参照する複合オブジェクト
を構成し、あるクラスの属性の値を検索キーとする別の
クラスのオブジェクト識別子を直接検索するための新た
なインデックスとして、別のクラスの識別子とあるクラ
スの属性とを保持するよう構成する。
Further, the database 1 is an object-oriented database, a plurality of classes corresponding to the files are prepared, each class has an object identifier, each class has a plurality of attributes, and the attributes of the upper class are As a new index for constructing a composite object that refers to a subordinate class and using the value of an attribute of a class as a search key to directly search the object identifier of another class, the identifier of another class and the attribute of a class are used. To hold.

【0017】[0017]

【作用】上記のように構成することにより、ファイル管
理部2が、あるファイル4nのデータの属性7nの値を
検索キー9とする別のファイル4iのデータの識別子6
iを直接検索するための新たなインデックス10とし
て、別のファイルのデータの識別子6iとあるファイル
のデータの属性7nとを関連付けて保持し、データベー
ス管理部3は、あるデータの属性7nの値に対する別の
データの識別子6iを求める問い合わせがあった場合に
新たなインデックス10のファイルのデータの属性7n
から直ちに識別子6iを求めることができる。
With the above configuration, the file management unit 2 allows the identifier 6 of the data of another file 4i using the value of the attribute 7n of the data of a certain file 4n as the search key 9.
As the new index 10 for directly searching i, the identifier 6i of the data of another file and the attribute 7n of the data of a certain file are held in association with each other, and the database management unit 3 sets the value of the attribute 7n of the certain data. When there is an inquiry for another data identifier 6i, the attribute 7n of the data of the file of the new index 10
The identifier 6i can be immediately obtained from

【0018】よって、ファイルのアクセス操作が少なく
て済み、データ処理速度を向上できる。また、問い合わ
せの頻度が所定の頻度を超えた場合に新たなインデック
スを生成するので、実情に即したデータ処理が行える。
Therefore, the number of file access operations can be reduced and the data processing speed can be improved. Further, since a new index is generated when the frequency of inquiries exceeds a predetermined frequency, data processing can be performed according to the actual situation.

【0019】さらに、新たなインデックスの参照される
最後のデータ5nの属性7nの値から参照される最初の
データ5aの識別子6aを直ちに求めるので、ファイル
のアクセス回数が大幅に少なくて済む。
Further, since the identifier 6a of the first data 5a to be referred to is immediately obtained from the value of the attribute 7n of the last data 5n to be referred to in the new index, the number of file accesses can be greatly reduced.

【0020】また、データベースがオブジェクト指向デ
ータベースである場合には以下のように動作する。図2
は本発明におけるオブジェクト指向データベースのイン
デクシングを説明する図、図3は本発明で新たに生成さ
れたインデックスを示す図、図4は従来のインデクシン
グによるファイル毎の各インデックスの内容を示す図で
ある。オブジェクト指向データベースは、ファイル、レ
コード、フィールドにそれぞれ対応するクラス、インス
タンス、属性という述語を用いる。
When the database is an object-oriented database, it operates as follows. Figure 2
Is a diagram for explaining the indexing of the object-oriented database according to the present invention, FIG. 3 is a diagram showing an index newly generated according to the present invention, and FIG. 4 is a diagram showing the contents of each index for each file by the conventional indexing. The object-oriented database uses predicates of classes, instances, and attributes corresponding to files, records, and fields.

【0021】図2においては、例えば、3つのクラス2
1,22,23で各クラスが3つの属性21a〜21
c,22a〜22c,23a〜23cを有し、各々イン
スタンスがオブジェクト識別子OID31〜33を有す
るとする。
In FIG. 2, for example, three class 2
1, 22 and 23 each class has three attributes 21a to 21
c, 22a to 22c, 23a to 23c, and each instance has an object identifier OID31 to 33.

【0022】この場合に、”クラス23の属性23cの
値がjである複合オブジェクトのOID31を求めよ”
のようなaを求める問い合わせがあった場合における本
発明システムと従来システムとの比較を行なう。
In this case, "obtain the OID 31 of the compound object in which the value of the attribute 23c of the class 23 is j"
The system of the present invention is compared with the conventional system when there is an inquiry for "a".

【0023】まず、本発明では、図3に示すように属性
23c及びOID31のインデックス41が用意され
る。複合オブジェクトのクラス23の属性23cとクラ
ス21のOID31のみが一つのインデックス41に保
持され、問い合わせに答えるには、単一のインデックス
41を操作するだけで、属性23cの値jから直接にO
ID31のaをアクセスできる。
First, in the present invention, as shown in FIG. 3, the attribute 23c and the index 41 of the OID 31 are prepared. Only the attribute 23c of the class 23 of the compound object and the OID 31 of the class 21 are held in one index 41. To answer the inquiry, only the single index 41 is operated and the value j of the attribute 23c is directly changed to O.
The ID a can be accessed.

【0024】一方、図4に示す従来のインデクシングで
は、クラス21の属性21cに対し属性21c及びOI
D31のインデックス51を用意し、クラス22の属性
22cに対し属性22c及びOID32のインデックス
52を用意し、クラス23の属性23cに対し属性23
c及びOID33のインデックス53を用意する。
On the other hand, in the conventional indexing shown in FIG. 4, the attribute 21c of the class 21 is different from the attribute 21c and OI.
The index 51 of D31 is prepared, the attribute 22c is prepared for the attribute 22c of the class 22, and the index 52 of the OID32 is prepared, and the attribute 23c is prepared for the attribute 23c of the class 23.
An index 53 of c and OID 33 is prepared.

【0025】問い合わせに答えるには、まずインデック
ス53で属性23cの値jからOID33のgを求め、
次にインデックス52で属性22cの値gからOID3
2のdを求め、最後にインデックス51で属性21cの
値dからOID31のaを求める。
To answer the inquiry, first, the index 53 is used to obtain the g of the OID 33 from the value j of the attribute 23c,
Next, at the index 52, from the value g of the attribute 22c to the OID3
Then, d of 2 is obtained, and finally, a of the OID 31 is obtained from the value d of the attribute 21c by the index 51.

【0026】このように従来システムは、問い合わせに
対して複合オブジェクトを構成するクラス分のインデッ
クスの操作が必要であるが、本発明システムは、複雑な
データ構造に対する問い合わせの場合、つまり、ファイ
ル間の参照が多い場合でも、参照関係のファイル毎のイ
ンデックスを操作する必要はなく、単一のインデックス
を操作するだけで、高い性能が期待できる。
As described above, the conventional system needs to operate the indexes of the classes constituting the composite object in response to the inquiry, but the system of the present invention, in the case of an inquiry for a complicated data structure, that is, between files. Even if there are many references, it is not necessary to operate the index for each reference-related file, and high performance can be expected by only operating a single index.

【0027】[0027]

【実施例】以下、本発明の具体的な実施例を説明する。
図5は本発明に係るデータベースシステムの実施例の構
成ブロック図、図6は実施例のインデックスの生成手順
を示すフローチャートである。
EXAMPLES Specific examples of the present invention will be described below.
FIG. 5 is a configuration block diagram of an embodiment of the database system according to the present invention, and FIG. 6 is a flow chart showing an index generation procedure of the embodiment.

【0028】図5において、データベース1は、複数の
ファイル4a〜4nを有すると共にファイルの夫々にデ
ータを有しデータ5a〜5n間で参照を行なえる階層構
造をなしている。
In FIG. 5, the database 1 has a plurality of files 4a to 4n and has data in each of the files, and has a hierarchical structure in which the data 5a to 5n can be referred to.

【0029】ファイル管理部2は、データベース1のデ
ータ毎に、ファイルのアクセス操作に必要なデータの識
別子6a〜6nと属性7a〜7nとをインデックス8a
〜8nとして付加する。
The file management unit 2 indexes the data identifiers 6a to 6n and the attributes 7a to 7n necessary for the file access operation for each data of the database 1 as an index 8a.
~ 8n is added.

【0030】問い合わせプロセッサ11は、データに対
するユーザからの問い合わせをいくつかのコマンドに変
換するものであり、このコマンドをデータベース管理部
3に出力する。
The inquiry processor 11 converts an inquiry from the user about the data into several commands, and outputs these commands to the database management unit 3.

【0031】データベース管理部3は、データに対する
問い合わせがあった場合に前記ファイル管理部2により
データ毎に付加されたインデックス8a〜8nを操作す
ることで各ファイル4a〜4nをアクセス操作する。
When a data inquiry is made, the database management unit 3 operates the files 8a to 8n by operating the indexes 8a to 8n added by the file management unit 2 for each data.

【0032】また、前記ファイル管理部2は、あるファ
イル4nのデータの属性7nの値を検索キー9とする別
のファイル4iのデータの識別子6iを直接検索するた
めの新たなインデックス10として、別のファイルのデ
ータの識別子6iとあるファイルのデータの属性7nと
を関連付けて保持するものであり、問い合わせの頻度が
所定の頻度を超えた場合に、新たなインデックス10を
生成するようになっている。
Further, the file management unit 2 uses the value of the attribute 7n of the data of a certain file 4n as a search key 9 and sets a different index 10 as a new index 10 for directly searching the data identifier 6i of another file 4i. The file data identifier 6i and the file data attribute 7n are held in association with each other, and a new index 10 is generated when the frequency of inquiries exceeds a predetermined frequency. .

【0033】前記データベース管理部3は、利用者から
あるデータの属性の値に対する別のデータの識別子を求
める問い合わせがあった場合に前記新たなインデックス
10を操作することでファイルをアクセス操作するよう
になっている。
The database management unit 3 operates the new index 10 to access the file when the user makes an inquiry for the identifier of another data with respect to the value of the attribute of a certain data. Has become.

【0034】このように構成された実施例におけるデー
タベースシステムは、オブジェクト指向データベースで
あり、このオブジェクト指向データベースは、ファイ
ル、レコード、フィールドにそれぞれ対応するクラス、
インスタンス、属性という述語を用いている。 <オブジェクト指向データベースの構成>図7は実施例
における各クラスの内容を示す図、図8は新たに生成さ
れた排気量・自動車インデックスを示す図、図9は従来
のクラス毎の各インデックスの内容を示す図である。
The database system in the embodiment configured as described above is an object-oriented database, and this object-oriented database includes classes corresponding to files, records, and fields, respectively.
Predicates of instance and attribute are used. <Structure of Object-Oriented Database> FIG. 7 is a diagram showing the contents of each class in the embodiment, FIG. 8 is a diagram showing a newly generated displacement / vehicle index, and FIG. 9 is a contents of each conventional index for each class. FIG.

【0035】図7において、自動車クラス21、駆動系
クラス22、エンジンクラス23の3つのクラスを用意
し、これらクラス21〜23は階層構造をなして一つの
複合オブジェクトを構成する。自動車クラス21は属性
値として、drive777などの駆動21a、1.5tなどの平均
重量21b、N社などの製造元21cを有する。駆動系
クラス22は属性値として、eng111などのエンジン22
a、マニュアルなどのトランスミッション22bを有す
る。エンジンクラス23は、4000ccなどの排気量23
a、8つなどの気筒23bを有する。
In FIG. 7, three classes of a car class 21, a drive system class 22 and an engine class 23 are prepared, and these classes 21 to 23 form a hierarchical structure to form one compound object. The automobile class 21 has, as attribute values, a drive 21a such as drive777, an average weight 21b such as 1.5t, and a manufacturer 21c such as N company. The drive system class 22 has an engine 22 such as eng111 as an attribute value.
It has a transmission 22b such as a and a manual. Engine class 23, displacement 23 such as 4000cc
It has cylinders 23b such as a and 8 cylinders.

【0036】各インスタンスはOIDを有し、自動車ク
ラス21がautoO000などの自動車OID31、駆動系ク
ラス22がdrive000などの駆動系OID32、エンジン
クラス23がeng111などのエンジンOID33を有して
いる。
Each instance has an OID, the automobile class 21 has an automobile OID 31 such as autoO000, the drive system class 22 has a drive system OID 32 such as drive000, and the engine class 23 has an engine OID 33 such as eng111.

【0037】自動車クラス21の駆動21aは、駆動系
クラス22を参照し、駆動系クラス22のエンジン22
aはエンジンクラス23を参照するようになっている。
また、これら自動車クラス21、駆動系クラス22、エ
ンジンクラス23の中の比較的よく検索される複雑なク
ラス構造の参照クラスに対して、参照クラスの先頭であ
る自動車OID31と最後の参照クラスである排気量2
3aとのみを排気量・自動車インデックス41として保
持する(図8に示す。)。
The drive 21a of the automobile class 21 refers to the drive system class 22 and refers to the engine 22 of the drive system class 22.
The a refers to the engine class 23.
In addition, with respect to the reference classes having a relatively well-researched complex class structure among the vehicle class 21, the drive system class 22, and the engine class 23, the reference class is the vehicle OID31 at the beginning and the last reference class. Displacement 2
Only 3a and 3a are retained as the displacement / vehicle index 41 (shown in FIG. 8).

【0038】なお、実施例におけるインデクシング手法
は、例えばB+木のような良く使われるインデクシング
手法を用いて実装することができる。ノンリーフノード
は、インデックスされる属性の値とB+木の下レベルの
ノンリーフノードへのポインタを記述する。
The indexing method in the embodiment can be implemented by using a commonly used indexing method such as B + tree. The non-leaf node describes the value of the attribute to be indexed and the pointer to the lower-level non-leaf node of the B + tree.

【0039】リーフノードは、インデックスされた属性
の値、それに対応するOID数とそのOID群を格納す
る。ただし、普通のB+木とは違って、ノンリーフノー
ドに記述される属性の値とリーフノードに格納されるO
IDは別のクラスに属するものである。 <インデックスの生成手順>次に、実施例における排気
量・自動車インデックス41の生成手順について図6を
参照しながら説明する。まず、ステップ101で、検索
される属性Aと検索されるクラスCとの関係を求める。
例えば自動車、駆動、エンジン、排気量の順とする。
The leaf node stores the value of the indexed attribute, the number of OIDs corresponding to it, and its OID group. However, unlike the normal B + tree, the value of the attribute described in the non-leaf node and the O stored in the leaf node
ID belongs to another class. <Index Generation Procedure> Next, a procedure for generating the displacement / vehicle index 41 in the embodiment will be described with reference to FIG. First, in step 101, the relationship between the retrieved attribute A and the retrieved class C is obtained.
For example, the order is automobile, drive, engine, displacement.

【0040】次に、ステップ102で、クラスCに調べ
ていないレコードがあるか否かを判断し、レコードがあ
る場合にはステップ103で、iを1に設定する。ステ
ップ104で、iがnであるか否かを判断し、iがnで
あれば、ステップ105で、Inの値をOIDとしても
つレコードを検索する。例えばエンジンの値eng888をO
IDとしてもつレコード[eng888,1500cc,4]を探す。
Next, in step 102, it is judged whether or not there is a record that has not been examined in class C. If there is a record, i is set to 1 in step 103. In step 104, it is determined whether i is n. If i is n, in step 105, a record having the In value as the OID is searched. For example, the engine value eng888 is O
Search for the record [eng888,1500cc, 4] that you have as an ID.

【0041】そして、ステップ106で、属性Aの値と
クラスCのレコードのOIDをインデックス41として
保持する。例えば属性排気量1500ccとクラス自動車のO
IDauto999をインデックスとして保持する。さらに、
ステップ107で、次のレコードについて調べた後、ス
テップ102に戻り、ステップ102以降の処理を繰り
返し行なう。
Then, in step 106, the value of the attribute A and the OID of the record of the class C are held as the index 41. For example, the attribute displacement of 1500cc and class car O
Holds IDauto999 as an index. further,
After checking the next record in step 107, the process returns to step 102, and the processes after step 102 are repeated.

【0042】一方、ステップ104で、iがnでない場
合にはIiの値をOIDとしてもつレコードを探す。例
えば駆動の値drive777をOIDとしてもつレコード[dr
ive777,eng888,オートマチック]を探す。ステップ10
9で、iに1を加算してステップ104に戻り、ステッ
プ104の処理を行なう。
On the other hand, in step 104, when i is not n, a record having the value of Ii as OID is searched. For example, a record with the drive value drive777 as the OID [dr
ive777, eng888, automatic]. Step 10
In step 9, i is incremented by 1 and the process returns to step 104 to perform the processing of step 104.

【0043】一方、ステップ102で、クラスCに調べ
ていないレコードがない場合にはステップ110で、保
持したインデックスを出力して処理を終了する。 <実施例のインデックス41を用いたデータ処理>次
に、従来のインデックス手法と実施例のインデックス手
法を簡単な例を用いて説明する。
On the other hand, if there is no unexamined record in class C in step 102, the held index is output in step 110 and the process ends. <Data Processing Using Index 41 of Embodiment> Next, the conventional index method and the index method of the embodiment will be described using a simple example.

【0044】ここで、例えば”エンジンクラス23の排
気量23aの値が1500ccである複合オブジェクトの自動
車OID31を求めなさい。”のようにauto000を求め
る問い合わせが行われたとする。
Here, it is assumed that an inquiry for auto000 is made, for example, "obtain the vehicle OID31 of the compound object in which the displacement 23a of the engine class 23 is 1500cc."

【0045】この問い合わせに対して実施例におけるイ
ンデクシングと従来のインデクシングとの比較を行な
う。 (1)まず、実施例におけるインデックス手法では、図
8に示すように、排気量・自動車インデックス41とし
て排気量23a、自動車OID31が用意される。ここ
では、複合オブジェクトのエンジンクラス23の排気量
23aと自動車クラス21の自動車OID31のみが一
つのインデックス41として保持され、問い合わせに答
えるには、インデックス41で排気量23aの値1500cc
から直ちに自動車OID31のauto000を、単一のイン
デックス41を操作するだけで求めることができる。 (2)一方、従来のインデクシング手法では、図9に示
すように、自動車クラス21の属性に対しインデックス
51として駆動21a、自動車OID31を用意し、駆
動系クラス22の属性に対しインデックス52としてエ
ンジン22a、駆動系OID32を用意し、エンジンク
ラス23の属性に対しインデックス53として排気量2
3a、エンジンOID33を用意する。
For this inquiry, the indexing in the embodiment and the conventional indexing are compared. (1) First, in the indexing method according to the embodiment, as shown in FIG. 8, an exhaust volume 23a and an automobile OID 31 are prepared as an exhaust volume / vehicle index 41. Here, only the displacement 23a of the engine class 23 of the composite object and the automobile OID31 of the automobile class 21 are held as one index 41. To answer the inquiry, the value of the displacement 23a at index 41 1500cc
From this, it is possible to immediately obtain the auto000 of the automobile OID 31 simply by operating the single index 41. (2) On the other hand, in the conventional indexing method, as shown in FIG. 9, the drive 21a and the automobile OID31 are prepared as the index 51 for the attributes of the automobile class 21, and the engine 22a is provided as the index 52 for the attributes of the drive system class 22. , Drive system OID32 is prepared, and displacement 2 is set as index 53 for the attribute of engine class 23.
3a, engine OID33 is prepared.

【0046】問い合わせに答えるには、まずインデック
ス53で排気量23aの値1500ccからエンジンOID3
3のeng888を求め、次にインデックス52でエンジン2
2aの値eng888から駆動系OID32のdrive777を求
め、最後にインデックス51で駆動21aの値drive777
から自動車OID31のauto000を求める。
In order to answer the inquiry, first, at index 53, from the value of displacement 23a 1500cc to engine OID3
Find eng888 of 3, then engine 2 at index 52
The drive777 of the drive system OID32 is obtained from the value eng888 of 2a, and finally the value drive777 of the drive 21a is driven by the index 51.
Find auto000 of car OID31 from.

【0047】従来のインデックス手法では、よく検索さ
れる複合オブジェクトに対する問い合わせでは、複合オ
ブジェクトを構成するクラス数分のインデックスの操作
が必要であったが、本実施例によれば、単一のインデッ
クスを操作するのみで複雑な構造のデータをアクセスす
ることができる。
In the conventional index method, inquiries for a complex object that are frequently searched require the operation of indexes for the number of classes forming the complex object. According to this embodiment, a single index is used. Data with complicated structure can be accessed only by operating.

【0048】よって、ファイルのアクセス操作が少なく
て済み、データ処理速度を向上できる。なお、実施例で
は3クラス、属性2又は3として説明したが、クラス及
び属性の数はその他の数であってもよい。
Therefore, the number of file access operations can be reduced and the data processing speed can be improved. In the embodiment, the number of classes and attributes has been described as 3 classes and attributes 2 or 3, but other numbers may be used.

【0049】さらに、問い合わせが所定の頻度を超えた
場合にはインデックス41を生成するようにしてもよ
い。この場合、例えばカウンタなどを用いて同一の問い
合わせをカウントし、所定のカウント数を超えた場合に
前記所定の頻度とするようにしてもよい。このようにす
れば、頻度の高いデータが即座に検索でき、効果が大と
なる。
Furthermore, the index 41 may be generated when the number of inquiries exceeds a predetermined frequency. In this case, for example, the same inquiry may be counted by using a counter or the like, and the predetermined frequency may be set when a predetermined count is exceeded. By doing so, the frequently used data can be immediately searched, and the effect is great.

【0050】また、図2に示す複合オブジェクトの例に
おいて、実施例のインデクシング手法と従来のインデク
シングとを簡単に比較した結果を図10に示す。なお、
ここでは、各クラスは600000インスタンスからな
り、OID長は8B(バイト)とし、インデックスされ
る属性長は8Bとした。さらに、ページサイズは4KB
(キロバイト)とし、B+木のファンアウトは218と
して、次の3つの問い合わせQ1〜Q3に対する評価を
行った。 (Q1)属性の値がjである複合オブジェクトOID1
を求めなさい。 (Q2)属性の値がj1、j2、j3、j4、j5、j
6、j7、j8、j9、j10のどれかである複合オブ
ジェクトのOID1を求めなさい。 (Q3)属性の値がj1、j2、j3、j4、j5、j
6、j7、j8、j9、j10、j11、j12、j1
3、j14、j15、j16、j17、j18、j1
9、j20のどれかである複合オブジェクトのOID1
を求めなさい。
FIG. 10 shows the result of a simple comparison between the indexing method of the embodiment and the conventional indexing in the example of the composite object shown in FIG. In addition,
Here, each class consists of 600,000 instances, the OID length is 8B (bytes), and the indexed attribute length is 8B. In addition, the page size is 4KB
(Kilobytes) and the fanout of B + tree was set to 218, and the following three queries Q1 to Q3 were evaluated. (Q1) Compound object OID1 whose attribute value is j
Ask for (Q2) Attribute values are j1, j2, j3, j4, j5, j
Find the OID1 of a compound object that is 6, j7, j8, j9, j10. (Q3) Attribute values are j1, j2, j3, j4, j5, j
6, j7, j8, j9, j10, j11, j12, j1
3, j14, j15, j16, j17, j18, j1
OID1 of compound object that is either 9 or j20
Ask for

【0051】図10にそれぞれの問い合わせQ1〜Q3
に対するインデックスのページアクセス回数を示す。二
次記憶のページアクセス回数は処理コストの最も大きな
要素である二次記憶のアクセスコストに比例するので、
実施例のインデクシング手法を用いると性能向上が得ら
れることがわかる。
Inquiries Q1 to Q3 are shown in FIG.
Indicates the page access count of the index for. Since the page access count of the secondary storage is proportional to the access cost of the secondary storage, which is the largest element of the processing cost,
It can be seen that performance improvement can be obtained by using the indexing method of the embodiment.

【0052】[0052]

【発明の効果】本発明によれば、ファイル管理部2が、
あるファイル4nのデータの属性7nの値を検索キー9
とする別のファイル4iのデータの識別子6iを直接検
索するための新たなインデックス10として、別のファ
イルのデータの識別子6iとあるファイルのデータの属
性7nとを関連付けて保持し、データベース管理部3
は、あるデータの属性7nの値に対する別のデータの識
別子6iを求める問い合わせがあった場合に新たなイン
デックス10のファイルのデータの属性7nから直ちに
識別子6iを求めることができる。
According to the present invention, the file management unit 2
Search key 9 for the value of attribute 7n of data in a certain file 4n
As a new index 10 for directly searching the data identifier 6i of another file 4i, the data management unit 3 holds the data identifier 6i of another file and the attribute 7n of the data of a certain file in association with each other.
When there is an inquiry for the identifier 6i of another data for the value of the attribute 7n of a certain data, can immediately obtain the identifier 6i from the attribute 7n of the data of the file of the new index 10.

【0053】よって、ファイルのアクセス操作が少なく
て済み、データ処理速度を向上できる。
Therefore, the number of file access operations can be reduced and the data processing speed can be improved.

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

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

【図2】本発明におけるオブジェクト指向データベース
のインデクシングを説明するための図である。
FIG. 2 is a diagram for explaining indexing of an object-oriented database according to the present invention.

【図3】本発明で新たに生成されたインデックスを示す
図である。
FIG. 3 is a diagram showing an index newly generated in the present invention.

【図4】従来のインデクシングによるファイル毎の各イ
ンデックスの内容を示す図である。
FIG. 4 is a diagram showing the contents of each index for each file by conventional indexing.

【図5】実施例のデータベースシステムの構成ブロック
図である。
FIG. 5 is a configuration block diagram of a database system according to an embodiment.

【図6】実施例のインデックスの生成手順を示すフロー
チャートである。
FIG. 6 is a flowchart showing an index generation procedure according to the embodiment.

【図7】実施例における各クラスの内容を示す図であ
る。
FIG. 7 is a diagram showing the contents of each class in the embodiment.

【図8】新たに生成された排気量・自動車インデックス
を示す図である。
FIG. 8 is a diagram showing a newly generated displacement / vehicle index.

【図9】従来のクラス毎の各インデックスの内容を示す
図である。
FIG. 9 is a diagram showing the contents of each index for each conventional class.

【図10】実施例のインデクシングと従来のインデクシ
ングとの比較を示す図である。
FIG. 10 is a diagram showing a comparison between the indexing of the embodiment and the conventional indexing.

【図11】従来のデータベースシステムの構成ブロック
図である。
FIG. 11 is a configuration block diagram of a conventional database system.

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

1・・データベース 2・・ファイル管理部 3・・データベース管理部 4a〜4n・・ファイル 5a〜5n・・データ 6a〜6n・・識別子 7a〜7n・・属性 8a〜8n・・インデックス 9・・検索キー 10・・新たなインデックス 11・・問い合わせプロセッサ 21・・自動車クラス 22・・駆動系クラス 23・・エンジンクラス 31・・自動車OID 32・・駆動系OID 33・・エンジンOID 41・・排気量・自動車インデックス 1 ... database 2 ... file management section 3 ... database management section 4a-4n ... file 5a-5n ... data 6a-6n ... identifier 7a-7n ... attribute 8a-8n ... index 9 ... search Key 10 ... New index 11 ... Inquiry processor 21 ... Automotive class 22 ... Drive class 23 ... Engine class 31 ... Automotive OID 32 ... Drive system OID 33 ... Engine OID 41 ... Displacement ... Car index

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 複数のファイル(4a〜4n)を有する
と共にファイルの夫々にデータを有しデータ(5a〜5
n)間で参照を行なえるデータベース(1)と、 このデータベース(1)のデータ毎に、ファイルのアク
セス操作に必要なデータの識別子(6a〜6n)と属性
(7a〜7n)とをインデックス(8a〜8n)として
付加するファイル管理部(2)と、 データに対する問い合わせがあった場合に前記ファイル
管理部(2)によりデータ毎に付加されたインデックス
(8a〜8n)を操作することで各ファイル(4a〜4
n)をアクセス操作するデータベース管理部(3)とを
備え、 前記ファイル管理部(2)は、あるファイル(4n)の
データの属性(7n)の値を検索キー(9)とする別の
ファイル(4i)のデータの識別子(6i)を直接検索
するための新たなインデックス(10)として、別のフ
ァイルのデータの識別子(6i)とあるファイルのデー
タの属性(7n)とを関連付けて保持し、 前記データベース管理部(3)は、利用者からあるデー
タの属性の値に対する別のデータの識別子を求める問い
合わせがあった場合に前記新たなインデックス(10)
を操作することでファイルをアクセス操作することを特
徴とするデータベースシステム。
1. A plurality of files (4a to 4n) and data (5a to 5n) each of which has data.
n), a database (1) that can be referred to, and data identifiers (6a to 6n) and attributes (7a to 7n) of data necessary for file access operation are indexed for each data of this database (1). Each file is operated by operating the file management unit (2) added as 8a to 8n) and the index (8a to 8n) added to each data by the file management unit (2) when a data inquiry is made. (4a-4
n), a database management unit (3) for accessing and operating the file management unit (2), wherein the file management unit (2) uses another value of the attribute (7n) of the data of a certain file (4n) as a search key (9). As a new index (10) for directly searching the data identifier (6i) of (4i), the data identifier (6i) of another file and the data attribute (7n) of a certain file are held in association with each other. The database management unit (3), when the user makes an inquiry for the identifier of another data for the value of the attribute of a certain data, the new index (10).
A database system characterized by accessing and manipulating files by operating.
【請求項2】 前記ファイル管理部(2)は、前記問い
合わせの頻度が所定の頻度を超えた場合に、前記各ファ
イル(4a〜4n)を用いて新たなインデックス(1
0)を生成することを特徴とする請求項1記載のデータ
ベースシステム。
2. The file management unit (2) uses the files (4a to 4n) to create a new index (1) when the frequency of the inquiry exceeds a predetermined frequency.
0) is generated, and the database system according to claim 1.
【請求項3】 前記検索キー(9)は、参照される最後
のデータ(5n)の属性(7n)の値であり、前記別の
データの識別子は参照される最初のデータ(5a)の識
別子(6a)であることを特徴とする請求項1又は請求
項2記載のデータベースシステム。
3. The search key (9) is a value of an attribute (7n) of the last data (5n) to be referenced, and the identifier of the other data is an identifier of the first data (5a) to be referenced. (6a), The database system according to claim 1 or 2.
【請求項4】 前記データベース(1)は、オブジェク
ト指向データベースであり、前記ファイルに対応するク
ラスを複数用意し前記各クラスにオブジェクト識別子を
有するとともに各クラスが複数の属性を有しかつ上位ク
ラスの属性が下位クラスを参照する複合オブジェクトを
構成し、 あるクラスの属性の値を検索キーとする別のクラスのオ
ブジェクト識別子を直接検索するための新たなインデッ
クスとして、別のクラスの識別子とあるクラスの属性と
を保持することを特徴とする請求項1記載のデータベー
スシステム。
4. The database (1) is an object-oriented database, wherein a plurality of classes corresponding to the file are prepared, each class has an object identifier, each class has a plurality of attributes, and is a superclass. As a new index for directly searching an object identifier of another class whose attribute constitutes a composite object in which an attribute refers to a subordinate class and the value of the attribute of one class is used as a search key, the identifier of another class and that of a certain class The database system according to claim 1, wherein the database system holds an attribute and.
JP4238245A 1992-09-07 1992-09-07 Data base system Withdrawn JPH0689219A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4238245A JPH0689219A (en) 1992-09-07 1992-09-07 Data base system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4238245A JPH0689219A (en) 1992-09-07 1992-09-07 Data base system

Publications (1)

Publication Number Publication Date
JPH0689219A true JPH0689219A (en) 1994-03-29

Family

ID=17027308

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4238245A Withdrawn JPH0689219A (en) 1992-09-07 1992-09-07 Data base system

Country Status (1)

Country Link
JP (1) JPH0689219A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07295865A (en) * 1994-04-22 1995-11-10 Fujitsu Ltd Image data storage system
JPH09106368A (en) * 1995-10-12 1997-04-22 Hitachi Ltd Data base managing system
JP2000322418A (en) * 1999-05-07 2000-11-24 Fujitsu Ltd Data base system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07295865A (en) * 1994-04-22 1995-11-10 Fujitsu Ltd Image data storage system
JPH09106368A (en) * 1995-10-12 1997-04-22 Hitachi Ltd Data base managing system
JP2000322418A (en) * 1999-05-07 2000-11-24 Fujitsu Ltd Data base system

Similar Documents

Publication Publication Date Title
US6078926A (en) Method and apparatus for performing multi-class object fetch in a database management system
Banerjee et al. Queries in object-oriented databases
US7725471B2 (en) Method and apparatus for generating and utilizing qualifiers and qualified taxonomy tables
US7412444B2 (en) Efficient indexing of hierarchical relational database records
US7257599B2 (en) Data organization in a fast query system
US6694325B2 (en) Database method implementing attribute refinement model
US6466931B1 (en) Method and system for transparently caching and reusing query execution plans efficiently
US5706506A (en) Method and apparatus for managing relational data in an object cache
Lee et al. Signature file methods for indexing object-oriented database systems
US7912869B1 (en) Database component packet manager
Runapongsa et al. Storing and querying XML data in object-relational DBMSs
US20040054683A1 (en) System and method for join operations of a star schema database
CN111506779B (en) Object version and associated information management method and system facing data processing
de Vries et al. On the integration of IR and databases
JPH0689219A (en) Data base system
Rupley Jr Introduction to query processing and optimization
Kawamura et al. Parallel Database Management System: Kappa-P.
Namba High-performance XML storage/retrieval system
KR100333682B1 (en) A Query Processing Method For Grouping And Aggregation Operations In Object-Relational Database Systems Using Reverse Pointers
Van den Bercken et al. Plug&Join: An easy-to-use generic algorithm for efficiently processing equi and non-equi joins
Huang et al. The study of indexing techniques on object oriented databases
JPH0352068A (en) Logical operation system
Ahad The object shell: an extensible system to define an object-oriented view of an existing database
Shin et al. Combining C-signature with path dictionary for query processing of nested objects in OODBS
JPH02190970A (en) Index structure and search processing method using the structure

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: 19991130