JPH05265835A - System for view-defining/referring in object base system - Google Patents
System for view-defining/referring in object base systemInfo
- Publication number
- JPH05265835A JPH05265835A JP4058556A JP5855692A JPH05265835A JP H05265835 A JPH05265835 A JP H05265835A JP 4058556 A JP4058556 A JP 4058556A JP 5855692 A JP5855692 A JP 5855692A JP H05265835 A JPH05265835 A JP H05265835A
- Authority
- JP
- Japan
- Prior art keywords
- view
- program
- class
- definition
- instance
- 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 claims abstract description 11
- 238000007430 reference method Methods 0.000 claims description 7
- 238000000034 method Methods 0.000 abstract description 21
- 230000014616 translation Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 4
- 238000013519 translation Methods 0.000 description 3
- 230000000694 effects 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 a view definition / reference method by which a user can virtually define / reference an object already existing in a computer system with an object of another structure.
【0002】[0002]
【従来の技術】従来のオブジェクトを指向するプログラ
ミング・システムおよびデータベース・システムや関係
データベース・システムでは、データの構造情報(例え
ば、変数名,変数の型,大きさ等)を定義したとき、そ
の定義情報はクラス・オブジェクト(データ・ディクシ
ョナリとも呼ぶ)に格納される。実際のオブジェクト
(すなわち、実データ)を作るときは、適切なクラス・
オブジェクトを指定して、生成演算子により領域が確保
される。すなわち、そのオブジェクト(インスタンス、
またはレコードとも呼ぶ)には、いくつかのインスタン
ス変数と呼ぶ(フィールドまたは属性とも呼ぶ)領域が
存在する。さらに、クラスにはそのクラスに属するオブ
ジェクトを操作するための手続き(メソッドとも呼ぶ)
が存在している。オブジェクトやクラス・オブジェクト
は自分自身を一意に識別するオブジェクト番号(また
は、キー,アドレス)を持っている。この番号は、シス
テムが割り付ける。2. Description of the Related Art In a conventional object-oriented programming system, database system, or relational database system, when data structure information (for example, variable name, variable type, size, etc.) is defined, its definition is defined. Information is stored in class objects (also called data dictionaries). When creating the actual object (ie the actual data), use the appropriate class
The area is secured by the creation operator by specifying the object. That is, the object (instance,
In some cases, some areas are also called instance variables (also called fields or attributes). In addition, a procedure (also called a method) for operating an object that belongs to the class
Exists. Objects and class objects have object numbers (or keys, addresses) that uniquely identify themselves. This number is assigned by the system.
【0003】このようなオブジェクトを指向するシステ
ムでは、すでに存在する(定義されている)クラスを少
しだけ異なる構造のクラスとして見たい場合、例えば、
すでに定義されているクラスのインスタンス変数の一部
だけを参照できるようにしたり、いくつかのクラスを結
合してあたかも1つのクラスとして参照できるようにし
たい場合、そのためのクラスを新しく作り、そのための
オブジェクトを新たに生成する(または、関連付ける)
必要がある。例えば、従業員に関する構造を定義する従
業員クラスと、そのオブジェクト(従業員データ)がす
でに存在しているとする。もし一般の利用者向けに、
「従業員」クラスの給与に関連する変数を削ったクラス
を提供したい場合、「一般向け従業員」クラスとそのた
めのオブジェクトを生成し(または、関連付け)なくて
はならない。このような仮想的なクラスをビュークラス
と呼ぶ。In such an object-oriented system, when it is desired to see an already existing (defined) class as a class having a slightly different structure, for example,
If you want to be able to refer to only some of the instance variables of a class that has already been defined, or to combine several classes so that they can be referred to as one class, create a new class for that and create an object for that A new (or associate)
There is a need. For example, assume that an employee class that defines the structure for employees and its object (employee data) already exist. If you are a general user,
If you want to provide a class with the variables related to salaries in the "employee" class, you must create (or associate) an "employee for public" class and an object for it. Such a virtual class is called a view class.
【0004】ビュークラスは、文献[kimura9
1]kimura,Y. and K.Tsuruok
a“A View Class Mechanism
forObject−Oriented Databa
se Systems, “Proc. Intl.
Symp. on Database Systems
for Advanced Application
s (DASFAA’91) Apr 1991.で論
じられているように、ビューを構成するクラスと、参照
可能なインスタンス変数とメソッドと、付加メソッド
と、オブジェクトの生成条件とを保持する。あるオブジ
ェクトを参照するとき、まずそのオブジェクトがビュー
クラスに属しているかどうかを検索する。もしビューク
ラスに属している場合、要求されている参照が、ビュー
クラスに登録されている参照可能変数/メソッドに含ま
れているかどうかを検査する。もし参照可能でなけれ
ば、エラーを返す。このように、ビューを提供するとオ
ブジェクトの参照時に、ビュークラスに属しているかど
うかの検査とインスタンス変数/メソッドの参照可能検
査をしなくてはならない。The view class is described in the document [kimura9
1] kimura, Y .; and K. Tsuruok
a "A View Class Mechanism
forObject-Oriented Databa
se Systems, "Proc. Intl.
Symp. on Database Systems
for Advanced Application
s (DASFAA '91) Apr 1991. Holds the classes that make up the view, the referenceable instance variables and methods, the additional methods, and the object creation conditions, as discussed in. When referencing an object, first find out if it belongs to the view class. If it belongs to the view class, check whether the requested reference is contained in the referenceable variable / method registered in the view class. If it cannot be referenced, an error is returned. In this way, when the view is provided, it is necessary to check whether the object belongs to the view class and check the reference of the instance variable / method when referencing the object.
【0005】[0005]
【発明が解決しようとする課題】上記で述べた従来のビ
ューの定義・参照方式では、プログラムの実行中にオブ
ジェクトの参照があると、常に、ビュークラスに属して
いるかどうかの検査、およびインスタンス変数/メソッ
ドの参照可能性の検査を伴うため、プログラムの実行速
度を著しく低下させるという欠点があった。In the conventional view definition / reference method described above, whenever an object is referenced during the execution of a program, it is always checked whether it belongs to a view class and an instance variable. There is a drawback in that the execution speed of the program is significantly reduced because it involves the checking of the referenceability of the method.
【0006】本発明の目的は、プログラムの実行中の検
査をなくし、必要な検査はすべてビューの定義時にのみ
1回だけ行うことによって、上記の欠点を改善したオブ
ジェクトベース・システムにおけるビューの定義・参照
方式を提供することにある。It is an object of the present invention to eliminate view checking during the execution of a program and to perform all necessary checks only once when defining a view, thus defining a view definition in an object-based system which improves the above drawbacks. To provide a reference method.
【0007】[0007]
【課題を解決するための手段】本発明のオブジェクトベ
ース・システムにおけるビュー定義・参照方式は、ビュ
ー定義を翻訳するに際し、ビュー定義が正しいかどうか
解析・検査する手段と、 前記検査時にデータベース管
理部への問い合わせができる手段と、前記問い合わせに
対しOKの通知を受け取った時、前記ビュー定義に対応
するビュー・クラスを生成する手段と、ビューのインス
タンスを実行形式プログラムから通常のオブジェクトと
同様に参照できる手段とを含むことを特徴とする。A view definition / reference method in an object-based system according to the present invention comprises means for analyzing / inspecting whether a view definition is correct when translating the view definition, and a database management unit at the time of the inspection. To the view instance, a means to generate a view class corresponding to the view definition when an OK notification is received in response to the inquiry, and a view instance from the executable program in the same manner as a normal object It is characterized by including the means that can.
【0008】[0008]
【実施例】以下、本発明について図面を参照して説明す
る。DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the drawings.
【0009】図1は本発明の一実施例を示すブロック図
である。図1においてオブジェクトのグループ化方式
は、プログラム翻訳部101と、ビュー定義解析部10
2と、ビュー定義検査部103と、ビュークラス生成部
104と、データベース管理部105と、データベース
106と、実行形式プログラム107と、ビューインス
タンス生成部108とで構成される。FIG. 1 is a block diagram showing an embodiment of the present invention. In FIG. 1, the object grouping method is the program translation unit 101 and the view definition analysis unit 10.
2, a view definition inspection unit 103, a view class generation unit 104, a database management unit 105, a database 106, an executable program 107, and a view instance generation unit 108.
【0010】プログラム翻訳部101は、ソースプログ
ラムを翻訳するとき、ビュー定義解析部102,ビュー
定義検査部103,ビュークラス生成部に接続して、ビ
ュー定義文を処理する。この処理の過程で、ビュー定義
が正しく行われているかどうかを調べるために、データ
ベース管理部105へ接続する。データベース管理部1
05は、データベース106の読み書きを制御する。プ
ログラム翻訳部101は、最終的に実行形式プログラム
107を出力する。この実行形式プログラム107を実
行したとき、ビューインスタンスの生成手続きがある
と、ビューインスタンス生成部108に接続し、データ
ベース管理部105に対して生成要求を出す。また、実
行形式プログラムでオブジェクトの参照があると、デー
タベース管理部105に接続してデータベース106か
らオブジェクトを読み書きする。When translating the source program, the program translation unit 101 is connected to the view definition analysis unit 102, the view definition inspection unit 103, and the view class generation unit to process the view definition statement. In the process of this processing, the database management unit 105 is connected to check whether or not the view definition is correctly performed. Database management unit 1
Reference numeral 05 controls reading and writing of the database 106. The program translation unit 101 finally outputs the executable program 107. When this execution form program 107 is executed, if there is a view instance generation procedure, the view instance generation unit 108 is connected and a generation request is issued to the database management unit 105. When an object is referenced in the executable program, the database management unit 105 is connected to read or write the object from the database 106.
【0011】図2は利用者がグループ化要求を出したと
きのグループ化動作を説明するフローチャート、図3は
本発明で使用するためのデータの構造図である。以下、
図1,図3を参照しながら図2のフローチャートに従っ
て説明する。FIG. 2 is a flow chart for explaining the grouping operation when the user issues a grouping request, and FIG. 3 is a data structure diagram for use in the present invention. Less than,
A description will be given according to the flowchart of FIG. 2 with reference to FIGS.
【0012】まず、ビュー定義・参照するソースプログ
ラム100をプログラム翻訳部101に、翻訳要求を出
す。この要求を受け取ったプログラム翻訳部101は、
ソースプログラム100が空でないか調べ(ステップ2
00)、空でなければ文を読む(ステップ201)。こ
の文がビュー定義以外の文のとき、文を翻訳し実行形式
のコードを出力する(ステップ213)。もしこの文が
ビュー定義文のとき(ステップ202)、ビュー定義解
析部102へ解析要求を出す(ステップ203)。ビュ
ー定義解析部102では、ビュー定義の構文が正しく定
義されているとき(ステップ204)、ビュー定義文か
ら、ビューが参照する、または参照を制限する参照クラ
ス,参照インスタンス変数、参照メソッド,付加メソッ
ド,ビュー・インスタンス生成メソッドを抽出し、図3
の参照可能情報テーブル300に登録する(ステップ2
05)。もし定義に誤りがあれば、制御をプログラム翻
訳部101へ返す。次に、ビュー定義解析部102はこ
の定義情報が正しいかどうかを検査するために、ビュー
定義検査部103へ検査要求を出す(ステップ20
6)。このとき、参照可能情報テーブル300の情報も
渡す。ビュー定義検査部103では、参照可能情報テー
ブル300中に格納されている情報(参照クラス,参照
インスタンス変数,参照メソッド,付加メソッド,ビュ
ーインスタンス生成メソッド)が、データベース106
にすでに登録されているものと同じかどうかを調べる
(ステップ207)。このため、データベース管理部1
05へ各情報とともに問い合わせを行う。もし何れかの
情報でもデータベース106の情報と一致しなければ、
データベース管理部105はビュー定義検査部103へ
エラーであることを通知し、これを受け取ったビュー定
義検査部103はさらに、プログラム翻訳部101へエ
ラーを通知する(ステップ208)。First, a translation request is issued to the program translation unit 101 for the source program 100 for view definition / reference. Upon receiving this request, the program translation unit 101
Check if the source program 100 is empty (Step 2
00), if not empty, read the sentence (step 201). When this sentence is a sentence other than the view definition, the sentence is translated and an executable code is output (step 213). If this statement is a view definition statement (step 202), an analysis request is issued to the view definition analysis section 102 (step 203). In the view definition analysis unit 102, when the syntax of the view definition is defined correctly (step 204), the reference class, reference instance variable, reference method, additional method that the view refers to or limits the reference from the view definition statement. , Extract the view instance generation method,
Is registered in the referable information table 300 (step 2)
05). If the definition is incorrect, control is returned to the program translation unit 101. Next, the view definition analysis unit 102 issues an inspection request to the view definition inspection unit 103 in order to inspect whether this definition information is correct (step 20).
6). At this time, the information of the referable information table 300 is also passed. In the view definition inspection unit 103, information (reference class, reference instance variable, reference method, additional method, view instance generation method) stored in the referenceable information table 300 is stored in the database 106.
It is checked whether it is the same as that already registered in (step 207). Therefore, the database management unit 1
Inquire to 05 together with each information. If any of the information does not match the information in the database 106,
The database management unit 105 notifies the view definition inspecting unit 103 that there is an error, and the view definition inspecting unit 103 having received the notification further notifies the program translating unit 101 of the error (step 208).
【0013】もしビュー定義検査部103がデータベー
ス管理部105からOKの通知を受け取ったならば、ビ
ュークラスを生成するために、制御をビュークラス生成
部104へ生成要求を出す(ステップ209)。ビュー
クラス生成部104は、ビュークラスを生成し、参照可
能情報テーブル300の情報をビュークラス内に設定し
(ステップ210)、このクラスをデータベース106
に格納するようデータベース管理部105へ依頼する
(ステップ211)。データベース106の格納が成功
すると、制御をプログラム翻訳部101へ戻す(ステッ
プ212)。プログラム翻訳部101はすべての翻訳が
終了すると、全プログラムの実行形式プログラム107
が出力されたことになる。If the view definition inspecting unit 103 receives an OK notification from the database managing unit 105, it issues a control request to the view class generating unit 104 to generate a view class (step 209). The view class generation unit 104 generates a view class, sets the information of the referenceable information table 300 in the view class (step 210), and stores this class in the database 106.
To the database management unit 105 (step 211). When the database 106 is successfully stored, the control is returned to the program translation unit 101 (step 212). When all the translations are completed, the program translation unit 101 executes the executable programs 107 for all the programs.
Is output.
【0014】利用者がこの実行形式プログラム107を
起動し、もしこのプログラム中にビューインスタンスの
生成要求があるならば、ビューインスタンス生成部10
8を呼び出す。ビューインスタンス生成部108は、指
定されたビュークラスのビュー生成手続きを実行するよ
うにデータベース管理部105へ要求する。この実行の
結果、ビュークラスとそのインスタンスが関連付けられ
る。If the user activates this executable program 107 and there is a view instance generation request in this program, the view instance generation unit 10
Call 8. The view instance generation unit 108 requests the database management unit 105 to execute the view generation procedure of the specified view class. As a result of this execution, the view class and its instance are associated.
【0015】プログラムの実行中に、オブジェクトの参
照があった場合、実行形式プログラム107はデータベ
ース管理部105へオブジェクトの参照を要求する。こ
のとき、そのオブジェクトがビューに属するかどうかの
検査を行わない。何故ならこの実行形式プログラム10
7の参照動作は、プログラム翻訳部101でソースプロ
グラム100の翻訳過程で正しさが保証されているから
である。When an object is referenced during execution of the program, the executable program 107 requests the database management unit 105 to reference the object. At this time, it is not checked whether the object belongs to the view. Because this executable program 10
This is because the correctness of the reference operation 7 is guaranteed in the translation process of the source program 100 by the program translation unit 101.
【0016】[0016]
【発明の効果】以上説明したように本発明は、プログラ
ム実行中にオブジェクトを参照する際に、そのオブジェ
クトがビュークラスに属しているかどうかの検査、およ
びインスタンス変数/メソッドが参照可能であるかどう
かの検査をなくし、必要な検査はすべてビューの定義時
にのみ1回だけ行うことによって、ビューを定義・参照
するようなソフトウェアを高速に実行できるという効果
がある。As described above, according to the present invention, when an object is referenced during program execution, it is checked whether the object belongs to a view class and whether the instance variable / method can be referenced. There is an effect that software for defining and referencing a view can be executed at a high speed by eliminating the check of 1. and performing all necessary checks only once when defining a view.
【図1】本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.
【図2】利用者がグループ化要求を出したときのグルー
プ化動作を説明するフローチャートである。FIG. 2 is a flowchart illustrating a grouping operation when a user issues a grouping request.
【図3】本発明で使用するためのデータ構造図である。FIG. 3 is a data structure diagram for use in the present invention.
【符号の説明】 100 ソースプログラム 101 プログラム翻訳部 102 ビュー定義解析部 103 ビュー定義検査部 104 ビュークラス生成部 105 データベース管理部 106 データベース 107 実行形式プログラム 108 ビューインスタンス生成部[Description of Reference Signs] 100 source program 101 program translation unit 102 view definition analysis unit 103 view definition inspection unit 104 view class generation unit 105 database management unit 106 database 107 execution format program 108 view instance generation unit
Claims (1)
が正しいかどうか解析・検査する手段と、 前記検査時にデータベース管理部への問い合わせができ
る手段と、 前記問い合わせに対しOKの通知を受け取った時、前記
ビュー定義に対応するビュー・クラスを生成する手段
と、 ビューのインスタンスを実行形式プログラムから通常の
オブジェクトと同様に参照できる手段とを有することを
特徴とする、オブジェクトベース・システムにおけるビ
ュー定義・参照方式。1. When translating a view definition, means for analyzing / inspecting whether the view definition is correct, means for making an inquiry to a database management unit at the time of the inspection, and receiving an OK notification for the inquiry. , A view definition in an object-based system, comprising means for generating a view class corresponding to the view definition, and means for referring to an instance of the view from an executable program in the same manner as a normal object. Reference method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4058556A JPH05265835A (en) | 1992-03-17 | 1992-03-17 | System for view-defining/referring in object base system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4058556A JPH05265835A (en) | 1992-03-17 | 1992-03-17 | System for view-defining/referring in object base system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH05265835A true JPH05265835A (en) | 1993-10-15 |
Family
ID=13087732
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP4058556A Pending JPH05265835A (en) | 1992-03-17 | 1992-03-17 | System for view-defining/referring in object base system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH05265835A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07319700A (en) * | 1994-05-27 | 1995-12-08 | Nec Corp | View management system |
-
1992
- 1992-03-17 JP JP4058556A patent/JPH05265835A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07319700A (en) * | 1994-05-27 | 1995-12-08 | Nec Corp | View management system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5898872A (en) | Software reconfiguration engine | |
US11526656B2 (en) | Logical, recursive definition of data transformations | |
US7047249B1 (en) | Method and apparatus for executing stored code objects in a database | |
US5758160A (en) | Method and apparatus for building a software program using dependencies derived from software component interfaces | |
US8429126B2 (en) | Object graph editing context and methods of use | |
US7254810B2 (en) | Apparatus and method for using database knowledge to optimize a computer program | |
US7328428B2 (en) | System and method for generating data validation rules | |
CN110347598B (en) | Test script generation method and device, server and storage medium | |
US20040158820A1 (en) | System for generating an application framework and components | |
US20100125828A1 (en) | Data transformation based on a technical design document | |
US8346773B2 (en) | Product classification system | |
US20080313208A1 (en) | Apparatus, system, and method for automated context-sensitive message organization | |
US4979109A (en) | Method of controlling a data dictionary directory system in a data base system | |
US20060122973A1 (en) | Mechanism for defining queries in terms of data objects | |
CN109614315A (en) | A kind of automatic generation method and system of data synchronism detection use-case | |
US7509248B2 (en) | Generic persistence engine | |
US20240370452A1 (en) | Architecture for data map converters | |
US20050262124A1 (en) | Method and apparatus for aggregated update of dataset records in a JavaScript environment | |
JPH05265835A (en) | System for view-defining/referring in object base system | |
CN113626423B (en) | Log management method, device and system of business database | |
CN117390055B (en) | JOOQ continuous list sentence generation method, device and medium | |
KR100656559B1 (en) | Program Automatic Development Device Using GIID Methodology | |
JP2942414B2 (en) | Virtual database method | |
Contractor | Improving the Flexibility of CLARA's Automated Matching and Repair Processes | |
CN118760680A (en) | Data comparison method and device |