JPH07182222A - Device for managing objective-oriented data base - Google Patents

Device for managing objective-oriented data base

Info

Publication number
JPH07182222A
JPH07182222A JP5327760A JP32776093A JPH07182222A JP H07182222 A JPH07182222 A JP H07182222A JP 5327760 A JP5327760 A JP 5327760A JP 32776093 A JP32776093 A JP 32776093A JP H07182222 A JPH07182222 A JP H07182222A
Authority
JP
Japan
Prior art keywords
class
information
classes
attribute
definition
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
JP5327760A
Other languages
Japanese (ja)
Inventor
Kei Tanaka
圭 田中
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 JP5327760A priority Critical patent/JPH07182222A/en
Publication of JPH07182222A publication Critical patent/JPH07182222A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide an objective-oriented data base managing device capable of improving access efficiency by extracting logical relation among plural classes expressed by objective orientation and clustering the classes in accordance with the extracted result. CONSTITUTION:An inter-object logical relation analyzing part 30 extracts logical relation among objects (classes) based on a compiled result of a source code 50 including plural classes expressed by objective orientation and defined by a user. A data arrangement control part 41 determined the stored positions of respective classed in a practical secondary storage 60. When a certain class has only one sub-class, the class concerned and the sub-class are adjacently arranged. When a certain class has plural sub-classes, the class concerned is arranged in the vicinity of an object having high probability of being stored in a main storage such as a data dictionary.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、定義された複数のク
ラスの情報を表現するオブジェクトのクラスタリングを
行うオブジェクト指向データベース管理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an object-oriented database management device for clustering objects representing information of a plurality of defined classes.

【0002】[0002]

【従来の技術】従来において、オブジェクト指向データ
ベース管理システムに限らず、一般のデータベース管理
システムにおいては、論理的に関係のあるオブジェクト
或いはレコードを物理的にも近傍に配置するクラスタリ
ングと呼ばれる技術が性能向上のために重要であるとい
うことは広く知られている。この場合、ユーザ(データ
ベース作成者等)が例えばオブジェクト間の論理的関係
を明示的に記述することにより、それらのオブジェクト
が物理的に近傍して配置される。これによって、あるオ
ブジェクトがアクセスされたら、それと論理的に関連が
あるオブジェクトを同時に主記憶上あるいはキャッシュ
メモリ上に読み込むことができるので、キャッシャのヒ
ット率を向上させることができる。
2. Description of the Related Art Conventionally, not only in an object-oriented database management system but also in a general database management system, a technique called clustering for physically arranging logically related objects or records is improved. It is widely known that it is important for. In this case, the user (database creator or the like) explicitly describes the logical relationship between the objects, so that the objects are arranged physically close to each other. As a result, when an object is accessed, the objects logically related to the object can be simultaneously read into the main memory or the cache memory, so that the hit rate of the cashier can be improved.

【0003】なお、キャッシュのヒット率を向上させる
ようにしたものとしては、例えば特開昭56−1625
7号公報、特開昭60−163146号公報に記載され
たものが知られている。
A technique for improving the cache hit rate is disclosed in, for example, Japanese Patent Laid-Open No. 56-1625.
Those described in JP-A No. 7 and JP-A No. 60-163146 are known.

【0004】特開昭56−16257号公報には、ある
レコードがアクセスされたら、当該レコードが含まれる
トラックの全データをキャッシュメモリに読み込む手法
が記載されている。
Japanese Unexamined Patent Publication No. 56-16257 discloses a method of reading all data of a track including a record into a cache memory when the record is accessed.

【0005】また特開昭60−163146号公報に
は、特にリレーショナルデータベースのテーブルデータ
でのデータ間の論理的な結合情報およびそれを用いたキ
ャッシュ制御方法が記載されている。
Japanese Unexamined Patent Publication (Kokai) No. 60-163146 discloses information about logical connection between data in table data of a relational database and a cache control method using the information.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上記従
来のクラスタリングの手法では、データベースを構築す
る際に、論理的に関係のあるオブジェクト或いはレコー
ドの論理的関係を明示しなければならない。このため、
ユーザにおいては上記論理的関係を記述する作業が必要
となるので、迅速にデータベースを構築することができ
ない。しかも誤った論理的関係が記述される虞もあり、
この場合は、上述したようにクラスタリングによるキャ
ッシュのヒット率を向上させることは極めて困難であ
る。
However, in the conventional clustering method described above, when constructing a database, it is necessary to clearly indicate the logical relationship between objects or records that are logically related to each other. For this reason,
Since the user needs to describe the logical relationship, the database cannot be constructed quickly. Moreover, there is a possibility that an incorrect logical relationship will be described,
In this case, it is extremely difficult to improve the cache hit rate by clustering as described above.

【0007】上記特開昭56−16257号公報のもの
では、どのようにトラック中に当該レコードと論理的に
関連したデータを含ませるかについては、何等記載され
ておらず、また示唆もされていない。また特開昭60−
163146号公報のものでは、関連のあるリレーショ
ンを物理的な近傍に配置することに関しては何等考慮さ
れていない。更に、これらの公報のものは、オブジェク
ト指向特有の概念を取り込んでいないので、オブジェク
ト指向データベース管理システムにおいてはオブジェク
ト間の論理関係を効率的に抽出することができない。
In the above-mentioned Japanese Patent Laid-Open No. 56-16257, there is no description or suggestion of how to include data logically related to the record in the track. Absent. In addition, JP-A-60-
In the 163146 publication, no consideration is given to arranging related relations in physical proximity. Further, since the publications of these publications do not incorporate the concept peculiar to object orientation, it is not possible to efficiently extract the logical relationship between objects in the object oriented database management system.

【0008】この発明は、オブジェクト指向により表現
された複数のクラス間の論理的な関係を抽出し、この抽
出結果に応じてクラスタリングすることにより、アクセ
ス効率を向上させることのできるオブジェクト指向デー
タベース管理装置を提供することを目的とする。
According to the present invention, an object-oriented database management device capable of improving access efficiency by extracting a logical relationship between a plurality of classes expressed by object orientation and clustering according to the extraction result. The purpose is to provide.

【0009】[0009]

【課題を解決するための手段】第1の発明は、定義され
た複数のクラスの情報を表現するオブジェクトのクラス
タリングを行うオブジェクト指向データベース管理装置
であって、前記各クラスの親子関係及び属性を解釈する
解釈手段(図1の30)と、該解釈手段による解釈結果
に基づいて、前記各クラスのサブクラス数を計数する計
数手段(図1の41)と、該計数手段による計数結果に
基づいて、前記各クラスの情報を表現するオブジェクト
の二次記憶上の配置を行う配置手段(図1の41)とを
具備している。
A first invention is an object-oriented database management device for clustering objects representing information of a plurality of defined classes, and interprets parent-child relationships and attributes of each class. Interpreting means (30 in FIG. 1), counting means (41 in FIG. 1) for counting the number of subclasses of each class based on the interpretation result by the interpreting means, and based on the counting result by the counting means, Arrangement means (41 in FIG. 1) for arranging the objects expressing the information of each class on the secondary storage.

【0010】第2の発明は、第1の発明において、前記
解釈手段による解釈結果に基づいて、クラスとして定義
された属性を持つクラスに定義情報を埋め込む埋込手段
(図1の41)を更に具備している。
A second aspect of the present invention further comprises an embedding means (41 in FIG. 1) for embedding definition information in a class having an attribute defined as a class based on the interpretation result by the interpretation means. It has.

【0011】[0011]

【作用】第1の発明では、解釈手段が、定義された複数
のクラスを含むソースコードのコンパイル時に、当該各
クラスの親子関係及び属性を解釈し、計数手段が、その
解釈結果に基づいて、前記各クラスのサブクラス数を計
数し、そして配置手段が、その計数結果に基づいて、複
数のサブクラスを有するクラスの情報を表現するオブジ
ェクトについては、二次記憶上において、主記憶にアク
セスされる可能性の高いオブジェクトの近傍に配置す
る。従って、サブクラスがアクセスされるときは、その
親クラスも主記憶上にアクセスされることになるので、
オブジェクト間(クラス間)の論理的関係に応じた効率
的なオブジェクトのクラスタリングを行うことができ
る。
In the first invention, the interpreting means interprets the parent-child relationship and attributes of each class at the time of compiling the source code including a plurality of defined classes, and the counting means based on the interpretation result, An object that counts the number of subclasses of each class and that is arranged by the arranging means can access the main memory on the secondary memory for objects that represent information of a class having a plurality of subclasses. Place it near a highly objective object. Therefore, when a subclass is accessed, its parent class is also accessed on the main memory.
It is possible to perform efficient object clustering according to a logical relationship between objects (classes).

【0012】第2の発明では、埋込手段が、解釈手段に
よる解釈結果に基づいて、クラスとして定義された属性
を持つクラスに定義情報を埋め込むようにしているの
で、あるクラスに、そのクラスに包含される他のクラス
について定義情報が存在することになるので、他のクラ
スへのアクセスを削減することができる。
In the second invention, the embedding means embeds the definition information in the class having the attribute defined as the class based on the interpretation result by the interpreting means. Since definition information exists for other included classes, it is possible to reduce access to other classes.

【0013】[0013]

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

【0014】図1は本発明に係るオブジェクト指向デー
タベース管理装置を適用したオブジェクト指向データベ
ース管理システムの一実施例の構成を示す機能ブロック
である。
FIG. 1 is a functional block diagram showing the configuration of an embodiment of an object-oriented database management system to which the object-oriented database management device according to the present invention is applied.

【0015】図1において、システムは、字句解析部1
0、構文解析部20、オブジェクト間論理関係解析部3
0およびデータ入出力部40を備え、これらの機能部に
より、ユーザにより記述された複数のクラスを含むソー
スコード(すなわちソースファイル)50をコンパイル
して、当該各クラスの情報を表現するオブジェクトを二
次記憶装置60上にクラスタリングする。
In FIG. 1, the system comprises a lexical analysis unit 1.
0, syntax analysis unit 20, inter-object logical relationship analysis unit 3
0 and a data input / output unit 40, and these function units compile a source code (that is, a source file) 50 including a plurality of classes described by a user to generate an object expressing information of each class. Clustering is performed on the next storage device 60.

【0016】ソースコード50は字句解析部10によっ
て字句解析され、更に構文解析部20によって構文解析
される。すなわちコンパイルされる。
The source code 50 is lexically analyzed by the lexical analysis unit 10 and further parsed by the syntax analysis unit 20. Ie compiled.

【0017】オブジェクト間論理関係解析部30は、ソ
ースコード50のコンパイル結果に基づいてオブジェク
ト間の論理的な関係を抽出する。オブジェクト指向で扱
う論理的な関係(論理関係)の代表的なものとしては、
「is−a関係」と呼ばれる汎化関係あるいは継承関係
や、「part−of関係」と呼ばれる集約関係があ
る。
The inter-object logical relationship analysis unit 30 extracts a logical relationship between objects based on the compilation result of the source code 50. As a typical one of the logical relationship (logical relationship) handled by object-oriented,
There are generalization relationships or inheritance relationships called "is-a relationships", and aggregate relationships called "part-of relationships".

【0018】この発明では、上述したような論理関係を
利用して、同時にアクセスされる可能性の高いデータを
物理的な近傍に配置しようとするものである。例えば、
ユーザ定義された複数のクラスの情報をデータベース中
に格納する場合を考える(以下、クラスの情報を持った
オブジェクトをクラスオブジェクトという)。
According to the present invention, the logical relationship as described above is used to arrange data that are likely to be simultaneously accessed in a physical vicinity. For example,
Consider a case where information of a plurality of user-defined classes is stored in a database (hereinafter, an object having class information is referred to as a class object).

【0019】オブジェクト間論理関係解析部30によっ
て抽出されたクラスオブジェクトの論理関係情報(これ
はオブジェクトの配置情報を意味する)は入出力部40
に渡される。
The input / output unit 40 stores the logical relationship information of the class objects (which means the arrangement information of the objects) extracted by the inter-object logical relationship analysis unit 30.
Passed to.

【0020】データ入出力部40では、データ配置制御
部41が、渡された論理関係情報に基づいて、実際の二
次記憶上での各々のクラスオブジェクトの格納位置を決
定する。
In the data input / output unit 40, the data arrangement control unit 41 determines the storage position of each class object on the actual secondary storage based on the passed logical relationship information.

【0021】次に、本実施例で用いるユーザ定義された
クラス(すなわちクラス定義)を以下に示す。
Next, user-defined classes (that is, class definitions) used in this embodiment are shown below.

【0022】ここでは、「C++言語」による記述によ
りユーザ定義されたクラス(クラス定義)の一例を説明
するが、それに先立って、「C++言語」におけるクラ
スの型の表現形式を以下に示す。 なお、『』内の記述が表現形式である。
Here, an example of a class (class definition) defined by the description in "C ++ language" will be described. Prior to that, an expression format of the type of the class in "C ++ language" is shown below. The description in "" is the expression format.

【0023】次にクラス定義を以下に示す。 『 class String { char* data; }; 』 …クラス定義1 ここで、クラス定義1においては、『』内の記述が一例
を示している(以下の説明においても同様とする)。
「class 」はクラスであり、「String」はクラス名を表
し且つストリング型を表している。すなわち、「Strin
g」というクラス(以下、「String」クラスという)は
ストリング型であるということである。「char* data;
」は属性であり、「char* 」は属性型であり、「dat
a」は型名である。
Next, the class definition is shown below. “Class String {char * data;};” ... Class definition 1 Here, in the class definition 1, the description in “” is an example (the same applies in the following description).
“Class” is a class, and “String” represents a class name and a string type. That is, "Strin
It means that the class "g" (hereinafter, "String" class) is a string type. "Char * data;
"Is an attribute," char * "is an attribute type, and" dat
"a" is the type name.

【0024】 『 class Person { String name; }; 』 …クラス定義2 ここで、「class 」はクラスであり、「Person」はクラ
ス名である。「String name 」は属性であり、「Strin
g」は属性型であり、「name」は型名である。このクラ
ス定義2においては、上記クラス定義1の属性型(Stri
ng)が「Person」というクラス(以下、「Person」クラ
スという)の一部であるということが示されている。
“Class Person {String name;};” Class Definition 2 Here, “class” is a class and “Person” is a class name. "String name" is an attribute and "String
"g" is the attribute type and "name" is the type name. In this class definition 2, the attribute type (Stri
ng) is a part of a class called "Person" (hereinafter referred to as "Person" class).

【0025】 『 class Employee : public Person { int salary; int emp-no; }; 』 …クラス定義3 ここで、「class 」がクラスであり、「Employee」がク
ラス名である。「: 」(コロン)は継承関係を表してい
る。「public」はパブリック宣言を表している。この宣
言を使用いることにより、「Person 」クラスの「publ
ic」宣言されたメンバ変数/メンバ関数を直接参照した
り呼び出したりできる。以上のことから、クラス定義3
では、「Person 」クラスが親であり、その親クラスの
子が「Employee」というクラス(以下、「Employee」ク
ラスという)であるということが示されている。すなわ
ち「Employee」はクラス「Person 」クラスの情報を継
承していることを意味する。「int salary」は第1番目
の属性であり、「int 」は属性型(つまり整数型、以下
の説明においても同様とする)であり、「salary」は型
名である。「int emp-no」は第2番目の属性であり、
「int 」は属性型であり、「emp-no」は型名である。
“Class Employee: public Person {int salary; int emp-no;};” Class Definition 3 Here, “class” is a class and “Employee” is a class name. ":" (Colon) represents an inheritance relationship. “Public” represents a public declaration. By using this declaration, the "publ" of the "Person" class
You can directly refer to and call member variables / member functions declared as "ic". From the above, class definition 3
Shows that the "Person" class is a parent, and the child of the parent class is a class "Employee" (hereinafter referred to as "Employee" class). That is, "Employee" means that the information of the class "Person" class is inherited. “Int salary” is the first attribute, “int” is an attribute type (that is, an integer type, the same applies in the following description), and “salary” is a type name. "Int emp-no" is the second attribute,
"Int" is an attribute type and "emp-no" is a type name.

【0026】 『 class Student : public Person { int stu-no; }; 』 …クラス定義4 ここで、「class 」はクラスであり、「Student 」はク
ラス名であり、「public」はパブリック宣言であり、
「Person」はクラス名である。また「: 」(コロン)は
継承関係を表している。以上のことから、クラス定義4
では、クラス定義3と同様に、「Student 」というクラ
ス(以下、「Student 」クラスという)が親である「Pe
rson」クラスの情報を継承しているということが示され
ている。「int stu-no」は属性であり、「int 」は属性
型であり、「stu-no」は型名である。
[Class Student: public Person {int stu-no;};] Class definition 4 Here, “class” is a class, “Student” is a class name, and “public” is a public declaration. ,
"Person" is the class name. Also, ":" (colon) represents an inheritance relationship. From the above, class definition 4
Then, like the class definition 3, the class "Student" (hereinafter referred to as the "Student" class) is the parent "Pe
It is shown that it inherits the information of the "rson" class. "Int stu-no" is an attribute, "int" is an attribute type, and "stu-no" is a type name.

【0027】なお、クラス定義1とクラス定義2とは上
述した「part−of関係」であり、またクラス定義
2とクラス定義3及びクラス定義4とは「is−a関
係」である。
The class definition 1 and the class definition 2 are in the above-mentioned "part-of relationship", and the class definition 2, the class definition 3 and the class definition 4 are in the "is-a relationship".

【0028】この実施例では、ソースコード50には上
述したクラス定義1〜4の内容が含まれている。
In this embodiment, the source code 50 includes the contents of the class definitions 1 to 4 described above.

【0029】次に、オブジェクト間論理関係解析部30
による論理関係の解析処理について、図2のフローチャ
ートを参照して説明する。
Next, the inter-object logical relationship analysis unit 30
The analysis processing of the logical relationship according to will be described with reference to the flowchart of FIG.

【0030】オブジェクト間論理関係解析部41は、字
句解析部10、構文解析部20によって解析されたソー
スコード50のコンパイル結果(特にクラスオブジェク
トの情報)に基づいて、解析対象のクラスの情報を管理
するための一時的なクラス情報管理オブジェクトを生成
する(ステップ110)。
The inter-object logical relationship analysis unit 41 manages information of the analysis target class based on the compilation result of the source code 50 analyzed by the lexical analysis unit 10 and the syntax analysis unit 20 (especially the information of the class object). A temporary class information management object for doing so is generated (step 110).

【0031】その後、解析対象の1つのクラス定義につ
いて以下の解析処理が行われる。
After that, the following analysis processing is performed for one class definition to be analyzed.

【0032】オブジェクト間論理関係解析部41は、解
析対象のクラスが親クラスを有するか否かを判断し(ス
テップ120)、親クラスが存在する場合は、その親ク
ラスの存在を解析対象のクラスのクラス情報としてクラ
ス情報管理オブジェクトに登録する(ステップ13
0)。このステップ130を終了した後は上記ステップ
120に移行する。ステップ120において、親クラス
が存在しない場合あるいは全ての親クラスについてのク
ラス情報をクラス情報管理オブジェクトに登録した場合
は、解析対象のクラスに属性があるか否かを判断し(ス
テップ140)、属性がない場合には処理を終了し、一
方、属性がある場合は、その属性情報を1つ読み込み
(ステップ150)、その属性情報をクラス情報管理オ
ブジェクトに既に登録されているクラス情報に対応して
登録する(ステップ160)。このステップ160を終
了した後はステップ140に移行する。
The inter-object logical relationship analysis unit 41 determines whether or not the class to be analyzed has a parent class (step 120). If the parent class exists, the existence of the parent class is checked as the analysis target class. Registered as class information in the class information management object (step 13)
0). After completing step 130, the process proceeds to step 120. If the parent class does not exist in step 120 or the class information about all parent classes is registered in the class information management object, it is determined whether or not the class to be analyzed has attributes (step 140), and the attributes are determined. If there is no attribute, the processing is terminated. On the other hand, if there is an attribute, one of the attribute information is read (step 150), and the attribute information is associated with the class information already registered in the class information management object. Register (step 160). After this step 160 is completed, the routine proceeds to step 140.

【0033】以上のような処理を行うことにより、全て
のクラスについてクラス情報管理オブジェクトを生成し
てクラス情報を登録する。
By performing the above processing, class information management objects are generated for all classes and class information is registered.

【0034】次に、上述した上記クラス定義1〜4の各
クラスに対応するクラス情報管理オブジェクトの一例を
図3に示す。
Next, FIG. 3 shows an example of the class information management object corresponding to each class of the above class definitions 1 to 4.

【0035】図3において、同図中(a)はクラス定義
1に対応するクラス情報管理オブジェクトであり、同図
中(b)はクラス定義2に対応するクラス情報管理オブ
ジェクトであり、同図中(c)はクラス定義3に対応す
るクラス情報管理オブジェクトであり、同図中(d)は
クラス定義4に対応するクラス情報管理オブジェクトで
ある。更に、上述した図2のフローチャートを参照しな
がら、もう少し具体的に説明する。
In FIG. 3, (a) is a class information management object corresponding to the class definition 1, and (b) is a class information management object corresponding to the class definition 2 in FIG. (C) is a class information management object corresponding to the class definition 3, and (d) in the figure is a class information management object corresponding to the class definition 4. Further, a more specific description will be given with reference to the flowchart of FIG.

【0036】クラス定義1においては、「String」クラ
スには親クラスは存在しないので、ステップ120を経
てステップ140以降が実行される。その結果、図3
(a)においては、「String」クラスを示す情報として
の“String”に対応して、「String」クラスの属性情報
つまり属性型(char* )がクラス情報として登録されて
いる。
In the class definition 1, since there is no parent class in the "String" class, step 140 and subsequent steps are executed after step 120. As a result,
In (a), the attribute information of the “String” class, that is, the attribute type (char *) is registered as the class information corresponding to “String” as the information indicating the “String” class.

【0037】クラス定義2においては、「Person」クラ
スには親クラスは存在しないので、上記同様に、ステッ
プ120を経てステップ140以降が実行される。ここ
で、「Person」クラスの属性情報つまり属性型(Strin
g)は上記クラス定義1の「String」クラスを意味して
いるので、この場合は、「Person」クラスの属性情報と
しての(String)が登録されるのではなく、実際には、
図3(b)に示す様に、「String」クラスの属性情報つ
まり属性型(char* )がクラス情報として、「Person」
クラスを示す情報としての“Person”に対応して登録さ
れる。
In the class definition 2, since there is no parent class in the "Person" class, step 140 and subsequent steps are executed in the same manner as above. Here, the attribute information of the "Person" class, that is, the attribute type (Strin
Since g) means the "String" class of the above class definition 1, in this case, (String) as the attribute information of the "Person" class is not registered, but actually,
As shown in FIG. 3B, the attribute information of the “String” class, that is, the attribute type (char *) is “Person” as the class information.
It is registered in correspondence with "Person" as information indicating a class.

【0038】クラス定義3においては、「Employee」ク
ラスは親クラスとして「Person」クラスを持っているの
で、ステップ120を経てステップ130が実行され
る。この結果、図3(c)に示す様に、「Person」クラ
スが親クラスであるという旨の情報例えば「Person必
要」がクラス情報として、「Employee」クラスを示す情
報としての“Employee”に対応して登録される。そし
て、更に「Employee」クラスには2つの属性が存在して
いるので、ステップ120を経てステップ140以降が
実行される。すると、上記クラス定義1の場合と同様
に、「Employee」クラスの属性型(つまりint )がクラ
ス情報として登録される。
In the class definition 3, since the "Employee" class has the "Person" class as the parent class, the step 130 is executed through the step 120. As a result, as shown in FIG. 3C, information indicating that the "Person" class is a parent class, for example, "Person required" corresponds to the class information, and corresponds to "Employee" as the information indicating the "Employee" class. Will be registered. Further, since there are two attributes in the "Employee" class, step 120 and subsequent steps are executed through step 120. Then, as in the case of the class definition 1 above, the attribute type (that is, int) of the “Employee” class is registered as class information.

【0039】クラス定義4においても、上記クラス定義
3の場合と同様に、図3(d)に示すように、クラス情
報が登録される。
In the class definition 4, as in the case of the class definition 3, class information is registered as shown in FIG.

【0040】そして、オブジェクト間論理関係解析部3
0は、上記各クラス定義についてのクラス情報管理オブ
ジェクトを作成すると、それらのクラス情報管理オブジ
ェクトをデータ配置制御部41に渡すと共に、オブジェ
クトの配置を実行すべき旨をデータ配置制御部41に指
示する。
Then, the inter-object logical relationship analysis unit 3
When creating the class information management objects for each of the above class definitions, 0 passes the class information management objects to the data arrangement control unit 41 and instructs the data arrangement control unit 41 to execute the object arrangement. .

【0041】次に、データ配置制御部41によるオブジ
ェクトの配置処理について、図4のフローチャートを参
照して説明する。
Next, the object arrangement processing by the data arrangement control unit 41 will be described with reference to the flowchart of FIG.

【0042】データ配置制御部41は、オブジェクト間
論理関係解析部30から渡されたクラス情報管理オブジ
ェクトに基づく全てのクラスのサブクラスを管理するた
めの、クラス名とサブクラス数とから構成される可変長
の表(以下、サブクラス管理表という)を作成し(ステ
ップ310)、オブジェクト間論理関係解析部30から
渡されたクラス情報管理オブジェクトの内、未チェック
のクラス情報管理オブジェクトが有るか否かを判断する
(ステップ320)。
The data arrangement control unit 41 manages the subclasses of all the classes based on the class information management object passed from the inter-object logical relationship analysis unit 30, and has a variable length composed of a class name and the number of subclasses. (Hereinafter referred to as a subclass management table) is created (step 310), and it is determined whether or not there is an unchecked class information management object among the class information management objects passed from the inter-object logical relationship analysis unit 30. (Step 320).

【0043】ここで、未チエックのものがある場合は、
そのクラス情報管理オブジェクトを読み込んで(ステッ
プ330)、そこに属性情報が登録されているか否かを
判断し(ステップ340)、登録されている場合は、そ
の属性情報を読み込み(ステップ350)、その属性は
クラス属性(Class属性)であるか否か、すなわち
(part−of関係)であるか否かを判断する(ステ
ップ360)。
If there are unchecked ones,
The class information management object is read (step 330), it is determined whether or not the attribute information is registered therein (step 340), and if it is registered, the attribute information is read (step 350). It is determined whether the attribute is a class attribute (Class attribute), that is, whether it is a (part-of relationship) (step 360).

【0044】ここで、クラス属性でない場合にはステッ
プ340に移行し、一方、クラス属性の場合(part
−of関係の場合)は、そのクラスの情報を読み込み、
この情報を読み込んだ属性情報の位置に埋め込む(ステ
ップ370)。
If it is not a class attribute, the process proceeds to step 340. On the other hand, if it is a class attribute (part)
-Of relation) reads the information of the class,
This information is embedded at the position of the read attribute information (step 370).

【0045】その後、読み込んだクラスは親クラスを持
っているか否か、すなわち(is−a関係)か否かを判
断し(ステップ380)、持っていない場合には上記ス
テップ320に移行し、一方、親クラスを持っている場
合(is−a関係)、サブクラス管理表における当該親
クラスのサブクラス数の値を1つ増やす(ステップ39
0)。このステップ390を終了した後はステップ38
0に移行する。
After that, it is judged whether or not the read class has a parent class, that is, (is-a relation) (step 380). , If it has a parent class (is-a relationship), the value of the number of subclasses of the parent class in the subclass management table is incremented by 1 (step 39).
0). After finishing this step 390, step 38
Move to 0.

【0046】なおステップ340において属性情報が存
在しない場合はステップ380に移行する。
If the attribute information does not exist in step 340, the process proceeds to step 380.

【0047】またステップ320において全てのクラス
情報管理オブジェクトについてチェックした場合は、処
理を終了する。これで、全てのクラスについてのサブク
ラスの数を求めたことになる。
If all the class information management objects are checked in step 320, the process is terminated. Now we have the number of subclasses for all classes.

【0048】ここで、上述した処理により上記クラス定
義1〜4についてのクラスのサブクラス数を求めたサブ
クラス管理表の内容を図5に示す。
FIG. 5 shows the contents of the subclass management table in which the number of subclasses of the classes for the above class definitions 1 to 4 is obtained by the above-mentioned processing.

【0049】図5においては、クラス名“Person”のク
ラス(「Person」クラス)のみが、サブクラスの数が2
になっている。これは、上述したクラス定義1〜4を参
照して明らかなように、「Person」クラスを、「Employ
ee」クラス(クラス定義3参照)及び「Student 」クラ
ス(クラス定義4参照)が継承しているので、「Perso
n」クラスのサブクラスの数は「2」となる。
In FIG. 5, only the class with the class name “Person” (“Person” class) has two subclasses.
It has become. This is done by changing the "Person" class to "Employ", as is clear from the above class definitions 1 to 4.
Since the "ee" class (see class definition 3) and the "Student" class (see class definition 4) inherit, "Perso"
The number of subclasses of the “n” class is “2”.

【0050】このようにして全てのクラスのサブクラス
数が求まると、データ配置制御部41は、サブクラス管
理表に基づいて、クラスオブジェクトのクラスタリング
を行う。
When the number of subclasses of all classes is obtained in this way, the data arrangement control unit 41 clusters the class objects based on the subclass management table.

【0051】次にデータ配置制御部41によるクラスタ
リング処理について、図6のフローチャートを参照して
説明する。
Next, the clustering processing by the data arrangement control unit 41 will be described with reference to the flowchart of FIG.

【0052】データ配置制御部41は、サブクラス管理
表を読み込み(ステップ501)、そのサブクラス管理
表中に未解析のクラスがあるか否かを判断する(ステッ
プ502)。
The data arrangement control unit 41 reads the subclass management table (step 501) and determines whether or not there is an unanalyzed class in the subclass management table (step 502).

【0053】ここで、未解析のクラスがある場合は、図
5に示されるようなサブクラス管理表と、オブジェクト
間論理関係解析部30から既に渡されているクラス情報
管理オブジェクトとに基づいて、そのクラスはサブクラ
スを持っているか否かを判断し(ステップ503)、持
っていなければ上記ステップ502に移行し、一方、持
っている場合は、上記クラス情報管理オブジェクトに基
づいて、そのサブクラスは唯一のサブクラスであるか否
かを判断する(ステップ504)。
If there is an unanalyzed class, the class is managed based on the subclass management table as shown in FIG. 5 and the class information management object already passed from the inter-object logical relationship analysis unit 30. It is determined whether or not the class has a subclass (step 503), and if it does not have the subclass, the process moves to the above step 502. On the other hand, if the class has the subclass, the subclass is unique based on the class information management object. It is judged whether or not it is a subclass (step 504).

【0054】ここで、唯一のサブクラスの場合は、当該
クラスとそのサブクラスとを隣接させて配置する(ステ
ップ505)。このステップを終了した後はステップ5
02に移行する。
Here, in the case of the only subclass, the class and the subclass are arranged adjacent to each other (step 505). Step 5 after completing this step
Move to 02.

【0055】ステップ504において複数のサブクラス
が存在する場合は、これまでに解析したクラスで最多の
サブクラスを持つクラスと、サブクラス管理表に登録さ
れているサブクラス数とを比較し(ステップ506)、
当該サブクラスの有するサブクラス数の方が多いか否か
を判断する(ステップ507)。
If there are a plurality of subclasses in step 504, the class having the largest number of subclasses analyzed so far is compared with the number of subclasses registered in the subclass management table (step 506).
It is determined whether or not the number of subclasses of the subclass is larger (step 507).

【0056】ここで、少なければステップ502に移行
し、一方、多い場合は、当該クラスを最多のサブクラス
を有するクラスとして、そのクラスの名前とサブクラス
数を一時的に記憶する(ステップ508)。このステッ
プを終了した後はステップ502に移行する。
If the number is small, the process proceeds to step 502. On the other hand, if the number is large, the class is defined as the class having the largest number of subclasses, and the name of the class and the number of subclasses are temporarily stored (step 508). After completing this step, the process proceeds to step 502.

【0057】ステップ502において、全てのクラスに
ついて解析した場合は、ステップ508において一時的
に記憶したクラスの名前及びサブクラス数に基づいて、
最多のサブクラスを持つクラスが存在するか否かを判断
し(ステップ509)、存在する場合は、上記一時的に
記憶したクラスの名前に基づいて、その最多のサブクラ
スを持つクラスをデータディクショナリ等の近傍に配置
し(ステップ510)、処理を終了する。ステップ50
9において、最多のサブクラスを持つクラスが存在しな
い場合は処理を終了する。
When all the classes are analyzed in step 502, based on the class name and the number of subclasses temporarily stored in step 508,
It is judged whether or not there is a class having the largest number of subclasses (step 509), and if there is, the class having the largest number of subclasses is determined based on the name of the temporarily stored class, such as in the data dictionary. It is placed in the vicinity (step 510), and the process ends. Step 50
In 9, if there is no class having the largest number of subclasses, the process ends.

【0058】以上の処理で、クラスオブジェクトのクラ
スタリングが終了したことになる。上述した処理手順に
おいては、ステップ505及びステップ510が実際
に、クラスオブジェクトを二次記憶上に配置している処
理を示している。
With the above processing, the clustering of class objects is completed. In the above-mentioned processing procedure, step 505 and step 510 show the processing in which the class object is actually arranged in the secondary storage.

【0059】すなわち、ステップ505の処理は、ある
クラスが1つだけサブクラスを持つ場合であって、当該
クラスとそのサブクラスを隣接させて配置することを意
味している。具体例として、今、上記クラス定義1〜3
までしか無かったとすると、図7(a)のように、「Pe
rson」クラスと「Employee」クラスとが隣接して配置さ
れる。
That is, the process of step 505 means that a certain class has only one subclass and that the class and its subclass are arranged adjacent to each other. As a specific example, now, the above class definitions 1 to 3
If there is only up to, as shown in Figure 7 (a), "Pe
The "rson" class and the "Employee" class are arranged adjacent to each other.

【0060】またステップ510は、あるクラスが複数
のサブクラスを持つ場合であって、当該クラスはデータ
ディクショナリ等主記憶上に読み込まれる可能性の高い
オブジェクトの近傍に配置することを意味している。
Further, step 510 means that when a certain class has a plurality of subclasses, the class is arranged in the vicinity of an object which is likely to be read in the main memory such as a data dictionary.

【0061】以上は「is−a関係」の場合であるが、
次に上記クラス定義1〜4を用いて「part−of関
係」の場合のクラスタリング結果を説明すると、図7
(b)のようになる。すなわちクラス定義2の「Perso
n」クラスの属性としてクラス定義1の「String」クラ
スが埋め込まれる。これによって、「Person」クラスが
主記憶に読み込まれたときは、同時に「String」クラス
も読み込まれたことになるので、クラスのアクセス回数
を軽減することができる。
The above is the case of "is-a relation",
Next, the clustering result in the case of the “part-of relationship” will be described using the above class definitions 1 to 4. FIG.
It becomes like (b). That is, "Perso of class definition 2
The "String" class of the class definition 1 is embedded as an attribute of the "n" class. As a result, when the "Person" class is loaded into the main memory, the "String" class is also loaded at the same time, so the number of times the class is accessed can be reduced.

【0062】上記実施例では、「C++言語」を例にと
って説明したが、本発明はこれに限定されること無く、
オブジェクト指向言語であれば、どのような言語でも適
用可能である。これについては当業者であれば容易に認
識することができるので、他の言語での説明は省略す
る。
In the above embodiment, the "C ++ language" has been described as an example, but the present invention is not limited to this.
Any object-oriented language can be applied. Since this can be easily recognized by those skilled in the art, description in other languages will be omitted.

【0063】以上説明したように本実施例においては、
「Employee」クラスや「Student 」クラスをデータベー
ス中に格納する際には、各々のクラス固有の情報の他に
その親クラスである「Person」クラスの情報も必要であ
るので、「Employee」クラスや、「Student 」クラスの
クラスオブジェクトの近傍に、「Person」クラスのクラ
スオブジェクトを配置するようにしている。このため、
サブクラスのクラスオブジェクトが主記憶に読み込まれ
るときは、その親クラスのオブジェクトも主記憶に読み
込まれるので、クラスオブジェクトに対する処理のアク
セスまた「Person」クラスは属性として「String」クラ
スを持っているので、「Person」クラスのクラスオブジ
ェクト中に「String」クラスのクラスオブジェクトを埋
め込むことにより、必要なクラスオブジェクトの読み込
み回数を減らすことができる。
As described above, in this embodiment,
When storing the "Employee" class and the "Student" class in the database, the information of the parent class "Person" is necessary in addition to the information unique to each class. , The class object of the "Person" class is arranged near the class object of the "Student" class. For this reason,
When the class object of the subclass is loaded into the main memory, the object of its parent class is also loaded into the main memory, so access to the process for the class object and the "Person" class has the "String" class as an attribute. By embedding the class object of “String” class in the class object of “Person” class, it is possible to reduce the number of times of reading the necessary class object.

【0064】最後に請求項1の発明の構成要件と図1の
実施例の構成要件との対応関係を説明する。解釈手段は
図1のオブジェクト間論理関係解析部30に対応し、計
数手段及び配置手段は共に図1のデータ配置制御部41
に対応する。
Finally, the correspondence between the constituent features of the invention of claim 1 and the constituent features of the embodiment of FIG. 1 will be described. The interpreting means corresponds to the inter-object logical relationship analyzing section 30 of FIG. 1, and the counting means and the arranging means are both data arrangement control section 41 of FIG.
Corresponding to.

【0065】のた請求項2の発明の構成要件と図1の実
施例の構成要件との対応関係を説明する。埋込手段は図
1のデータ配置制御部41に対応する。
Correspondence between the constituent features of the invention of claim 2 and the constituent features of the embodiment of FIG. 1 will be described. The embedding means corresponds to the data arrangement control unit 41 in FIG.

【0066】[0066]

【発明の効果】以上詳細に説明したように、第1の発明
によれば、解釈手段が、定義された複数のクラスの親子
関係及び属性を解釈し、計数手段が、その解釈結果に基
づいて、前記各クラスのサブクラス数を計数し、そして
配置手段が、その計数結果に基づいて、複数のサブクラ
スを有するクラスの情報を表現するオブジェクトについ
ては、二次記憶上において、主記憶にアクセスされる可
能性の高いオブジェクトの近傍に配置するようにしてる
ので、サブクラスがアクセスされるときは、その親クラ
スも主記憶上にアクセスされることになるので、オブジ
ェクト間(クラス間)の論理的関係に応じた効率的なオ
ブジェクトのクラスタリングを行うことができる。
As described in detail above, according to the first aspect of the present invention, the interpreting means interprets the parent-child relationships and attributes of a plurality of defined classes, and the counting means based on the interpretation result. , The number of subclasses of each class is counted, and the arranging means accesses the main memory on the secondary memory for the object expressing the information of the class having a plurality of subclasses based on the counting result. Since it is arranged near an object that has a high possibility, when a subclass is accessed, its parent class will also be accessed on the main memory. According to this, efficient object clustering can be performed.

【0067】また第2の発明によれば、埋込手段が、解
釈手段による解釈結果に基づいて、クラスとして定義さ
れた属性を持つクラスに定義情報を埋め込むようにして
いるので、あるクラスをアクセスした際には、その属性
となっているクラスの情報も一緒にアクセスされること
になるので、クラスの読み込み回数を削減することがで
きる。
According to the second invention, the embedding means embeds the definition information in the class having the attribute defined as the class based on the interpretation result by the interpreting means. When this is done, the information of the class that has that attribute is also accessed, so the number of times the class is read can be reduced.

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

【図1】本発明に係るオブジェクト指向データベース管
理装置の一実施例の構成を示す機能ブロック図。
FIG. 1 is a functional block diagram showing the configuration of an embodiment of an object-oriented database management device according to the present invention.

【図2】オブジェクト間論理関係解析部の処理動作を示
すフローチャート。
FIG. 2 is a flowchart showing the processing operation of an inter-object logical relationship analysis unit.

【図3】オブジェクト間論理関係解析部によって生成さ
れたクラス情報管理オブシェクトを示す図。
FIG. 3 is a diagram showing a class information management object generated by an inter-object logical relationship analysis unit.

【図4】データ配置制御部のサブクラス管理表の作成処
理動作を示すフローチャート。
FIG. 4 is a flowchart showing a subclass management table creation processing operation of the data arrangement control unit.

【図5】データ配置制御部により作成されたサブクラス
管理表を示す図。
FIG. 5 is a diagram showing a subclass management table created by a data placement control unit.

【図6】データ配置制御部のクラスオブジェクトの自動
配置処理動作を示すフローチャート。
FIG. 6 is a flowchart showing a class object automatic placement processing operation of a data placement control unit.

【図7】自動配置された結果を説明するための図。FIG. 7 is a diagram for explaining a result of automatic arrangement.

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

10…字句解析部、20…構文解析部、30…オブジェ
クト間論理関係解析部、40…入出力部、41…データ
配置制御部、50…ソースコード、60…二次記憶装
置。
10 ... Lexical analysis part, 20 ... Syntax analysis part, 30 ... Inter-object logical relationship analysis part, 40 ... Input / output part, 41 ... Data arrangement control part, 50 ... Source code, 60 ... Secondary storage device.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】定義された複数のクラスの情報を表現する
オブジェクトのクラスタリングを行うオブジェクト指向
データベース管理装置であって、 前記各クラスの親子関係及び属性を解釈する解釈手段
と、 前記解釈手段による解釈結果に基づいて、前記各クラス
のサブクラス数を計数する計数手段と、 前記計数手段による計数結果に基づいて、前記各クラス
の情報を表現するオブジェクトの二次記憶上の配置を行
う配置手段とを具備したことを特徴とするオブジェクト
指向データベース管理装置。
1. An object-oriented database management device for clustering objects expressing information of a plurality of defined classes, comprising: interpreting means for interpreting parent-child relationships and attributes of each class; and interpreting by the interpreting means. Counting means for counting the number of subclasses of each class based on the result; and arranging means for arranging the objects expressing the information of each class on the secondary storage based on the counting result by the counting means. An object-oriented database management device characterized by being provided.
【請求項2】前記解釈手段による解釈結果に基づいて、
クラスとして定義された属性を持つクラスに定義情報を
埋め込む埋込手段を更に具備したことを特徴とする請求
項1のオブジェクト指向データベース管理装置。
2. Based on the interpretation result by the interpretation means,
The object-oriented database management device according to claim 1, further comprising an embedding unit that embeds definition information in a class having an attribute defined as a class.
JP5327760A 1993-12-24 1993-12-24 Device for managing objective-oriented data base Pending JPH07182222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5327760A JPH07182222A (en) 1993-12-24 1993-12-24 Device for managing objective-oriented data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5327760A JPH07182222A (en) 1993-12-24 1993-12-24 Device for managing objective-oriented data base

Publications (1)

Publication Number Publication Date
JPH07182222A true JPH07182222A (en) 1995-07-21

Family

ID=18202688

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5327760A Pending JPH07182222A (en) 1993-12-24 1993-12-24 Device for managing objective-oriented data base

Country Status (1)

Country Link
JP (1) JPH07182222A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000047630A (en) * 1998-12-31 2000-07-25 포만 제프리 엘 Systems, methods and computer program products for ordering objects corresponding to database operations that are performed on a relational database upon completion of a transaction by an object-oriented transaction system
US6192363B1 (en) 1997-06-25 2001-02-20 Nec Corporation Method and apparatus for supplying multi-media data to a client by using threads
CN116401567A (en) * 2023-06-02 2023-07-07 支付宝(杭州)信息技术有限公司 Clustering model training, user clustering and information pushing method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6192363B1 (en) 1997-06-25 2001-02-20 Nec Corporation Method and apparatus for supplying multi-media data to a client by using threads
KR20000047630A (en) * 1998-12-31 2000-07-25 포만 제프리 엘 Systems, methods and computer program products for ordering objects corresponding to database operations that are performed on a relational database upon completion of a transaction by an object-oriented transaction system
CN116401567A (en) * 2023-06-02 2023-07-07 支付宝(杭州)信息技术有限公司 Clustering model training, user clustering and information pushing method and device
CN116401567B (en) * 2023-06-02 2023-09-08 支付宝(杭州)信息技术有限公司 Clustering model training, user clustering and information pushing method and device

Similar Documents

Publication Publication Date Title
US6349305B1 (en) Method and system for database processing by invoking a function related to index type definition, generating an execution plan based on index type name
Caprile et al. Nomen est omen: Analyzing the language of function identifiers
US4931928A (en) Apparatus for analyzing source code
Cardelli Typeful programming
Christensen et al. Precise analysis of string expressions
US5878406A (en) Method for representation of knowledge in a computer as a network database system
Carroll Practical unification-based parsing of natural language
US7788282B2 (en) Methods and computer programs for database structure comparison
CN112256271A (en) Block chain intelligent contract security detection system based on static analysis
CN115757462A (en) Object-oriented database dynamic interface generation method and operation method
JP3777666B2 (en) Database processing method and system
US7921414B2 (en) Method and system for compiling a source code
JPH07182222A (en) Device for managing objective-oriented data base
Koskimies et al. The design of a language processor generator
Diamantopoulos et al. Towards mining answer edits to extract evolution patterns in Stack Overflow
CN112596737A (en) Method, system, equipment and storage medium for scanning function call relation
Kilbury et al. Inheritance-based models of the lexicon
Wirth et al. A fast and compact compiler for Modula-2
US6356895B1 (en) Method and computer program product for processing system files using a trigger program
Topsakal Extracting semantics from legacy sources using reverse engineering of java code with the help of visitor patterns
Borgida Class hierarchies in information systems: sets, types, or prototypes?
d’Andrea et al. Tecnical Documentation
Hinkelmann Bidirectional reasoning of horn clause programs: transformation and compilation
Biliris et al. Ode 2.0 user's manual
Vander Mey et al. SYMPLE: a general syntax directed macro preprocessor