JPH06149646A - Object directional data base management system - Google Patents
Object directional data base management systemInfo
- Publication number
- JPH06149646A JPH06149646A JP4304126A JP30412692A JPH06149646A JP H06149646 A JPH06149646 A JP H06149646A JP 4304126 A JP4304126 A JP 4304126A JP 30412692 A JP30412692 A JP 30412692A JP H06149646 A JPH06149646 A JP H06149646A
- Authority
- JP
- Japan
- Prior art keywords
- type
- class
- class object
- attribute
- objects
- 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
Links
- 238000007689 inspection Methods 0.000 abstract description 15
- 230000002085 persistent effect Effects 0.000 description 62
- 238000000034 method Methods 0.000 description 18
- 238000007726 management method Methods 0.000 description 17
- 230000008569 process Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 9
- 238000006467 substitution reaction Methods 0.000 description 7
- 238000003780 insertion Methods 0.000 description 4
- 230000037431 insertion Effects 0.000 description 4
- 230000003068 static effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000013523 data management Methods 0.000 description 2
- 239000010437 gem Substances 0.000 description 2
- 229910001751 gemstone Inorganic materials 0.000 description 2
- 230000010365 information processing Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】この発明はオブジェクト指向デー
タベース管理システムに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an object oriented database management system.
【0002】[0002]
【従来の技術】従来、オブジェクト指向データベース管
理システムにおいては、データの一貫性を保証するた
め、永続オブジェクト自身やその属性や集合オブジェク
トの要素に、型を宣言し、該型に基づいて、データの検
査を行うようにしている。すなわち、永続オブジェクト
の属性への値の代入や、集合オブジェクトへの要素の挿
入に対して、コンパイラやプリプロセッサによる実行以
前での静的な型検査が行われている。2. Description of the Related Art Conventionally, in an object-oriented database management system, in order to guarantee data consistency, a type is declared for the persistent object itself, its attributes, or elements of an aggregate object, and the data of the type is declared based on the type. I try to do an inspection. That is, static type checking is performed before execution by a compiler or preprocessor for assigning values to attributes of persistent objects and inserting elements into aggregate objects.
【0003】このような静的な型検査に対し、動的な型
検査を行うようにしたものも提案されている。この動的
な型検査を行うシステムとしては、「ザ・ゲムストーン
・データ・マネージメント・システム(“The GemStone
Data Management System ”):オブジェクト・オリエ
ンテッド・コンテンツ,データベース,アンド・アプリ
ケーションズ(“Object Oriented Concepts,Database
s,and Applications ”)Edited by (W.Kim, F.H.Loch
ovsky)1989. (ACMpress.)pp238-pp308 」の文献(文
献1という)に記述されたものがある。In addition to such static type checking, there has been proposed a type which performs dynamic type checking. As a system for performing this dynamic type checking, "The GemStone Data Management System (" The GemStone
Data Management System "):" Object Oriented Concepts, Database "
s, and Applications ”) Edited by (W.Kim, FHLoch
ovsky) 1989. (ACMpress.) pp238-pp308 ”(referred to as reference 1).
【0004】また型の情報を利用するようにしたシステ
ムとしては、特開平3−50646号公報に開示された
ものがある。この公報に開示されたものでは、オブジェ
クトの属性のタイプ(型)を保持し、属性の更新のとき
にタイプ(型)の情報を利用するようにしている。Further, as a system adapted to utilize the type information, there is a system disclosed in Japanese Patent Laid-Open No. 3-50646. In the publication disclosed in this publication, the type (type) of the attribute of the object is held and the type (type) information is used when updating the attribute.
【0005】なおオブジェクト指向データベースの基礎
概念としては、 (1)「“オブジェクト指向データベースの基礎概念”
(田中克己著 情報処理Vol.32 No.5 pp500 〜513 May
1991)」 (2)「“オブジェクト指向データベース管理システム
のアーキテクチャ”(牧之内顕文著 情報処理 Vol.32
No5 pp514〜522 May 1991)」 の各文献に記述されている技術が知られている。The basic concept of the object-oriented database is as follows: (1) "" Basic concept of object-oriented database "
(Katsumi Tanaka Information Processing Vol.32 No.5 pp500 ~ 513 May
1991) "(2)" Architecture of object-oriented database management system "(Kenfumi Makinouchi, Information Processing Vol.32
No5 pp514 to 522 May 1991) ”is known.
【0006】またオブジェクト指向データベース管理シ
ステムを実現したシステムとしては、特開平3−137
730号公報に開示されたものが知られている。As a system realizing an object-oriented database management system, Japanese Patent Laid-Open No. 3-137
The one disclosed in Japanese Patent Publication No. 730 is known.
【0007】[0007]
【発明が解決しようとする課題】しかしながら、上述し
た従来の静的な型検査では、次に説明する2つの問題点
がある。 (a)型変換などの仕組みにより十分に厳しい型検査を
行うことがてきない。 (b)実行時に型の定義が変更されるような動的な型変
更は対処できない。However, the above-mentioned conventional static type checking has the following two problems. (A) It is impossible to perform sufficiently strict type inspection by a mechanism such as type conversion. (B) A dynamic type change in which the type definition is changed at execution cannot be dealt with.
【0008】また上述した文献1に記述されている動的
な型検査を行うシステムでは、型の情報は継承関係につ
いては記述されておらず、また示唆されてもいないの
で、継承関係を考慮した動的な型検査を行うことができ
ない。Further, in the system for performing dynamic type checking described in the above-mentioned Document 1, since the type information does not describe nor suggest the inheritance relationship, the inheritance relationship is taken into consideration. No dynamic type checking can be done.
【0009】更に上記特開平3−50646号公報に開
示されたものにおいては、型の情報は、型検査に使用さ
れておらず、また継承関係を考慮したものとなっていな
いので、継承関係を考慮した動的な型検査を行うことが
できない。Further, in the above-mentioned Japanese Patent Laid-Open No. 3-50646, the type information is not used for type checking and the inheritance relation is not taken into consideration. No dynamic type checking can be done.
【0010】このように従来においては、継承関係を考
慮した動的な型検査を行うことができないので、誤った
データの代入や挿入を防止することは困難であった。As described above, in the related art, since it is impossible to perform a dynamic type check in consideration of inheritance relationships, it is difficult to prevent incorrect data substitution or insertion.
【0011】この発明は、継承関係を考慮した動的な型
検査を行うことのできるオブジェクト指向データベース
管理システムを提供することを目的とする。It is an object of the present invention to provide an object-oriented database management system capable of performing dynamic type checking in consideration of inheritance relationships.
【0012】[0012]
【課題を解決するための手段】上記目的を達成するた
め、第1の発明のオブジェクト指向データベース管理シ
ステムでは、複数のオブジェクトと、当該各オブジェク
トにそれぞれ対応し、かつ当該オブジェクトの属性の型
を含む型情報を保持すると共に当該型の継承関係に関す
る情報も保持可能なクラスオブジェクトとを管理する管
理手段と、前記複数のオブジェクトの内、第1のオブジ
ェクトを第2のオブジェクトに関係付けする際に、当該
各オブジェクトにそれぞれ対応するクラスオブジェクト
に基づいて型検査を行う型検査手段とを具えている。In order to achieve the above object, in the object-oriented database management system of the first invention, a plurality of objects and the types of attributes of the objects respectively corresponding to the objects are included. Management means for managing a class object that holds type information and also information about inheritance relation of the type; and when associating a first object with a second object among the plurality of objects, A type checking means for checking the type based on the class object corresponding to each object.
【0013】第2の発明のオブジェクト指向データベー
ス管理システムでは、複数のオブジェクトと、該各オブ
ジェクトにそれぞれ対応し、かつ当該オブジェクトの属
性の型を含む型情報を保持すると共に当該型の継承関係
に関する情報も保持可能なクラスオブジェクトと、オブ
ジェクトの集合を表す集合オブジェクトと、該集合オブ
ジェクトに対応し、かつ当該オブジェクトの要素の型を
含む型情報を保持すると共に当該型の継承関係に関する
情報も保持可能なクラスオブジェクトとを管理する管理
手段と、前記集合オブジェクトに、前記複数のオブジェ
クト中の特定のオブジェクトを関係付けする際に、当該
特定のオブジェクトに対応するクラスオブジェクトと、
前記集合オブジェクトに対応するクラスオブジェクトと
に基づいて型検査を行う型検査手段とを具えている。In the object-oriented database management system of the second invention, a plurality of objects and type information corresponding to each of the objects and including the attribute type of the object are held, and information on the inheritance relation of the type is held. Can also hold a class object, a set object that represents a set of objects, type information that corresponds to the set object and that includes the types of the elements of the object, and also information about the inheritance relationship of the type Management means for managing a class object, and a class object corresponding to the specific object when associating the specific object among the plurality of objects with the aggregate object,
And a type checking means for checking the type based on the class object corresponding to the aggregate object.
【0014】[0014]
【作用】第1の発明においては、型検査手段は、第1の
オブジェクト(例えば永続オブジェクト)を、第2のオ
ブジェクト(例えば永続オブジェクト)の属性に関係付
けする(代入する)際に、第1の永続オブジェクトに対
応するクラスオブジェクトと、第2の永続オブジェクト
に対応するクラスオブジェクトとに基づいて型検査を実
施する。この型検査の結果として、前記各クラスオブジ
ェクトに定義されている属性の型が一致している場合
は、第1の永続オブジェクトが第2の永続オブジェクト
の属性に実際に代入される。また型検査の結果として、
第1の永続オブジェクトに対応するクラスオブジェクト
に定義されている属性の型と、第2の永続オブジェクト
に対応するクラスオブジェクトに定義されている属性の
型を継承しているクラスオブジェクトに定義されている
属性の型とが一致している場合にも、第1の永続オブジ
ェクトが第2の永続オブジェクトの属性に実際に代入さ
れる。従って、この発明によれば、継承関係を考慮した
動的な型検査を行うことができる。In the first aspect of the invention, the type checking means makes the first object when relating (substituting) the first object (eg, persistent object) to the attribute of the second object (eg, persistent object). Type checking is performed based on the class object corresponding to the persistent object and the class object corresponding to the second persistent object. As a result of the type check, when the types of the attributes defined in the respective class objects match, the first persistent object is actually assigned to the attribute of the second persistent object. Also, as a result of type inspection,
Defined in a class object that inherits the attribute type defined in the class object corresponding to the first persistent object and the attribute type defined in the class object corresponding to the second persistent object Even if the attribute types match, the first persistent object is actually assigned to the attribute of the second persistent object. Therefore, according to the present invention, it is possible to perform dynamic type checking in consideration of inheritance relationships.
【0015】第2の発明においては、型検査手段は、特
定のオブジェクト(例えば永続オブジェクト)を集合オ
ブジェクトに関係付けする(挿入する)際に、永続オブ
ジェクトに対応するクラスオブジェクトと、集合オブジ
ェクトに対応するクラスオブジェクトとに基づいて型検
査を実施する。この型検査の結果として、永続オブジェ
クトに対応するクラスオブジェクトに定義されている属
性の型と、集合オブジェクトに対応するクラスオブジェ
クトに定義されている要素の型とが一致している場合
は、永続オブジェクトが集合オブジェクトに実際に挿入
される。また永続オブジェクトに対応するクラスオブジ
ェクトに定義されている属性の型と、集合オブジェクト
に対応するクラスオブジェクトに定義されている属性の
型を継承しているクラスオブジェクトに定義されている
属性の型とが一致する場合にも、永続オブジェクトが集
合オブジェクトに実際に挿入される。従って、この発明
によれば、継承関係を考慮した動的な型検査を行うこと
ができる。In the second invention, the type checking means, when relating (inserting) a specific object (for example, a persistent object) to the aggregate object, supports the class object corresponding to the persistent object and the aggregate object. Type checking based on the class object As a result of this type check, if the type of the attribute defined in the class object corresponding to the persistent object and the type of the element defined in the class object corresponding to the aggregate object match, the persistent object Is actually inserted into the aggregate object. Also, the attribute type defined in the class object corresponding to the persistent object and the attribute type defined in the class object inheriting the attribute type defined in the class object corresponding to the aggregate object If so, the persistent object is actually inserted into the aggregate object. Therefore, according to the present invention, it is possible to perform dynamic type checking in consideration of inheritance relationships.
【0016】[0016]
【実施例】以下、本発明の実施例を添付図面を参照して
説明する。Embodiments of the present invention will be described below with reference to the accompanying drawings.
【0017】図1は、本発明に係るオブジェクト指向デ
ータベース管理システム(Object Oriented Database M
anagement Syatem=OODBMS)の一実施例を機能ブ
ロック図で示したものである。同図において、OODB
MS10は、管理手段11と型検査手段12とを有して
いる。管理手段11は、オブジェクト指向データベース
を保存しているデータベースファイル20を管理すると
共に、このファイル内容を主メモリ30に展開する。一
方、型検査手段12は、主メモリ30上に展開されたデ
ータベースファイル20の内容に対して、継承関係を考
慮した動的な型検査を行う。FIG. 1 shows an object-oriented database management system (Object Oriented Database M) according to the present invention.
FIG. 3 is a functional block diagram showing an embodiment of anagement Syatem (OODBMS). In the figure, OODB
The MS 10 has a management unit 11 and a pattern inspection unit 12. The management means 11 manages the database file 20 storing the object-oriented database and expands the contents of this file in the main memory 30. On the other hand, the type checking means 12 performs dynamic type checking on the contents of the database file 20 expanded on the main memory 30 in consideration of the inheritance relationship.
【0018】この実施例においては型変換を禁止してい
る。またこの実施例においては、上述したOODBMS
10は、当該システムの機能を遂行させるためのソフト
ウェア(プログラム)をプロセッサや中央処理装置など
の制御手段が実行することにより実現される。勿論、フ
ァームウェアやハードウェアで実現するようにしても良
い。In this embodiment, type conversion is prohibited. In addition, in this embodiment, the OODBMS described above is used.
10 is realized by a control unit such as a processor or a central processing unit executing software (program) for executing the function of the system. Of course, it may be realized by firmware or hardware.
【0019】図2は、図1に示したシステムを実現する
ための装置、例えばコンピュータやワークステーション
等のハードウェア構成を示したものである。同図におい
て、装置は、上記データベースファイル20を格納する
外部記憶装置210と、データベースファイル20の内
容が展開される主メモリ220と、入力装置230と、
出力装置240と、上記各部を制御すると共に型検査処
理を行う上記制御手段としてのプロセッサ250とを有
している。FIG. 2 shows a hardware configuration of an apparatus for implementing the system shown in FIG. 1, such as a computer or a workstation. In the figure, the device comprises an external storage device 210 for storing the database file 20, a main memory 220 in which the contents of the database file 20 are expanded, an input device 230,
It has an output device 240 and a processor 250 as the above-mentioned control means for controlling the above-mentioned respective parts and performing a mold inspection process.
【0020】次に、第1の永続オブジェクトを第2の永
続オブジェクトの属性に代入する際の、型検査手段12
による型検査処理について、図3乃至図5を参照して説
明する。Next, the type checking means 12 at the time of substituting the attributes of the first persistent object for the second persistent object 12
The mold inspection process by the method will be described with reference to FIGS. 3 to 5.
【0021】なお図3は型検査手段12の型検査処理動
作を示すフローチャートであり、図4及び図5は型検査
処理の処理過程を示す図である。Note that FIG. 3 is a flow chart showing the mold inspection processing operation of the mold inspection means 12, and FIGS. 4 and 5 are diagrams showing the processing steps of the mold inspection processing.
【0022】最初に、永続オブジェクトの属性への値の
代入における型検査でのデータの状態を図4に示す。こ
の図に示す例においては、永続オブジェクトI1の型は
クラスオブジェクトC1で与えられている(関係1)。
永続オブジェクトI1の属性1の型はクラスオブジェク
トC2であること(関係2)が、クラスオブジェクトC
1の“属性1の型”によって示されている。クラスオブ
ジェクトC3がクラスオブジェクトC2を継承している
こと(関係3)が、クラスオブジェクトC3の“継承”
によって示されている。一方、永続オブジェクトI2の
型はクラスオブジェクトC2′で与えられている(関係
4)。ここで、クラスオブジェクトC2=クラスオブジ
ェクトC2′とする。First, FIG. 4 shows the state of data in the type check in the value assignment to the attribute of the persistent object. In the example shown in this figure, the type of the persistent object I1 is given by the class object C1 (relationship 1).
The type of the attribute 1 of the persistent object I1 is the class object C2 (relationship 2) means that the class object C
1 is indicated by the “type of attribute 1”. "Inheritance" of the class object C3 means that the class object C3 inherits the class object C2 (relationship 3).
Indicated by. On the other hand, the type of the persistent object I2 is given by the class object C2 '(relationship 4). Here, it is assumed that class object C2 = class object C2 ′.
【0023】なお、永続オブジェクトI1、I2、クラ
スオブジェクトC1、C2、C3、C2′は全て外部記
憶装置210に格納されており、また上記関係1、2、
3、4を表現している。すなわち図4に示すデータ構造
は、外部記憶装置210にデータベースファイルとして
保存されている。The persistent objects I1 and I2 and the class objects C1, C2, C3 and C2 'are all stored in the external storage device 210, and the relationships 1, 2 and
3 and 4 are expressed. That is, the data structure shown in FIG. 4 is stored in the external storage device 210 as a database file.
【0024】また代入操作においては、上記データベー
スファイルの内容つまり永続オブジェクトI1、I2、
クラスオブジェクトC1、C2、C3、C2′が、プロ
セッサ250(ソフトウェア的には管理手段11)によ
って外部記憶装置210から主メモリ220上にロード
され展開される。この結果、主メモリ220上におい
て、上述した各永続オブジェクト及び各クラスオブジェ
クト並びに上記関係1、2、3、4が表現されており、
またこれら各関係の確認が可能な状態である。In the assigning operation, the contents of the database file, that is, the persistent objects I1, I2,
The class objects C1, C2, C3, C2 'are loaded from the external storage device 210 onto the main memory 220 and expanded by the processor 250 (management means 11 in terms of software). As a result, on the main memory 220, the above-mentioned persistent objects and class objects and the above relationships 1, 2, 3, 4 are expressed,
It is also possible to confirm each of these relationships.
【0025】このような前提の下において、第1の永続
オブジェクトとしての永続オブジェクトI2を、第2の
永続オブジェクトとしての永続オブジェクトI1の属性
へ代入する操作を実施するときに、型検査が行われる。Under these assumptions, the type check is performed when the operation of substituting the persistent object I2 as the first persistent object for the attribute of the persistent object I1 as the second persistent object is performed. .
【0026】すなわち型検査手段12は、図3に示すよ
うに、永続オブジェクトI2の型情報からクラスオブジ
ェクトXを得る(ステップ301)。この結果として、
クラスオブジェクトXとしてクラスオブジェクトC2′
が得られることになる。That is, the type checking means 12 obtains the class object X from the type information of the persistent object I2 as shown in FIG. 3 (step 301). As a result of this,
Class object C2 'as class object X
Will be obtained.
【0027】次に型検査手段12は、永続オブジェクト
I1の型情報からクラスオブジェクトC1を得ると共に
(ステップ302)、このクラスオブジェクトC1から
属性1の型であるクラスオブジェクトC2を得る(ステ
ップ303)。Next, the type checking means 12 obtains the class object C1 from the type information of the persistent object I1 (step 302), and obtains the class object C2 which is the type of attribute 1 from this class object C1 (step 303).
【0028】このようにして各永続オブジェクトの属性
の型つまりクラスオブジェクトを得ると、型検査手段1
2は、クラスオブジェクトXはクラスオブジェクトC2
と同じであるか否か(つまり属性の型が同じであるか否
か)を判断する(ステップ304)。When the attribute type of each persistent object, that is, the class object is obtained in this way, the type checking means 1
2 is the class object X is the class object C2
It is determined whether or not (that is, whether or not the attribute types are the same) (step 304).
【0029】上記ステップ304においてクラスオブジ
ェクトが同一の場合(属性の型が同じ場合)は、型検査
手段12は、永続オブジェクトI1の属性1へ永続オブ
ジェクトI2を代入し(ステップ305)、その後、処
理を終了する。When the class objects are the same in the above step 304 (when the attribute types are the same), the type checking means 12 substitutes the persistent object I2 for the attribute 1 of the persistent object I1 (step 305), and then the processing is performed. To finish.
【0030】これを具体的に説明する。この例において
は、クラスオブジェクトXはクラスオブジェクトC2′
であり、またクラスオブジェクトC2′=クラスオブジ
ェクトC2の関係がある。従って上記ステップ304に
おいてはクラスオブジェクトが同一であると判断され、
結果として代入操作が実施される。This will be specifically described. In this example, class object X is class object C2 '.
And there is a relationship of class object C2 ′ = class object C2. Therefore, in step 304 above, it is determined that the class objects are the same,
As a result, the substitution operation is performed.
【0031】一方ステップ304においてクラスオブジ
ェクトが異なっている場合は、型検査手段12は、クラ
スオブジェクトXは型を継承しているか否かを判断する
(ステップ306)。On the other hand, if the class objects are different in step 304, the type checking means 12 determines whether or not the class object X inherits the type (step 306).
【0032】このステップ306において、型を継承し
ていると判断した場合は、現在のクラスオブジェクトX
の継承関係に基づいて、このクラスオブジェクトXの親
クラスオブジェクトを得て、この親クラスオブジェクト
を新たなクラスオブジェクトXとし(ステップ30
7)、その後、上記ステップ304に戻る。If it is determined in step 306 that the type is inherited, the current class object X
The parent class object of this class object X is obtained based on the inheritance relationship of the new class object X (step 30).
7) Then, the process returns to step 304.
【0033】一方、ステップ306においてクラスオブ
ジェクトXは何も型を継承していないと判断した場合
は、エラーを発生する(ステップ308)。On the other hand, if it is determined in step 306 that the class object X does not inherit any type, an error occurs (step 308).
【0034】ここで、クラスオブジェクトXが型を継承
しているか否かの判定結果に応じた処理について具体的
に説明する。今、主メモリ220に、図5に示すような
内容が展開されているとする。この図5に示す内容は、
図4に示した内容において、クラスオブジェクトC2′
を削除し、クラスオブジェクトC3′を追加した構成に
なっている。ここでは、クラスオブジェクトC3′=ク
ラスオブジェクトC3とする。Here, the processing according to the judgment result of whether or not the class object X inherits the type will be concretely described. Now, it is assumed that the contents shown in FIG. 5 are expanded in the main memory 220. The contents shown in FIG.
In the content shown in FIG. 4, the class object C2 '
Is deleted and the class object C3 'is added. Here, the class object C3 ′ = class object C3.
【0035】上記同様の処理により、永続オブジェクト
I2の型情報からはクラスオブジェクトXとしてクラス
オブジェクトC3′が得られ、また永続オブジェクトI
1の型情報からはクラスオブジェクトC2が得られる。
このようにして得られた各クラスオブジェクトは明らか
に異なっている。そこで、クラスオブジェクトC3′が
型を継承しているかどうかを調べる。クラスオブジェク
トC3′はクラスオブジェクトC3と同一であるので、
このクラスオブジェクトC3が型を継承しているかどう
かを調べれば良いことになる。By the same processing as above, the class object C3 'is obtained as the class object X from the type information of the persistent object I2, and the persistent object I2 is obtained.
A class object C2 is obtained from the type information of 1.
The class objects thus obtained are obviously different. Then, it is checked whether or not the class object C3 'inherits the type. Since the class object C3 'is the same as the class object C3,
It is only necessary to check whether this class object C3 inherits the type.
【0036】ここで、上述した様にクラスオブジェクト
C3はクラスオブジェクトC2を継承しているので(関
係3)、クラスオブジェクトC3の親クラスオブジェク
トはクラスオブジェクトC2であるということが分か
る。なおクラスオブジェクトC3はクラスオブジェクト
C3′と同一であるので、現在のクラスオブジェクトX
としてのクラスオブジェクトC3′の親クラスオブジェ
クトはクラスオブジェクトC2であるということも分か
る。As described above, since the class object C3 inherits the class object C2 (relationship 3), it can be seen that the parent class object of the class object C3 is the class object C2. Since the class object C3 is the same as the class object C3 ', the current class object X
It can also be seen that the parent class object of the class object C3 'as is the class object C2.
【0037】そこで、新たなクラスオブジェクトXとし
てのクラスオブジェクトC2と、上記ステップ303の
処理で得られたクラスオブジェクトC2とが同一か否か
を判断すれば良い。この場合はクラスオブジェクトが同
一であるので、永続オブジェクトI1の属性1へ永続オ
ブジェクトI2が代入される。Therefore, it is only necessary to judge whether the class object C2 as the new class object X and the class object C2 obtained in the process of step 303 are the same. In this case, since the class objects are the same, the persistent object I2 is assigned to the attribute 1 of the persistent object I1.
【0038】従ってこの例では、永続オブジェクトI2
の型が、クラスオブジェクトC2若しくはクラスオブジ
ェクトC3の型を示していれば、代入は正常に行われ、
それ以外のクラスオブジェクトの場合はエラーとなる。Therefore, in this example, the persistent object I2
If the type of indicates the type of the class object C2 or the class object C3, the assignment is performed normally,
An error will occur for other class objects.
【0039】次に、集合オブジェクトに要素としての永
続オブジェクトを挿入する際の、型検査手段12による
型検査処理について図6乃至図8を参照して説明する。Next, the type checking process by the type checking means 12 when inserting a persistent object as an element into the aggregate object will be described with reference to FIGS. 6 to 8.
【0040】なお図6は型検査手段12の型検査処理動
作を示すフローチャートであり、図7及び図8は型検査
処理の処理過程を示す図である。FIG. 6 is a flow chart showing the mold inspection processing operation of the mold inspection means 12, and FIGS. 7 and 8 are diagrams showing the process steps of the mold inspection processing.
【0041】最初に、集合オブジェクトへの要素の挿入
における型検査でのデータの状態を図7に示す。この図
に示すように、集合オブジェクトS1の要素の型はクラ
スオブジェクトC2で与えられている(関係7)。クラ
スオブジェクトC3がクラスオブジェクトC2を継承し
ていること(関係8)が、クラスオブジェクトC3の
“継承”によって示されている。一方、永続オブジェク
トI2の属性1の型はクラスオブジェクトC2′で与え
られている(関係9)。ここでは、クラスオブジェクト
C2=クラスオブジェクトC2′と定義する。First, FIG. 7 shows the state of data in the type check in inserting an element into an aggregate object. As shown in this figure, the element types of the aggregate object S1 are given by the class object C2 (relation 7). The fact that the class object C3 inherits the class object C2 (relationship 8) is indicated by "inheritance" of the class object C3. On the other hand, the type of attribute 1 of the persistent object I2 is given by the class object C2 '(relationship 9). Here, class object C2 = class object C2 ′ is defined.
【0042】なお、集合オブジェクトS1、永続オブジ
ェクトI2、クラスオブジェクトC2、C3、C2′は
全て外部記憶装置210に格納されており、また上記関
係7、8、9を表現している。すなわち図7に示すデー
タ構造は、外部記憶装置210にデータベースファイル
として保存されている。The aggregate object S1, the persistent object I2, and the class objects C2, C3, and C2 'are all stored in the external storage device 210 and represent the above relationships 7, 8, and 9. That is, the data structure shown in FIG. 7 is stored in the external storage device 210 as a database file.
【0043】また挿入操作においては、上記データベー
スファイルの内容、つまり集合オブジェクトS1、永続
オブジェクトI2、クラスオブジェクトC2、C3、C
2′が、プロセッサ250(ソフトウェア的には管理手
段11)によって外部記憶装置210から主メモリ22
0上にロードされ展開される。この結果、主メモリ22
0上において、集合オブジェクトS1、永続オブジェク
トI2及びクラスオブジェクト並びに上記関係7、8、
9が表現されており、またこれらの関係の確認が可能な
状態である。In the insert operation, the contents of the database file, that is, the aggregate object S1, the persistent object I2, the class objects C2, C3, C
2'from the external storage device 210 to the main memory 22 by the processor 250 (the management means 11 in terms of software).
0 is loaded and expanded. As a result, the main memory 22
0, the aggregate object S1, the persistent object I2 and the class object and the above relations 7, 8,
9 is represented and it is possible to confirm these relationships.
【0044】このような前提の下において、永続オブジ
ェクトI2を集合オブジェクトS1へ挿入操作を実施す
るときに、型検査が行われる。Under such a premise, a type check is performed when performing the insert operation of the persistent object I2 into the aggregate object S1.
【0045】すなわち型検査手段12は、図6に示すよ
うに、永続オブジェクトI2の型情報からクラスオブジ
ェクトXを得る(ステップ401)。この結果として、
クラスオブジェクトXとして属性1の型であるクラスオ
ブジェクトC2′が得られることになる。次に型検査手
段12は、集合オブジェクトS1の型情報からクラスオ
ブジェクトC2を得る(ステップ402)。That is, the type checking means 12 obtains the class object X from the type information of the persistent object I2 as shown in FIG. 6 (step 401). As a result of this,
As the class object X, the class object C2 'which is the type of the attribute 1 is obtained. Next, the type checking means 12 obtains the class object C2 from the type information of the aggregate object S1 (step 402).
【0046】このようにして各クラスオブジェクトを得
た型検査手段12は、クラスオブジェクトXはクラスオ
ブジェクトC2と同じであるか否か(属性の型と要素の
型とが同じか否か)を判断する(ステップ403)。The type checking means 12 that has obtained each class object in this way determines whether the class object X is the same as the class object C2 (whether the attribute type and the element type are the same). (Step 403).
【0047】上記ステップ403においてクラスオブジ
ェクトが同一の場合(属性の型と要素の型とが同じ場
合)は、型検査手段12は、集合オブジェクトS1へ永
続オブジェクトI2を代入し(ステップ404)、その
後、処理を終了する。If the class objects are the same in step 403 (the attribute type and the element type are the same), the type checking means 12 substitutes the persistent object I2 into the aggregate object S1 (step 404), and then , The process ends.
【0048】これを具体的に説明する。この例において
は、クラスオブジェクトXはクラスオブジェクトC2′
であり、またクラスオブジェクトC2′=クラスオブジ
ェクトC2の関係がある。従って上記ステップ403に
おいてはクラスオブジェクトが同一であると判断され、
結果として挿入操作が実施される。This will be specifically described. In this example, class object X is class object C2 '.
And there is a relationship of class object C2 ′ = class object C2. Therefore, in step 403 above, it is determined that the class objects are the same,
As a result, the insert operation is performed.
【0049】一方、ステップ403においてクラスオブ
ジェクトが異なっている場合は、型検査手段12は、ク
ラスオブジェクトXは型を継承しているか否かを判断し
(ステップ405)、この判断の結果、型を継承してい
る場合は、現在のクラスオブジェクトXの継承関係に基
づいて、このクラスオブジェクトXの親クラスオブジェ
クトを得て、この親クラスオブジェクトを新たなクラス
オブジェクトXと再定義し(ステップ406)、その
後、上記ステップ403に戻る。On the other hand, if the class objects are different in step 403, the type checking means 12 determines whether or not the class object X inherits the type (step 405). As a result of this determination, the type is determined. If inherited, the parent class object of this class object X is obtained based on the inheritance relationship of the current class object X, and this parent class object is redefined as a new class object X (step 406). Then, the process returns to step 403.
【0050】一方、ステップ405においてクラスオブ
ジェクトXは何も継承していない場合は、エラーを発生
する(ステップ407)。On the other hand, if the class object X has not inherited anything in step 405, an error occurs (step 407).
【0051】ここで、クラスオブジェクトXが型を継承
しているか否かの判定結果に応じた処理について具体的
に説明する。今、主メモリ220に、図8に示すような
内容が展開されているとする。この図8に示す内容は、
図7に示す内容において、クラスオブジェクトC2′を
削除し、クラスオブジェクトC3′を追加した構成にな
っている。ここでは、永続オブジェクトI2の属性1の
型はクラスオブジェクトC3′であること(関係10)
が示されている。またここでは、クラスオブジェクトC
3′=クラスオブジェクトC3と定義する。Here, the processing according to the judgment result of whether or not the class object X inherits the type will be concretely described. Now, it is assumed that the contents shown in FIG. 8 are expanded in the main memory 220. The contents shown in FIG. 8 are
In the content shown in FIG. 7, the class object C2 'is deleted and the class object C3' is added. Here, the type of the attribute 1 of the persistent object I2 is the class object C3 '(relationship 10).
It is shown. Also here, the class object C
Define 3 ′ = class object C3.
【0052】上記同様の処理により、永続オブジェクト
I2の型情報からはクラスオブジェクトXとしてクラス
オブジェクトC3′が得られ、集合オブジェクトS1の
型情報からはクラスオブジェクトC2が得られる。この
ようにして得られた各クラスオブジェクトは明らかに異
なっている。そこで、クラスオブジェクトC3′が型を
継承しているかどうかを調べる。クラスオブジェクトC
3′はクラスオブジェクトC3と同一であるので、この
クラスオブジェクトC3が型を継承しているかどうかを
調べれば良いことになる。この場合の調査結果は、上述
した永続オブジェクトの代入の処理と同様に、現在のク
ラスオブジェクトXとしてのクラスオブジェクトC3′
の親クラスオブジェクトはクラスオブジェクトC2であ
るということが分かる。By the same processing as above, the class object C3 'is obtained as the class object X from the type information of the persistent object I2, and the class object C2 is obtained from the type information of the aggregate object S1. The class objects thus obtained are obviously different. Then, it is checked whether or not the class object C3 'inherits the type. Class object C
Since 3'is the same as the class object C3, it suffices to check whether this class object C3 inherits the type. The result of the investigation in this case is the class object C3 ′ as the current class object X, as in the above-mentioned permanent object substitution processing.
It can be seen that the parent class object of is the class object C2.
【0053】そこで、新たなクラスオブジェクトXとし
てのクラスオブジェクトC2と、上記ステップ402の
処理で得られたクラスオブジェクトC2とが同一か否か
を判断すれば良い。この場合は、クラスオブジェクトが
同一であると判断され、集合オブジェクトS1へ永続オ
ブジェクトI2が挿入される。Therefore, it is only necessary to determine whether the class object C2 as the new class object X and the class object C2 obtained in the process of step 402 are the same. In this case, it is determined that the class objects are the same, and the persistent object I2 is inserted into the aggregate object S1.
【0054】従ってこの例では、永続オブジェクトI2
の属性の型が、クラスオブジェクトC2若しくはクラス
オブジェクトC3の属性の型を示していれば、挿入は正
常に行われ、それ以外のクラスオブジェクトの場合はエ
ラーとなる。Therefore, in this example, the persistent object I2
If the attribute type of indicates the attribute type of the class object C2 or the class object C3, the insertion is normally performed, and an error occurs in the case of other class objects.
【0055】以上説明したように本実施例によれば、第
1の永続オブジェクトを第2の永続オブジェクトの属性
に代入する際に、型検査手段による型検査によって、第
1の永続オブジェクトの属性の型を表しているクラスオ
ブジェクトと、第2の永続オブジェクトの属性の型を表
しているクラスオブジェクト又はこのクラスオブジェク
トの属性の型を継承しているクラスオブジェクトとが、
同じ型を表していると判定されたときに、型検査手段に
よって、第1の永続オブジェクトを第2の永続オブジェ
クトの属性に代入する操作が実施されるので、オブジェ
クトの代入の実行時に、継承関係を考慮した動的な型検
査を行うことができる。As described above, according to the present embodiment, when the first persistent object is assigned to the attribute of the second persistent object, the attribute of the first persistent object is checked by the type checking by the type checking means. A class object representing the type and a class object representing the attribute type of the second persistent object or a class object inheriting the attribute type of this class object,
When it is determined that they represent the same type, the type checking means performs the operation of assigning the first persistent object to the attribute of the second persistent object. It is possible to perform dynamic type checking in consideration of.
【0056】また本実施例によれば、永続オブジェクト
を集合オブジェクトへ挿入する際に、型検査手段による
型検査によって、永続オブジェクトの属性の型を表して
いるクラスオブジェクトと、集合オブジェクトの要素の
型を表しているクラスオブジェクト又はこのクラスオブ
ジェクトの要素の型を継承しているクラスオブジェクト
とが、同じ型を表しているときに、型検査手段によっ
て、永続オブジェクトを集合オブジェクトに挿入する操
作が実施されるので、集合オブジェクトへの要素の挿入
時に、継承関係を考慮した動的な型検査を行うことがで
きる。Further, according to this embodiment, when a persistent object is inserted into an aggregate object, a class object that represents the attribute type of the persistent object and the type of the elements of the aggregate object are checked by the type checking by the type checking means. When a class object that represents a class object or a class object that inherits the type of an element of this class object represents the same type, the type checking means performs an operation of inserting a persistent object into an aggregate object. Therefore, when inserting an element into a set object, it is possible to perform dynamic type checking considering inheritance relations.
【0057】[0057]
【発明の効果】以上説明した様に第1の発明によれば、
型検査手段によって、第1のオブジェクトを、第2のオ
ブジェクトに関係付けする際に、第1のオブジェクトに
対応するクラスオブジェクトと、第2のオブジェクトに
対応するクラスオブジェクト又は第2のオブジェクトに
対応するクラスオブジェクトの属性の型を継承している
クラスオブジェクトとに基づいて型検査を行うようにし
たので、第1及び第2のオブジェクトに対応するクラス
オブジェクトに定義されている属性の型を調査すること
により、各属性の型が一致しているか否かを判定するこ
とができることとなり、よって、オブジェクトの代入の
実行時に、継承関係を考慮した動的な型検査を行うこと
ができるという利点がある。As described above, according to the first invention,
When associating the first object with the second object by the type checking means, the class object corresponds to the class object corresponding to the first object and the class object corresponding to the second object or the second object. Since the type check is performed based on the class object that inherits the attribute type of the class object, it is necessary to check the attribute type defined in the class object corresponding to the first and second objects. As a result, it is possible to determine whether the types of the attributes match, and therefore, there is an advantage that a dynamic type check can be performed in consideration of the inheritance relationship when executing the assignment of the object.
【0058】また第2の発明によれば、型検査手段によ
って、特定のオブジェクトを集合オブジェクトに関係付
けする際に、特定のオブジェクトに対応するクラスオブ
ジェクトと、集合オブジェクトに対応するクラスオブジ
ェクト又は集合オブジェクトに対応するクラスオブジェ
クトの要素の型を継承しているクラスオブジェクトとに
基づいて型検査を行うようにしているので、特定のオブ
ジェクトに定義されている属性の型及び集合オブジェク
トに定義されている要素の型を調査することにより、各
型が一致しているか否かを判定することができることと
なり、よって、集合オブジェクトへの要素の挿入時に、
継承関係を考慮した動的な型検査を行うことができると
いう利点がある。According to the second invention, when the type checking means associates a specific object with the aggregate object, the class object corresponding to the specific object and the class object or the aggregate object corresponding to the aggregate object. Since the type check is performed based on the class object that inherits the type of the element of the class object corresponding to, the type of the attribute defined in the specific object and the element defined in the aggregate object By examining the types of, it is possible to determine whether or not the types match, so when inserting the element into the aggregate object,
This has the advantage that dynamic type checking can be performed in consideration of inheritance relationships.
【0059】このように継承関係を考慮した動的な型検
査を行うことができるので、誤ったデータの代入や挿入
を防止することができるという効果を奏する。As described above, since the dynamic type check can be performed in consideration of the inheritance relationship, it is possible to prevent erroneous data substitution or insertion.
【図1】本発明に係るオブジェクト指向データベース管
理システムの一実施例を示す機能ブロック図。FIG. 1 is a functional block diagram showing an embodiment of an object-oriented database management system according to the present invention.
【図2】図1に示した実施例のシステムを実現するため
の装置のハードウェア構成を示すブロック図。FIG. 2 is a block diagram showing a hardware configuration of a device for realizing the system of the embodiment shown in FIG.
【図3】本実施例の型検査手段による代入操作の際の型
検査処理動作を示すフローチャート。FIG. 3 is a flowchart showing a type checking processing operation at the time of a substitution operation by the type checking means of the present embodiment.
【図4】代入操作の際に実行される型検査処理の処理過
程を説明する図。FIG. 4 is a diagram illustrating a processing process of a type checking process executed at the time of a substitution operation.
【図5】代入操作の際に実行される型検査処理の処理過
程を説明する図。FIG. 5 is a diagram illustrating a processing process of a type checking process executed at the time of a substitution operation.
【図6】本実施例の型検査手段による挿入操作の際の型
検査処理動作を示すフローチャート。FIG. 6 is a flowchart showing a mold inspection processing operation at the time of an insertion operation by the mold inspection means of the present embodiment.
【図7】挿入操作の際に実行される型検査処理の処理過
程を説明する図。FIG. 7 is a diagram illustrating a processing process of a type checking process executed at the time of an insert operation.
【図8】挿入操作の際に実行される型検査処理の処理過
程を説明する図。FIG. 8 is a diagram illustrating a processing process of a type checking process executed at the time of an insert operation.
10…オブジェクト指向データベース管理システム、1
1…管理手段、12…型検査手段、20…データベース
ファイル、30…主メモリ。10 ... Object-oriented database management system, 1
1 ... Management means, 12 ... Type checking means, 20 ... Database file, 30 ... Main memory.
Claims (2)
トにそれぞれ対応し、かつ当該オブジェクトの属性の型
を含む型情報を保持すると共に当該型の継承関係に関す
る情報も保持可能なクラスオブジェクトとを管理する管
理手段と、 前記複数のオブジェクトの内、第1のオブジェクトを第
2のオブジェクトに関係付けする際に、当該各オブジェ
クトにそれぞれ対応するクラスオブジェクトに基づいて
型検査を行う型検査手段とを具えたことを特徴とするオ
ブジェクト指向データベース管理システム。1. Managing a plurality of objects and a class object that corresponds to each of the objects and holds type information including a type of an attribute of the object and can also hold information regarding inheritance relation of the type. Management means and type checking means for performing a type check based on a class object corresponding to each of the first objects when associating the first object with the second object among the plurality of objects. An object-oriented database management system characterized by the following.
にそれぞれ対応し、かつ当該オブジェクトの属性の型を
含む型情報を保持すると共に当該型の継承関係に関する
情報も保持可能なクラスオブジェクトと、オブジェクト
の集合を表す集合オブジェクトと、該集合オブジェクト
に対応し、かつ当該オブジェクトの要素の型を含む型情
報を保持すると共に当該型の継承関係に関する情報も保
持可能なクラスオブジェクトとを管理する管理手段と、 前記集合オブジェクトに、前記複数のオブジェクト中の
特定のオブジェクトを関係付けする際に、当該特定のオ
ブジェクトに対応するクラスオブジェクトと、前記集合
オブジェクトに対応するクラスオブジェクトとに基づい
て型検査を行う型検査手段とを具えたことを特徴とする
オブジェクト指向データベース管理システム。2. A plurality of objects, a class object corresponding to each of the objects, capable of holding type information including a type of an attribute of the object, and also capable of holding information about inheritance relation of the type, Management means for managing a set object representing a set and a class object corresponding to the set object, which holds type information including the types of the elements of the object and can also hold information on inheritance relation of the type; A type check that performs a type check based on a class object corresponding to the specific object and a class object corresponding to the aggregate object when associating the specific object among the plurality of objects with the collective object Object-oriented characterized by including means and Database management system.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4304126A JPH06149646A (en) | 1992-11-13 | 1992-11-13 | Object directional data base management system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4304126A JPH06149646A (en) | 1992-11-13 | 1992-11-13 | Object directional data base management system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH06149646A true JPH06149646A (en) | 1994-05-31 |
Family
ID=17929354
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4304126A Pending JPH06149646A (en) | 1992-11-13 | 1992-11-13 | Object directional data base management system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH06149646A (en) |
-
1992
- 1992-11-13 JP JP4304126A patent/JPH06149646A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5717950A (en) | Input/output device information management system for multi-computer system | |
| JPH047640A (en) | Class inheritance resolution processing method | |
| US7251808B2 (en) | Graphical debugger with loadmap display manager and custom record display manager displaying user selected customized records from bound program objects | |
| JP2005293578A (en) | Test case inheritance controlled via attribute | |
| US8615729B2 (en) | Extending existing model-to-model transformations | |
| CN112860312A (en) | Method and device for detecting item dependency relationship change | |
| US11144840B2 (en) | Completing decision logic to avoid a side effect | |
| CN117931374A (en) | Application processing method, device, equipment and storage medium based on container isolation | |
| US7567257B2 (en) | Partition-based undo of partitioned object graph | |
| CN113778771B (en) | Method, system and storage medium for terminal testing | |
| CN111752841A (en) | Single test simulation method, apparatus, device and computer readable storage medium | |
| CN118193382B (en) | Application testing methods, apparatus, devices, storage media, and program products | |
| CN113590225A (en) | Map detection method and device, electronic equipment and storage medium | |
| US9026985B2 (en) | Dynamically configurable model-to-model transformation engine | |
| CN118134410A (en) | Flexible workflow management method based on ESR meta-model | |
| WO2021005130A1 (en) | A streaming compiler for automatic adjoint differentiation | |
| CN117971643A (en) | Automatic source code testing method and device, storage medium and computer equipment | |
| US6311227B1 (en) | Procedure calling method | |
| JPH03184123A (en) | Procedure state description element system for digital data processor | |
| CN115757172A (en) | Test execution method and device, storage medium and computer equipment | |
| US6782523B2 (en) | Parallel configurable IP design methodology | |
| JP2841363B2 (en) | External module acquisition method | |
| CN116302202A (en) | A method for starting an interface program, a device for starting an interface program, and a cockpit | |
| CN119512511A (en) | A method, device, computer equipment and computer readable storage medium for automatically generating task call code | |
| CN121166108A (en) | Project construction preview method and device, storage medium and electronic equipment |