Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP2923917B2 - Data access method for large-scale knowledge database system - Google Patents
[go: Go Back, main page]

JP2923917B2 - Data access method for large-scale knowledge database system - Google Patents

Data access method for large-scale knowledge database system

Info

Publication number
JP2923917B2
JP2923917B2 JP1184713A JP18471389A JP2923917B2 JP 2923917 B2 JP2923917 B2 JP 2923917B2 JP 1184713 A JP1184713 A JP 1184713A JP 18471389 A JP18471389 A JP 18471389A JP 2923917 B2 JP2923917 B2 JP 2923917B2
Authority
JP
Japan
Prior art keywords
data
offset
external storage
attribute
stored
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.)
Expired - Fee Related
Application number
JP1184713A
Other languages
Japanese (ja)
Other versions
JPH0350646A (en
Inventor
文雄 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1184713A priority Critical patent/JP2923917B2/en
Publication of JPH0350646A publication Critical patent/JPH0350646A/en
Application granted granted Critical
Publication of JP2923917B2 publication Critical patent/JP2923917B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【発明の詳細な説明】 〔概要〕 主記憶上のデータとファイル上のデータとのデータ変
換を効率的に実行することのできるデータアクセス方式
に関し、 主記憶上のデータとファイル上でのデータをほぼ同じ
形式として両者の間の変換効率を高めることを目的と
し、 電子計算機および外部記憶手段から成り、オブジェク
ト指向言語を用いて大規模なデータを取扱う知識データ
ベースシステムにおいて、主記憶および外部記憶手段上
の全てのオブジェクトを管理するオブジェクト管理手段
と、前記外部記憶手段上に格納されているオブジェクト
を関係データベースの形式で管理するデータ管理手段
と、主記憶上で絶対アドレスとポインタとによって指示
されるデータと、前記外部記憶手段上でオフセットを用
いて入れる構造で連続領域に格納されるデータとを、前
記オブジェクト管理手段とデータ管理手段との間で相互
に変換するデータ変換手段を有するように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] The present invention relates to a data access method capable of efficiently executing data conversion between data on a main storage and data on a file. In a knowledge database system that consists of a computer and external storage means and handles large-scale data using an object-oriented language, with the aim of increasing the conversion efficiency between the two in almost the same format, the main storage and the external storage means Object management means for managing all objects, data management means for managing objects stored in the external storage means in the form of a relational database, and data indicated by an absolute address and a pointer on a main storage. Stored in a continuous area in a structure to be inserted using an offset on the external storage means. And data conversion means for mutually converting the data between the object management means and the data management means.

〔産業上の利用分野〕[Industrial applications]

本発明は大規模なデータを取扱う知識ベースシステム
に係り、さらに詳しくは、主記憶上のデータとフィルム
上のデータとのデータ変換を効率的に実行することので
きるデータアクセス方式に関する。
The present invention relates to a knowledge base system for handling large-scale data, and more particularly, to a data access method capable of efficiently executing data conversion between data on a main memory and data on a film.

〔従来の技術〕[Conventional technology]

電子計算機の技術進歩、普及に伴い、ソフトウエア生
産量も加速度的に増加してきている。ソフトウエアの開
発人口が不足しているために、ソフトウエア生産は需要
に追いつかないのが現状であり、生産性の向上が切実に
要求されている。
With the technological progress and spread of electronic computers, the amount of software production has been increasing at an accelerating rate. Due to the lack of a software development population, software production cannot keep up with demand, and there is an urgent need to improve productivity.

そのための一解決策としてオブジェクト指向言語の利
用が進みつつある。オブジェクト指向言語は、COBOLやF
ORTRAN、BASICといった従来の構造的プログラミング言
語よりもプログラムを自然に記述できるという特徴があ
り、また、プロトタイピングやソフウエアの再利用にも
向いているからである。
The use of object-oriented languages is being advanced as a solution for that. Object-oriented languages are COBOL and F
It has the feature that programs can be described more naturally than conventional structured programming languages such as ORTRAN and BASIC, and is also suitable for prototyping and software reuse.

オブジェクト指向言語によるプログラミングの基本単
位はオブジェクトであり、オブジェクトはデータと、そ
のデータに対する手続きを構成要素とする。オブジェク
トにメッセージを送ることによって、オブジェクト自ら
がそのメッセージに該当する手続を実行し、ユーザ所望
の処理の実現が可能になる。オブジェクトにはクラスと
インスタンスがあり、インスタンスが具体的な値やデー
タであるのに対して、クラスはよく似た性質を持つオブ
ジェクトの集合である。また、クラス間に上位下位関係
を定義することも可能である。
The basic unit of programming in an object-oriented language is an object, and the object is composed of data and a procedure for the data. By sending a message to an object, the object itself executes a procedure corresponding to the message, thereby realizing a process desired by the user. An object has a class and an instance. An instance is a specific value or data, whereas a class is a set of objects having similar properties. It is also possible to define an upper / lower relationship between classes.

第12図はクラスの説明図である。医者というクラスが
あり、その下位のクラスとして歯科医、内科医、外科医
等の各科の医者のクラスが定義できる。また各科の医者
のクラスは、その科の一人一人の医者をインスタンスと
する集合である。
FIG. 12 is an explanatory diagram of a class. There is a class called a doctor, and classes of doctors in each department such as a dentist, a physician, and a surgeon can be defined as lower classes. The doctor class of each department is a set in which each doctor of the department is an instance.

同じクラスに属するインスタンスは、そのクラスに記
述された属性を継承して共通にもつ。例えば同図におい
て、内科医のクラスのインスタンスは内科医1、内科医
2等、一人一人の内科医の情報で、内科医のクラスに記
述された属性(名前、免許番号、患者名)を内科医のク
ラスに属する各インスタンスが共通にもっている。すな
わち、インスタンス内科医1の名前属性は佐藤、免許番
号属性は83、患者名属性は患者A、患者B、患者C、イ
ンスタンス内科医2の名前属性は鈴木、免許番号属性は
103、患者名属性は患者W、患者X、患者Y、患者Zで
ある。
Instances belonging to the same class inherit the attributes described in that class and have them in common. For example, in the figure, the instance of the physician class is information of each physician such as physician 1, physician 2, etc., and the attributes (name, license number, patient name) described in the physician class are used by the physician. Each instance belonging to the medical class has in common. That is, the name attribute of the instance physician 1 is Sato, the license number attribute is 83, the patient name attribute is patient A, patient B, patient C, the name attribute of the instance physician 2 is Suzuki, and the license number attribute is
103, the patient name attributes are patient W, patient X, patient Y, and patient Z.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

上述のようにクラスとインスタンスをプログラミング
の基本単位とするオブジェクト指向言語がソフトウエア
の生産性向上のために利用されつつあるが、従来のオブ
ジェクト指向言語では、例えばデータ変換の速度が遅く
大量のデータを効率的に扱えないという問題があり、オ
ブジェクト指向言語の利用によるソフトウエアの生産性
向上を実現するためにこの問題の解決が望まれている。
As described above, an object-oriented language that uses classes and instances as a basic unit of programming is being used to improve software productivity.However, in a conventional object-oriented language, for example, data conversion speed is slow and a large amount of data is However, there is a problem that it is not possible to efficiently handle data, and it is desired to solve this problem in order to improve the productivity of software by using an object-oriented language.

また、従来のオブジェクト指向システムでは、主記憶
上でのみオブジェクトの処理が行われていた。最近では
大規模知識の管理が研究されているが、それらの研究で
は自システム以外の他のデータベースの検索が問題とな
り、その検索結果が自システムのデータ表現形態に変換
されていた。
In the conventional object-oriented system, object processing is performed only on the main memory. Recently, management of large-scale knowledge has been studied, but in those studies, retrieval of databases other than the own system has become a problem, and the search results have been converted to the data expression form of the own system.

このような場合にはデータ変換に際して2重3重のコ
ピーが必要となり、コピーおよびデータ変換のコストが
嵩むという問題点があった。
In such a case, double and triple copying is required for data conversion, and there is a problem that the cost of copying and data conversion increases.

さらに従来のシステムの中には他のデータベースに対
してデータベース言語を実行し、検索結果を自システム
の主記憶上で扱いやすい形式に変換するものもあった。
しかしながらこの場合にも可変長属性のデータは予めど
のくらいの領域をとってよいか不明のために、領域を確
認してからコピーする必要があった。そのため複数の可
変長属性がある場合はコピーを複数回実行する必要があ
り、やはり変換コストが嵩むという問題点があった。
Furthermore, some conventional systems execute a database language for another database and convert the search results into a format that can be easily handled on the main memory of the own system.
However, because of the unknown or the data of variable length attribute even in the case may take in advance how much of the area, there was a need to copy from to check the area. Therefore, when there are a plurality of variable length attributes, it is necessary to execute the copying a plurality of times, and there is also a problem that the conversion cost increases.

本発明は、主記憶上のデータとファイル上でのデータ
をほぼ同じく形式として両者の間の変換効率を高めるこ
とを目的とする。
SUMMARY OF THE INVENTION It is an object of the present invention to improve the conversion efficiency between a main storage and a file in substantially the same format.

〔課題を解決するための手段〕[Means for solving the problem]

第1図は本発明の原理ブロック図である。同図におい
て大規模知識データベースシステムは電子計算機1およ
び外部記憶手段2から構成され、オブジェクト指向言語
を用いて大規模なデータを取扱うものである。電子計算
機1の内部にはオブジェクト管理手段3、データ管理手
段4、及びデータ変換手段5があり、データ管理手段4
は外部記憶手段2と接続されている。
FIG. 1 is a block diagram showing the principle of the present invention. Referring to FIG. 1, the large-scale knowledge database system includes an electronic computer 1 and an external storage unit 2, and handles large-scale data using an object-oriented language. The electronic computer 1 includes an object management unit 3, a data management unit 4, and a data conversion unit 5, and the data management unit 4
Is connected to the external storage means 2.

オブジェクト管理手段3は主記憶および外部記憶手段
2上の全てのオブジェクトを管理するもので、クラスお
よびインスタンスの管理、プログラム管理などを行う。
データ管理手段4は外部記憶手段2、例えばディスク上
に格納されているオブジェクトを関係データベースの形
式で管理する。データ変換手段5は、例えばユーザから
のコマンドによって主記憶上で生成されたオブジェクト
を外部記憶手段2、例えばディスクに格納するに際し
て、主記憶上で絶対アドレスとポインタによって指示さ
れるデータを、外部記憶手段2上でオフセットを用いて
入れる構造で連続領域に格納される形式に変換する。逆
に外部記憶手段2に格納されている知識データを主記憶
上にコピーするために、オフセットを絶対アドレスに変
換する。
The object management means 3 manages all objects in the main storage and the external storage means 2, and manages classes and instances, manages programs, and the like.
The data management means 4 manages the objects stored on the external storage means 2, for example, a disk, in the form of a relational database. The data conversion unit 5 stores data pointed to by an absolute address and a pointer on the main memory when storing an object generated on the main memory by a command from a user, for example, on the external storage unit 2, for example, a disk. The data is converted into a format to be stored in the continuous area in a structure in which an offset is used on the means 2. Conversely, the offset is converted to an absolute address in order to copy the knowledge data stored in the external storage means 2 to the main storage.

〔作用〕[Action]

本発明では主記憶上でのデータとファイル上でのデー
タをほぼ同じ形式にすることによりデータ変換、すなわ
ちマッピングの効率を高めている。ファイル上ではアク
セスの高速化のためにデータは連続領域に格納れるよう
に、可変長部分はオフセットで管理される。主記憶上で
はアクセス高速化のために、データは絶対アドレスとポ
インタによって管理される。すなわちオブジェクト管理
手段3上ではデータは絶対アドレスとポインタとによっ
て管理され、またデータ管理手段4上ではデータはオフ
セットによって管理され、かつ連続領域に格納される。
そこでデータ検索要求に応じてファイル上のデータを主
記憶上にコピーする際には、絶対アドレスとポインタと
を用いて領域の一括確保が行われ、データコピーとオフ
セットのアドレスへの変換が行われることになる。ま
た、オブジェクトのデータ外部記憶手段2への格納要求
に応じて、絶対アドレスのオフセットへの変換と主記憶
上のデータのファイル上へのコピーが実行される。
In the present invention, the data conversion, that is, the mapping efficiency is improved by making the data on the main memory and the data on the file almost the same format. On the file, the variable length portion is managed by offset so that data is stored in a continuous area for speeding up access. On the main memory, data is managed by absolute addresses and pointers to speed up access. That is, on the object management means 3, data is managed by absolute addresses and pointers, and on the data management means 4, data is managed by offsets and stored in continuous areas.
Therefore, when data in a file is copied to the main memory in response to a data search request, an area is collectively secured using an absolute address and a pointer, and data copy and conversion of an offset to an address are performed. Will be. Further, in response to a request to store the object in the data external storage means 2, the conversion of the absolute address into an offset and the copying of the data on the main storage to a file are executed.

以上のように、本発明によれば、複数の可変長属性を
含むデータの場合にもコピーの回数を最小限におさえる
ことが可能になる。
As described above, according to the present invention, it is possible to minimize the number of times of copying even for data including a plurality of variable length attributes.

〔実施例〕〔Example〕

第2図は本発明のアクセス方式を用いる大規模知識デ
ータベースシステムの全体構成ブロック図である。同図
において、システムは大型コンピュータ等の電子計算機
1、磁気ディスク装置、光ディスク装置等の外部記憶装
置6、および端末装置7から構成される。また、電子計
算機1は、CPU8を中心とし、CPU8は主記憶9および入力
制御部10、外部記憶制御部11と接続されている。端末装
置7はユーザによって操作され、オブジェクトの作成や
格納、検索、手続きの実行等のコマンドやデータを電子
計算機1に入力し、また電子計算機1からのオブジェク
ト情報や処理結果を受けてディスプレイ等に出力する。
また外部記憶装置6は、多数のオブジェクトを格納し知
識データベースを構成する。
FIG. 2 is a block diagram showing the overall configuration of a large-scale knowledge database system using the access method of the present invention. In FIG. 1, the system includes an electronic computer 1 such as a large computer, an external storage device 6 such as a magnetic disk device and an optical disk device, and a terminal device 7. The computer 1 mainly includes a CPU 8, and the CPU 8 is connected to the main memory 9, the input control unit 10, and the external storage control unit 11. The terminal device 7 is operated by a user to input commands and data such as creation, storage, search, and execution of a procedure to the computer 1, and receive object information and processing results from the computer 1 on a display or the like. Output.
The external storage device 6 stores a large number of objects and forms a knowledge database.

また、入出力制御部10は端末装置7およびCPU8、主記
憶9と接続され、電子計算機1と端末装置7等の入出力
装置をつなぐ入出力インターフェイスの役目をする。ま
た、外部記憶制御部11は外部記憶装置6およびCPU8、主
記憶9と接続され主記憶9と外部記憶装置6間での知識
データの入出力を制御する。
The input / output control unit 10 is connected to the terminal device 7, the CPU 8, and the main memory 9, and serves as an input / output interface for connecting the computer 1 to input / output devices such as the terminal device 7. The external storage control unit 11 is connected to the external storage device 6, the CPU 8, and the main storage 9 and controls input and output of knowledge data between the main storage 9 and the external storage device 6.

一方、電子計算機1内の主記憶9には、知識データベ
ースの核となる知識ベースシステム(Jasmine)12が格
納され、そのプログラムに従ってCPU8が知識ベースに対
する各種処理を実行する。さらに主記憶9内には一部の
知識データ13が格納されるが、本発明ではこの知識デー
タ13と外部記憶装置6内に格納されたデータとの変換が
問題となる。
On the other hand, a main memory 9 in the electronic computer 1 stores a knowledge base system (Jasmine) 12 serving as a core of a knowledge database, and a CPU 8 executes various processes on the knowledge base in accordance with the program. Further, a part of the knowledge data 13 is stored in the main memory 9, but in the present invention, conversion between the knowledge data 13 and the data stored in the external storage device 6 becomes a problem.

第3図は、知識ベースシステム(Jasmine)12の構成
図である。システムはモジュール化されており、主制御
機構14、解析機構15、最適化機構16、コード生成機構1
7、インタプリタ18、オブジェクト管理機構19、データ
管理機構20からなる。次に、各モジュールの役割を簡単
に説明する。
FIG. 3 is a configuration diagram of the knowledge base system (Jasmine) 12. The system is modularized, and the main control mechanism 14, analysis mechanism 15, optimization mechanism 16, code generation mechanism 1
7. Consists of an interpreter 18, an object management mechanism 19, and a data management mechanism 20. Next, the role of each module will be briefly described.

本実施例の知識ベースシステムは、ユーザにオブジェ
クト指向のプログラミング言語と会話型処理システムを
提供する。そして、主制御機構14はこれらオブジェクト
指向プログラムと会話型処理システムの実行制御を行
う。また解析機構15はオブジェクト指向プログラミング
言語で記述されたプログラミングの構文を解析し中間コ
ードを生成するとともに、会話型処理システムは会話型
処理により入力されるオブジェクト操作文を解析し、実
行可能な形にする。実行可能な形に変換されたオブジェ
クト操作文はインタプリタ18が実行する。
The knowledge base system of this embodiment provides a user with an object-oriented programming language and an interactive processing system. The main control mechanism 14 controls the execution of these object-oriented programs and the interactive processing system. In addition, the analysis mechanism 15 analyzes the syntax of the programming described in the object-oriented programming language and generates an intermediate code, and the conversational processing system analyzes the object operation sentence inputted by the conversational processing and converts the sentence into an executable form. I do. The interpreter 18 executes the object operation statement converted into an executable form.

前述の解析機構15によって生成された中間コードは最
適化機構16に送られ最適化する。すなわち、最適化機構
16は例えばジョインの順序変換による高速化などの最適
化を施し、選択演算、結合演算などの演算ブロックを中
間情報として作成し、コード生成機構17に渡す。コード
生成機構17は、最適化機構16で最適化された中間コード
からCソース・プログラムを生成する。生成されたCソ
ース・プログラムは、電子計算機1の主記憶9に本知識
にベースシステムとは別に格納されているCコンパイラ
によってコンパイルされ、知識ベースシステムの実行ラ
イブラリのリンクして実行可能ファイルを構成し、デバ
ッガがこれを実行する。
The intermediate code generated by the analysis unit 15 is sent to the optimization unit 16 for optimization. That is, the optimization mechanism
16 performs optimization such as speeding-up by, for example, join order conversion, creates operation blocks such as a selection operation and a joint operation as intermediate information, and transfers the intermediate blocks to the code generation mechanism 17. The code generator 17 generates a C source program from the intermediate code optimized by the optimizer 16. The generated C source program is compiled by a C compiler stored in the main memory 9 of the electronic computer 1 in the main memory 9 separately from the knowledge of the base system, and linked to an execution library of the knowledge base system to form an executable file. And the debugger does this.

一方、オブジェクト管理機構19はオブジェクトの管理
を実行する。すなわち、クラスとインスタンスの管理
や、クラス−インスタンス間あるいは上位下位関係があ
るクラス間で属性や手続きを継承する遺伝の管理、プロ
グラムの管理を実行する。
On the other hand, the object management mechanism 19 executes the management of the object. That is, it manages classes and instances, manages inheritance of inheriting attributes and procedures between classes and instances or between classes having an upper / lower relationship, and manages programs.

データ管理機構20は、例えば拡張関係データベースを
管理するもので、非正規形のテーブルを管理でき、また
インデックス検索やハッシュジョイントという高速アク
セスメソッドを持っている。さらにタプル、すなわち関
係データベースの表における行ごとの処理を後述関数や
マッピング関数というコンパイルコードで与え、それを
実行できる高速かつ汎用的なデータベースシステムエン
ジンである。またオブジェクト管理機構19は例えばアク
ティブオブジェクトスペースを用いてデータ管理機構29
とのインターラクションが少なくなるようになってい
る。
The data management mechanism 20 manages, for example, an extended relational database, can manage non-normalized tables, and has high-speed access methods such as index search and hash joint. Furthermore, it is a high-speed and general-purpose database system engine capable of giving a tuple, that is, a process for each row in a table of a relational database, by a compiled code called a function or a mapping function described later and executing the compiled code. Further, the object management mechanism 19 uses, for example, an active object space to
Interaction with is reduced.

本発明のデータアクセス方式はオブジェクト管理機構
19およびデータ管理機構29の内部にプログラムとして実
行されている。
The data access method of the present invention is an object management mechanism.
It is executed as a program inside 19 and the data management mechanism 29.

本発明におけるデータ変換のアルゴリズムを説明する
前に、本発明における主記憶上およびデータベース(フ
ァイル)上での格納データの具体例を第4図に示す。同
図において、スズキフミオの好きな女優がサガラハルコ
とミナミノヨウコであり、またサガラハルコが付き合っ
ている友達がサイトウユキとアサカユウイであるという
ことが各人の年令とともにデータの内容として示され
る。(a)の主記憶上では、フミオの後のポインタがハ
ルコとヨウコの絶対アドレスを指示し、またハルコの後
のポインタがユキとユイの絶対アドレスを指示してい
る。
Before describing the data conversion algorithm in the present invention, FIG. 4 shows a specific example of data stored on the main storage and the database (file) in the present invention. In the figure, it is shown as the contents of the data that the favorite actresses of Suzuki Fumio are Sagara Haruko and Minamino Yoko, and that the friends with whom Sagara Haruko is dating are Saito Yuki and Asaka Yui. In the main memory of (a), the pointer after Fumio points to the absolute addresses of Haruko and Yoko, and the pointer after Haruko points to the absolute addresses of Yuki and Yui.

これに対してデータベース、すなわちファイル上では
データは連続領域に格納される。まず最初に全体のデー
タの行としてのタプル長が格納され、その後にフミオが
格納される。フミオの次のオフセットは図のように可変
長サイズを指示する。この可変長サイズはインナーテー
ブル、ここではスズキフミオが好きな女優がサガラハル
コとミナミノヨウコの2人であることを示すためのイン
ナーテーブルのサイズであり、そのテーブルの行数、す
なわちタプル数はこの場合は2となる。
On the other hand, in a database, that is, on a file, data is stored in a continuous area. First, the tuple length as a row of the entire data is stored, and then Fumio is stored. The next offset of Fumio indicates a variable length size as shown. This variable length size is the size of the inner table, here the size of the inner table to indicate that the actresses who like Fumio Suzuki are Sagara Haruko and Yoko Minamino, and the number of rows in the table, that is, the number of tuples, It becomes 2.

タプル数の次に格納されているレングス(length)
は、サガラハルコのデータとサガラハルコが付き合って
いる友達がサイトウユキとアサカユウイであるというこ
とを示すデータを格納するための領域の長さであり、ハ
ルコの次に格納されているオフセットによりサイトウユ
キとアサカユイのデータが指示される。
Length stored after the number of tuples (length)
Is the length of the area for storing data indicating that Sagara Haruko's data and friends with whom Sagara Haruko is dating are Saito Yuki and Asaka Yui, and data for Saito Yuki and Asaka Yui is determined by the offset stored next to Haruko. Is indicated.

そしてその後に格納されているNIL(レングス)によ
ってインナーテーブルの1つのタプルが終わったことが
示され、その後にミナミノヨウコのデータが格納され
る。フミオの年令“27"の下に格納されているオフセッ
トにより、フミオの姓スズキが指示され、ここまでが全
データであることになる。またハルコの年令“20"の次
のオフセットによりハルコの姓サガラが示され、さらに
ヨウコの年令“22"の次のオフセットによりヨウコの姓
ミナミノが示される。
The NIL (length) stored thereafter indicates that one tuple in the inner table has been completed, and then the data of Minamino Yoko is stored. The offset stored under Fumio's age “27” indicates Fumio's surname Suzuki, and this is all the data. The offset after Harco's age "20" indicates Haruko's surname Sagara, and the offset after Yoko's age "22" indicates Yoko's surname Minamino.

第5図はデータ変換のアルゴリズムの概要である。同
図(a)はデータ検索のアルゴリズムの概要を示し、ス
テップ21でタプル識別子tidによりデータベース、すな
わちファイルの検索が行われ、検索結果がステップ22で
主記憶上にコピーされる。そしてステップ23でオフセッ
トが絶対アドレスに変換され、ステップ24で後述するア
クティブオブジェクトテーブルへの登録が行われる。第
5図(b)はオブジェクト生成時、すなわち主記憶上に
形成されたオブジェクトをファイルに格納する場合のア
ルゴリズムの概要である。まずステップ25で絶対アドレ
スがオフセットに変換される。この時データが連続領域
にない場合には、このオフセットへの変換はデータの連
続領域への並べ換えと同時に行われる。そしてステップ
26で連続領域の情報がファイルへ書き込まれる。次のス
テップ27の処理は必要に応じて例外的に行われるもので
あり、ステップ25でデータが連続領域にすんで並んでい
る場合に、アクセスを高速にするためにオフセットをも
う一度絶対アドレスに戻すものである。すなわち主記憶
上のデータをそのままコピーする場合にはオフセットに
変換する必要はないが、コピーに際しては多くの領域が
必要であり、また時間がかかるために、ステップ25では
データが連続領域にあると否とにかかわらずオフセット
への変換が行われる。
FIG. 5 shows an outline of the data conversion algorithm. FIG. 9A shows an outline of a data search algorithm. In step 21, a database, that is, a file is searched by the tuple identifier tid, and the search result is copied to the main storage in step 22. Then, in step 23, the offset is converted to an absolute address, and in step 24, registration in the active object table described later is performed. FIG. 5B shows an outline of an algorithm when an object is generated, that is, when an object formed on the main memory is stored in a file. First, in step 25, the absolute address is converted into an offset. At this time, if the data is not in the continuous area, the conversion to the offset is performed simultaneously with the rearrangement of the data into the continuous area. And step
At 26, the information of the continuous area is written to the file. The processing in the next step 27 is performed exceptionally as necessary, and in step 25, when the data is arranged in a continuous area, the offset is returned to the absolute address again to speed up access. It is. That is, when data on the main memory is copied as it is, there is no need to convert it to an offset, but since copying requires a large area and takes time, in step 25, it is assumed that the data is in a continuous area. Regardless of whether or not the conversion to the offset is performed.

第5図(c)はデータ更新のアルゴリズムの概要であ
り、ステップ28で更新属性のみについて変換が行われ、
ステップ29で更新属性のみの更新が行われる。また像区
(d)はデータ消去時のアルゴリズムであり、ステップ
30でタプル識別子tidを用いてデータ消去が行われる。
FIG. 5 (c) shows an outline of the data update algorithm. In step 28, only the update attribute is converted.
In step 29, only the update attribute is updated. The image section (d) is an algorithm for deleting data,
At 30, data is erased using the tuple identifier tid.

第6図は第5図のステップ24におけるアクティブオブ
ジェクトテーブルの実施例である。図においてデータベ
ースファイルの患者クラスから、オブジェクト識別子oi
dが3:36:1であるデータが主記憶上のアクティブオブジ
ェクトテーブルに格納される様子が示されている。
FIG. 6 shows an embodiment of the active object table in step 24 of FIG. In the figure, from the patient class in the database file, the object identifier oi
A state in which data in which d is 3: 36: 1 is stored in the active object table on the main memory is shown.

第7図は共通データ構造としてのデータ変換、すなわ
ちマッピングの補助情報の構造である。同図(a)はク
ラスのインスタンスのマッピング補助情報mapinfoのデ
ータ構造を示し、インスタンスのトータルサイズ、ポイ
ンタ属性を含む可変長属性の個数、データベース中のテ
ーブルについての情報、例えばシーケンシャルかインナ
ーかを示すrb情報へのポインタ、および各属性のマッピ
ング情報の配列からなる。同図(b)はセル(mapinfoc
ell)の内容を示し、その属性のアドレス、実データへ
のポインタ、その属性のタイプ、すなわちポインタかイ
ンナーテーブルかあるいは可変長データかを示す整数、
およびインナーテーブルの場合にmapinfoへのポインタ
が格納される。
FIG. 7 shows a structure of data conversion as a common data structure, that is, auxiliary information for mapping. FIG. 7A shows the data structure of the mapping auxiliary information mapinfo of the instance of the class, and shows the total size of the instance, the number of variable-length attributes including the pointer attribute, and information about the table in the database, for example, whether it is sequential or inner. It consists of a pointer to rb information and an array of mapping information for each attribute. FIG. 2B shows a cell (mapinfoc).
ell), the address of the attribute, a pointer to the actual data, an integer indicating the type of the attribute, ie, pointer or inner table or variable length data,
And in case of inner table, pointer to mapinfo is stored.

第8図はデータベースへの格納のための補助情報のデ
ータ構造である。データ管理機構20により行われるデー
タベース内のデータの更新はフィールドポインタアレー
(field pointer array)によって行なわれるために、
この情報はfpainfoで示され、第8図(a)のように可
変長データ属性の個数を示す整数、及び各属性のデータ
ベース補助情報の配列からなる。同図(b)はセル(fp
ainfocpll)の内容であり、フィールド番号を示す整
数、相対アドレスを示す整数、タイプを示す文字、およ
び多値か否かを示す文字が格納される。
FIG. 8 shows the data structure of auxiliary information for storage in a database. Updating of data in the database by the data management mechanism 20 is performed by a field pointer array,
This information is indicated by fpainfo, and includes an integer indicating the number of variable-length data attributes and an array of database auxiliary information of each attribute as shown in FIG. FIG. 2B shows a cell (fp)
ainfocpll), which stores an integer indicating a field number, an integer indicating a relative address, a character indicating a type, and a character indicating whether or not it is multi-valued.

第9図は第5図のステップ25の詳細アルゴリズム、す
なわち絶対アドレスのオフセットへの変換アルゴリズム
である。同図(a)は全体のアルゴリズムであり、ステ
ップ31で可変長属性の更新の有無が判定され、ない場合
にはステップ32でデータのコピーを行うことなくオフセ
ットへの変換を行うトランスオフセットリストサブ(tr
ansoffsetlistsub)が実行される。また可変長属性の更
新がある場合には、ステップ33で可変長属性のコピーが
行われ、それを用いて絶対アドレスからオフセットへの
変換がトランスオフセットリストサブ(transoffsetlis
t sub)として行われる。
FIG. 9 is a detailed algorithm of step 25 in FIG. 5, that is, an algorithm for converting an absolute address into an offset. FIG. 7A shows the overall algorithm. In step 31, it is determined whether or not the variable length attribute has been updated. If not, in step 32, a trans offset list sub-unit for converting to an offset without copying data is used. (Tr
ansoffsetlistsub) is executed. If the variable-length attribute is updated, the variable-length attribute is copied in step 33, and the conversion from the absolute address to the offset is performed using the copy.
t sub).

第9図(b)はトランスオフセットサブのアルゴリズ
ムであり、ステップ34で第7図(a)のmapinfoにおけ
る可変長属性の数だけ次の処理が行われる。すなわちス
テップ34aでその属性の相対位置が求められ、ステップ3
4bでポインタかインナーテーブルかあるいは可変長デー
タかのタイプが調べられ、ポインタであればオフセット
の値としてNULLがセットされ、可変長データであればサ
イズが更新され先頭からのオフセットが求められ、その
登録が行われる。またもしインナーテーブルがあれば各
タプルについてトランスオフセットサブが呼ばれる。
FIG. 9 (b) shows a trans offset sub-algorithm, and the following processing is performed in step 34 by the number of variable length attributes in the mapinfo of FIG. 7 (a). That is, the relative position of the attribute is obtained in step 34a, and the
In 4b, the type of pointer, inner table or variable length data is checked.If it is a pointer, NULL is set as the offset value.If it is variable length data, the size is updated and the offset from the beginning is obtained. Registration is performed. If there is an inner table, a trans offset sub is called for each tuple.

第9図(c)はトランスオフセットリストサブのアル
ゴリズムである。まずステップ35で第7図(a)のfapi
nfo可変長属性の数だけスキャンが行われ、データの総
サイズが求められる。その際可変長データのアドレスの
登録が行われる。またインナーテーブルの場合には、そ
のインナーテーブルの各タプルについてトランスオフセ
ットリストサブが呼ばれる。次にステップ36で領域の確
保と固定長領域のみのコピーが行われ、ステップ37で可
変長属性の個数だけ次の処理が行われる。すなわステッ
プ37aでその属性データの相対位置が求められ、37bでタ
イプが調べられる。タイプがポインタの場合にはオフセ
ット値としてNULLがセットされ、可変長データであれば
その長さだけデータ領域のコピーが行われる。
FIG. 9 (c) shows the algorithm of the trans offset list sub. First, in step 35, the fapi shown in FIG.
Scanning is performed by the number of nfo variable length attributes, and the total size of the data is obtained. At this time, the address of the variable length data is registered. In the case of an inner table, a trans offset list sub is called for each tuple in the inner table. Next, in step 36, the area is secured and only the fixed length area is copied, and in step 37, the following processing is performed for the number of variable length attributes. That is, the relative position of the attribute data is obtained in step 37a, and the type is checked in 37b. If the type is pointer, NULL is set as the offset value, and if the data is variable length data, the data area is copied by that length.

第10図は第5図のステップ23、または27のオフセット
の絶対アドレスへの変換のアルゴリズムである。同図
(a)は全体のアルゴリズムであり、まずステップ38で
可変長属性の更新があるか否かが判定される。更新がな
い場合には可変長データについてオフセットをアドレス
に変換する必要があるので、ステップ40で連続領域のオ
フセットの絶対アドレスへの変換処理がトランスアドレ
ス−s(transaddr−s)として実行され、また更新が
ある場合にはステップ39で固定長領域がコピーされて復
元される。同図(b)はトランスアドレス−sのアルゴ
リズムである。この処理では第7図(a)のmapinfoに
おける可変長属性の個数だけ以下の処理が行われる。す
なわちステップ41aでその属性について相対位置が求め
られ、ステップ41bでその属性のタイプが調べられる。
そして可変長データの場合にはオフセットが絶対アドレ
スに変換され、インナーテーブルの場合には各タプルに
ついてトランスアドレス−sが呼ばれ、先頭と末尾のア
ドレスが埋められる。
FIG. 10 is an algorithm for converting the offset of step 23 or 27 in FIG. 5 into an absolute address. FIG. 7A shows the overall algorithm. First, at step 38, it is determined whether or not the variable length attribute is updated. If there is no update, it is necessary to convert the offset into an address for the variable-length data, so in step 40, the process of converting the offset of the continuous area into an absolute address is executed as trans address-s (transaddr-s). If there is an update, the fixed length area is copied and restored at step 39. FIG. 7B shows the algorithm of the trans address-s. In this processing, the following processing is performed by the number of variable length attributes in the mapinfo in FIG. That is, the relative position of the attribute is obtained in step 41a, and the type of the attribute is checked in step 41b.
In the case of variable length data, the offset is converted to an absolute address. In the case of an inner table, the trans address -s is called for each tuple, and the head and tail addresses are filled.

第11図は属性の更新処理におけるアルゴリズムであ
る。このアルゴリズム、アップデータfpa(update fp
a)においてはステップ42で第8図(a)のデータベー
ス補助情報としてのfpainfoの属性の数だけ以下の処理
が行われる。すなわちステップ42aでその属性のタイプ
が調べられ、もし可変長データであれば絶対アドレスが
fpaに登録される。またインナーテーブルの場合には各
タプルについてアップデータfpaが呼ばれる。そしてス
テップ42bでfpaに基づいて属性の更新が行われる。
FIG. 11 shows an algorithm in the attribute update processing. This algorithm, updater fpa (update fp
In a), the following processing is performed in step 42 by the number of attributes of fpainfo as the database auxiliary information of FIG. 8A. That is, in step 42a, the type of the attribute is checked, and if the data is variable-length data, the absolute address is
Registered to fpa. In the case of the inner table, the update data fpa is called for each tuple. Then, in step 42b, the attribute is updated based on the fpa.

なお、上述の実施例では、フィルタ上でのデータを主
記憶上に持ってくるにあたってはオフセットを絶対アド
レスに変換するものとしたが、このオフセットのアドレ
スへの変換を行わずにファイル上のデータを利用するこ
とも可能である。この場合にはマッピングのコストがよ
り低減でき、また主記憶上のデータにもファイル上のデ
ータを対象とする関数が適用できることになるが、主記
憶上でのアクセスもオフセットによるため、個々のアク
セスは遅くなる。
In the above-described embodiment, when the data on the filter is brought into the main memory, the offset is converted into the absolute address. However, the data on the file is converted without converting the offset into the address. It is also possible to use. In this case, the mapping cost can be further reduced, and the function for the data on the file can be applied to the data on the main memory. Slows down.

〔発明の効果〕〔The invention's effect〕

以上詳細に説明したように、本発明によれば、絶対ア
ドレスとオフセットの変換のみで主記憶上のデータとフ
ァイル上のデータを相互に変換することが可能になり、
オブジェクトのデータをファイルから主記憶へ持ってき
たり、主記憶からファイルへ書き込む時の変換に要する
処理を極めて少なくすることができ、システムの高速化
に寄与するところが大きい。
As described in detail above, according to the present invention, it is possible to mutually convert data in the main storage and data in a file only by converting an absolute address and an offset,
The processing required to convert the data of an object from a file to the main storage or to write the data from the main storage to the file can be extremely reduced, which greatly contributes to speeding up the system.

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

第1図は本発明の原理ブロック図、 第2図は本発明のアクセス方式を用いる大規模知識デー
タベースシステムの全体構成を示すブロック図、 第3図は知識ベースシステム(Jasmine)の構成を示す
ブロック図、 第4図(a)、(b)は主記憶上およびファイル上での
格納データの具体例を示す図、 第5図(a)〜(d)はデータ変換のアルゴリズムの概
要を示す図、 第6図はアクティブオブジェクトテーブルの実施例を示
す図、 第7図(a)、(b)はマッピングの補助情報の構造を
示す図、 第8図(a)、(b)はデータベースへの格納のための
補助情報の構造を示す図、 第9図(a)〜(c)は絶対アドレスのオフセットへの
変換アルゴリズムの実施例を示す図、 第10図(a)、(b)はオフセットの絶対アドレスへの
変換アルゴリズムの実施例を示す図、 第11図は属性の更新アルゴリズムの実施例を示す図、 第12図はクラス−インスタンスの説明図である。 1……電子計算機、 6……外部記憶装置、 8……CPU、 9……主記憶、 12……知識ベースシステム(jasmine)、 13……知識データ、 19……オブジェクト管理機構、 20……データ管理機構.
FIG. 1 is a block diagram showing the principle of the present invention, FIG. 2 is a block diagram showing the overall configuration of a large-scale knowledge database system using the access method of the present invention, and FIG. 3 is a block showing the configuration of a knowledge base system (Jasmine). FIGS. 4 (a) and 4 (b) are diagrams showing specific examples of data stored in a main storage and a file, and FIGS. 5 (a) to 5 (d) are diagrams showing an outline of a data conversion algorithm. Fig. 6 is a diagram showing an embodiment of the active object table, Figs. 7 (a) and 7 (b) are diagrams showing the structure of mapping auxiliary information, and Figs. 9 (a) to 9 (c) show an embodiment of an algorithm for converting an absolute address into an offset, and FIGS. 10 (a) and 10 (b) show offsets. Algorithm to convert to absolute address Shows an embodiment, Figure 11 shows an embodiment of an attribute of the update algorithm figure FIG. 12 Class - an illustration of an instance. 1 ... Electronic computer, 6 ... External storage device, 8 ... CPU, 9 ... Main memory, 12 ... Knowledge base system (jasmine), 13 ... Knowledge data, 19 ... Object management mechanism, 20 ... Data management mechanism.

フロントページの続き (56)参考文献 特開 昭63−67638(JP,A) 特開 昭63−136147(JP,A) 特開 昭63−158643(JP,A) 特開 平1−159750(JP,A) 鈴木文雄,他,”オブジェクト指向型 マルチメディア知識ベースJasmin eの実現”情報処理学会研究報告,情報 処理学会,平成元年7月20日,VOL. 89,NO.63(DBS−72),P.57〜 P.64 鈴木文雄,他,”オブジェクト指向型 マルチメディア知識ベースJasmin eのプログラムインターフェースの実現 について”,情報処理学会第37回(昭和 63年後期)全国大会講演論文集,情報処 理学会,昭和63年10月,VOL.37t h,NO.1,P.405〜P.406 (58)調査した分野(Int.Cl.6,DB名) G06F 12/00 G06F 15/40 Continuation of front page (56) References JP-A-63-67638 (JP, A) JP-A-63-136147 (JP, A) JP-A-63-158643 (JP, A) JP-A-1-159750 (JP) , A) Fumio Suzuki, et al., "Implementation of Jasmine, an Object-Oriented Multimedia Knowledge Base", Information Processing Society of Japan Research Report, Information Processing Society of Japan, July 20, 1989, Vol. 89, NO. 63 (DBS-72), p. 57-P. 64 Fumio Suzuki, et al., "On the Realization of the Program Interface of the Object-Oriented Multimedia Knowledge Base Jasmine", Proc. Of the 37th Annual Conference of IPSJ, 1988, IPSJ, 1988 October, VOL. 37th, NO. 1, P. 405-P. 406 (58) Field surveyed (Int.Cl. 6 , DB name) G06F 12/00 G06F 15/40

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】電子計算機(1)および外部記憶手段
(2)から成り、オブジェクト指向言語を用いて大規模
なデータを取扱う知識データベースシステムにおいて、 主記憶および外部記憶手段(2)上の全てのオブジェク
トを管理するオブジェクト管理手段(3)と、 前記外部記憶手段(2)上に格納されているオブジェク
トを関係データベースの形式で管理するデータ管理手段
(4)と、 主記憶上で絶対アドレスとポインタとによって指示され
るデータと、前記外部記憶手段(2)上でオフセットを
用いて入れる構造で連続領域に格納されるデータとを、
前記オブジェクト管理手段(3)とデータ管理手段
(4)との間で相互に変換するデータ変換手段(5)を
有することを特徴とする大規模知識データベースシステ
ムにおけるデータアクセス方式。
1. A knowledge database system comprising an electronic computer (1) and external storage means (2) and handling large-scale data using an object-oriented language. Object management means (3) for managing objects; data management means (4) for managing objects stored in the external storage means (2) in the form of a relational database; absolute addresses and pointers on main storage And data stored in a continuous area in a structure to be inserted using an offset on the external storage means (2).
A data access method in a large-scale knowledge database system, comprising a data conversion means (5) for mutually converting between the object management means (3) and the data management means (4).
JP1184713A 1989-07-19 1989-07-19 Data access method for large-scale knowledge database system Expired - Fee Related JP2923917B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1184713A JP2923917B2 (en) 1989-07-19 1989-07-19 Data access method for large-scale knowledge database system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1184713A JP2923917B2 (en) 1989-07-19 1989-07-19 Data access method for large-scale knowledge database system

Publications (2)

Publication Number Publication Date
JPH0350646A JPH0350646A (en) 1991-03-05
JP2923917B2 true JP2923917B2 (en) 1999-07-26

Family

ID=16158064

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1184713A Expired - Fee Related JP2923917B2 (en) 1989-07-19 1989-07-19 Data access method for large-scale knowledge database system

Country Status (1)

Country Link
JP (1) JP2923917B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5620053A (en) * 1994-01-28 1997-04-15 Komatsu, Ltd. Blade apparatus and its control method in bulldozer
JP3516279B2 (en) * 1995-01-27 2004-04-05 株式会社小松製作所 Bulldozer earthwork plate attitude control apparatus and control method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
鈴木文雄,他,"オブジェクト指向型マルチメディア知識ベースJasmineのプログラムインターフェースの実現について",情報処理学会第37回(昭和63年後期)全国大会講演論文集,情報処理学会,昭和63年10月,VOL.37th,NO.1,P.405〜P.406
鈴木文雄,他,"オブジェクト指向型マルチメディア知識ベースJasmineの実現"情報処理学会研究報告,情報処理学会,平成元年7月20日,VOL.89,NO.63(DBS−72),P.57〜P.64

Also Published As

Publication number Publication date
JPH0350646A (en) 1991-03-05

Similar Documents

Publication Publication Date Title
JP3437849B2 (en) Database management system and method for supporting object-oriented programming
US5850544A (en) System and method for efficient relational query generation and tuple-to-object translation in an object-relational gateway supporting class inheritance
JP2680255B2 (en) System and method for transferring data in an object oriented environment
US6243709B1 (en) Method and apparatus for loading stored procedures in a database corresponding to object-oriented data dependencies
US11561976B1 (en) System and method for facilitating metadata identification and import
US5432930A (en) System for accessing cobol data files by generating a dictionary of NF.sup.2
US7480661B2 (en) Query services for database system
JP2005515518A (en) Method and system for converting legacy software applications into modern object-oriented systems
CN108052321A (en) A kind of method that block chain intelligence contract is automatically generated based on configuration information
CN111984663B (en) REDIS database update method, device, computer equipment, storage medium
CN111078205A (en) A modular programming method, device, storage medium and electronic device
CN110990425A (en) JDBC driving method and device of hardware database
CN115905164B (en) Identification and import of extended metadata for database artifacts
CN113885970B (en) Method, system and medium for generating report data based on script
US6389425B1 (en) Embedded storage mechanism for structured data types
JP2923917B2 (en) Data access method for large-scale knowledge database system
Ra et al. A flexible object-oriented database model and implementation for capacity-augmenting views
US20050131880A1 (en) Executing nested subqueries of parallel table functions in the parallel single cursor model
JP2785138B2 (en) Genetic methods in large-scale knowledge database systems
EP1040432B1 (en) Method and apparatus for loading stored procedures in a database corresponding to object-oriented data dependencies
CN117632911A (en) Database process language migration method and device
CN114418101A (en) A Bayesian network inference method and system
CN108897897B (en) Data processing method and device
CN119127868A (en) Dynamic management method, device, equipment and medium for business objects
KR100309670B1 (en) CS Model Information Schema Conversion System

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees