JP2929542B2 - Database operation method - Google Patents

Database operation method

Info

Publication number
JP2929542B2
JP2929542B2 JP1212763A JP21276389A JP2929542B2 JP 2929542 B2 JP2929542 B2 JP 2929542B2 JP 1212763 A JP1212763 A JP 1212763A JP 21276389 A JP21276389 A JP 21276389A JP 2929542 B2 JP2929542 B2 JP 2929542B2
Authority
JP
Japan
Prior art keywords
database
item
screen
entity
operation method
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 - Lifetime
Application number
JP1212763A
Other languages
Japanese (ja)
Other versions
JPH0375846A (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.)
Hitachi Ltd
Hitachi Keiyo Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Keiyo Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi Keiyo Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP1212763A priority Critical patent/JP2929542B2/en
Publication of JPH0375846A publication Critical patent/JPH0375846A/en
Application granted granted Critical
Publication of JP2929542B2 publication Critical patent/JP2929542B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、計算機上でデータベースを操作する際のユ
ーザインタフェースに関し、特にデータベースの構造を
図形を用いて操作するシステムに好適なデータベース操
作方法に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a user interface for operating a database on a computer, and more particularly to a database operation method suitable for a system for operating a database structure using graphics. .

〔従来の技術〕[Conventional technology]

データベースの構造を図形を使って定義する仕様書を
利用者が対話により作成し、該仕様書を読み込み、スキ
ーマ定義文、テーブル定義文を自動生成するものとし
て、例えば特開昭63−174128号公報に記載のものが知ら
れている。
Japanese Patent Application Laid-Open No. 63-174128 discloses a system in which a user creates a specification for defining the structure of a database by using a figure through dialogue, reads the specification, and automatically generates a schema definition statement and a table definition statement. Are known.

また、データベースの構造を図形を用いて画面上に表
示し、その上でデータベースを操作するインタフェース
については、論文Ramez A.Elasri:“A Graphcal Query
Facility for ER Databases"Entity−Relationship App
roach pp236〜245に提案されている。
For an interface to display the structure of the database on the screen using graphics and operate the database on it, see the paper Ramez A. Elasri: “A Graphcal Query
Facility for ER Databases "Entity-Relationship App
roach pp236-245.

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

しかしながら、先の公報に記載の従来技術において
は、データベースのテーブル間の関連については定義さ
れていても、テーブルとテーブルの項目の関係について
は定義されておらず、また、テーブルの項目の属性情報
をどこから取得するかについては明らかでないため、上
記従来技術によっては、データベースの構造を厳密に定
義するがことできないという問題があった。
However, in the prior art described in the above publication, the relationship between tables in the database is defined, but the relationship between the tables and the items in the tables is not defined. Since it is not clear from where the data is obtained, there is a problem that the structure of the database cannot be strictly defined according to the above-mentioned conventional technology.

また、先の論文に記載のものは、テーブル自身が実体
テーブルであるのか関連テーブルであるのかを認識する
手段がないために、データベースの論理構造を図形表示
することができないという問題があった。
Further, the above-mentioned paper has a problem that the logical structure of the database cannot be graphically displayed because there is no means for recognizing whether the table itself is an entity table or a related table.

本発明は、前記問題点を解決するためになされたもの
である。
The present invention has been made to solve the above problems.

本発明の目的は、データベースの構造を図形を用いて
定義した仕様書からスキーマ定義文、テーブル定義文を
自動的に生成し、自動生成した定義文を実行して、デー
タベースを構築し、該データベースの構造を画面上に表
示してデータベースの操作を行うデータベース操作方法
を提供することにある。
An object of the present invention is to automatically generate a schema definition sentence and a table definition sentence from a specification in which the structure of a database is defined using graphics, execute the automatically generated definition sentence, construct a database, An object of the present invention is to provide a database operation method for displaying the structure of a database on a screen and operating a database.

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

前記目的を達成するために、データベースの構造を図
形を用いて定義する仕様書を、データベース構造図編集
手段によって作成し、作成された前記仕様書をデータベ
ース構造定義文自動生成手段で読み込み、前記仕様書の
名称をスキーマ名にしてスキーマ定義文を自動生成し、
前記仕様書で記述されたテーブルの項目の属性をデータ
辞書記憶手段から検索して、テーブル定義文を自動生成
する。
In order to achieve the above object, a specification defining the structure of a database using graphics is created by a database structure drawing editing unit, and the created specification is read by a database structure definition sentence automatic generation unit, and the specification A schema definition statement is automatically generated using the name of the document as the schema name,
The attribute of the item of the table described in the specification is searched from the data dictionary storage means, and a table definition sentence is automatically generated.

また、データベース管理手段は前記生成されたスキー
マ定義文、テーブル定義文を実行してデータベースを構
築し、前記仕様書をデータベース構造情報として記憶
し、前記データベース構造情報を読込み、データベース
構造図を画面上に表示し、画面上で指定された操作対
象、操作条件、操作命令を読み込み、データベース操作
文を生成する。
The database management means executes the generated schema definition statement and table definition statement to construct a database, stores the specifications as database structure information, reads the database structure information, and displays the database structure diagram on a screen. And reads the operation target, operation condition, and operation instruction specified on the screen, and generates a database operation statement.

さらに、生成されたデータベース操作文を実行し、操
作結果を画面上に表示する。
Further, the generated database operation statement is executed, and the operation result is displayed on the screen.

利用者がテーブルにレコードを登録する際に、データ
ベースの構造上、前記テーブルに接続するテーブルを前
記データベース構造情報から検索し、前記接続するテー
ブルの項目値を画面上に表示し、その中から利用者が指
定した値を画面上で転記する。
When a user registers a record in a table, a table connected to the table is searched from the database structure information, and an item value of the table to be connected is displayed on a screen. The value specified by the user on the screen.

データベースのテーブルを、実体テーブルと、実体テ
ーブル間の関係を定義した関連テーブルとで構成し、実
体テーブルに接続する関連テーブルを前記データベース
構造情報から検索し、前記関連テーブルに登録済みのレ
コード値を、前記実体テーブルのキー項目値として自動
的に登録する。
A database table is composed of an entity table and an association table that defines a relationship between the entity tables, a search for an association table connected to the entity table from the database structure information, and a record value registered in the association table. , Are automatically registered as key item values of the entity table.

〔作 用〕(Operation)

前述した手段によれば、利用者がデータベースのテー
ブル間の関連と、テーブルの項目を定義した仕様書を対
話により作成し、作成された前記仕様書をデータベース
構造定義文自動生成手段で読み込み、前記仕様書の名称
をスキーマ名にしてスキーマ定義文を生成し、前記仕様
書で定義されたテーブルの項目の属性をデータ辞書から
検索して、テーブル定義文を自動生成する。自動生成さ
れたデータベース構造定義文を実行して、データベース
を構築し、前記仕様書をデータベース構造情報として記
憶し、前記データベースを操作する際に、前記構造情報
を画面上に表示する。
According to the above-described means, the user interactively creates a specification defining the relation between the tables in the database and the items of the table, reads the created specification by the database structure definition automatic generation means, A schema definition sentence is generated using the name of the specification as a schema name, and the attributes of the items of the table defined in the specification are searched from the data dictionary to automatically generate the table definition sentence. A database is constructed by executing the automatically generated database structure definition statement, the specification is stored as database structure information, and the structure information is displayed on a screen when the database is operated.

利用者が画面上で指定した操作対象、操作条件、操作
命令を読み込んでデータベース操作文を生成し、データ
ベース操作文を実行することによって操作結果を画面上
に表示する。
The operation target, the operation condition, and the operation instruction designated by the user on the screen are read to generate a database operation statement, and the operation result is displayed on the screen by executing the database operation statement.

〔実施例〕〔Example〕

以下、本発明の一実施例を図面を用いて具体的に説明
する。
Hereinafter, an embodiment of the present invention will be specifically described with reference to the drawings.

なお、実施例を説明するための全図において、同一機
能を有するものは同一符号を付け、その繰り返しの説明
は省略する。
In all the drawings for describing the embodiments, components having the same function are denoted by the same reference numerals, and their repeated description will be omitted.

第1図は本発明に係るシステムの構成を示すブロック
図である。データベース構造図編集手段1は、利用者と
の対話により、新規に構築するデータベースの構造図
(仕様書)を編集し、データベース構造図記憶手段2に
記憶する。データ辞書記憶手段3はデータベース構造図
中の項目の詳細情報を記憶したものである。データベー
ス構造定義文自動生成手段4は、データベース構造図記
憶手段2とデータ辞書記憶手段3からデータベース構造
定義文を生成してデータベース構造定義文記憶手段5に
記憶する。ここで、データベース構造定義文とは、スキ
ーマ定義文とテーブル定義文をいう。データベース管理
手段6は、生成されたデータベース構造定義文を実行
し、データベース7を構築する。その際に、データベー
ス構造図をデータベース構造情報としてデータベース構
造情報記憶手段8に記憶する。利用者がデータベース7
を操作する際には、データベース構造情報を読み込み、
ディスプレイ9にデータベース構造図を表示する。利用
者からの命令は入力装置10によって入力される。
FIG. 1 is a block diagram showing the configuration of the system according to the present invention. The database structure diagram editing means 1 edits the structure diagram (specification) of the newly constructed database through interaction with the user, and stores it in the database structure diagram storage means 2. The data dictionary storage means 3 stores detailed information of items in the database structure diagram. The database structure definition sentence automatic generation means 4 generates a database structure definition sentence from the database structure diagram storage means 2 and the data dictionary storage means 3 and stores it in the database structure definition sentence storage means 5. Here, the database structure definition statement refers to a schema definition statement and a table definition statement. The database management means 6 executes the generated database structure definition statement to construct the database 7. At this time, the database structure diagram is stored in the database structure information storage means 8 as database structure information. User is database 7
When operating, read the database structure information,
A database structure diagram is displayed on the display 9. A command from the user is input by the input device 10.

第2図は、データベース構造定義文自動生成手段4の
処理手順の一実施例を示すフローチャートであり、第3
図は、本発明が適用されるハードウェア構成を示す図で
ある。
FIG. 2 is a flowchart showing an embodiment of the processing procedure of the database structure definition sentence automatic generation means 4, and FIG.
FIG. 1 is a diagram showing a hardware configuration to which the present invention is applied.

データベース構造図の一実施例を第4図に示す。第4
図の構造図は、公知のER図(Entity Relationship mode
l)を用いて記述されている。ER図はデータベースを構
成するテーブルを実体テーブルと実体テーブル間の関連
を表す関連テーブルに分類し、実体テーブルを長方形
で、関連テーブルを菱形で、実体テーブルと関連テーブ
ルの関係を線で結んで表す。各テーブルの項目を楕円で
表し各テーブルと線で結ぶ。特にキー項目については太
線の楕円で表す(プログラム名17、レコード名21、アイ
テム名23)。関連テーブルの項目は、関連テーブルに接
続する項目以外に、関連テーブルに接続する実体テーブ
ルのキーも含む。第4図の例では、‘プログラム'11と
‘レコード'13と‘アイテム'15の3つの実体テーブル
と、プログラムとプログラム中で参照更新されるレコー
ドの関係を表す‘プログラム−レコード'12関連テーブ
ルと、レコードとレコードに含まれるアイテムの関係を
表す‘レコード−・アイテム'14関連テーブル、プログ
ラムとプログラム中で参照更新されるアイテムの関係を
表す‘プログラム−アイテム'16関連テーブルの6つの
テーブルから構成される。‘プログラム−レコード'12
テーブルの項目は‘プログラム名'17、‘レコード名'2
1、‘参照更新区分'20である。
One embodiment of the database structure diagram is shown in FIG. 4th
The structure of the diagram is a well-known ER diagram (Entity Relationship mode)
This is described using l). The ER diagram classifies the tables that make up the database into entity tables and relationship tables that represent the relationship between entity tables. The entity table is represented by a rectangle, the relationship table is represented by a diamond, and the relationship between the entity table and the relationship table is represented by a line. . Items in each table are represented by ellipses and connected to each table by a line. In particular, key items are represented by bold ellipses (program name 17, record name 21, item name 23). The items of the related table include, in addition to the items connected to the related table, the keys of the entity table connected to the related table. In the example of FIG. 4, three entity tables of “program” 11, “record” 13 and “item” 15, and “program-record” 12 relation table showing the relationship between the program and the record to be referenced and updated in the program From the six tables, the "record-item" 14 relation table that indicates the relation between records and the items included in the record, and the "program-item" 16 relation table that indicates the relation between the program and the items that are referenced and updated in the program Be composed. 'Program-Record' 12
Table items are 'Program name'17,' Record name'2
1, 'Reference update classification' 20.

第4図のデータベース構造図のファイル形式を第5図
に示す。
FIG. 5 shows the file format of the database structure diagram of FIG.

ファイルはデータベース構造図の各要素の名称、要素
の種別、そして表示位置を記憶した要素テーブル51と、
各線の接続するテーブル名称、接続名称、そして表示位
置を記憶した線テーブル52とから構成される。線テーブ
ル52では実体テーブルとその項目との間の線、関連テー
ブルにつながる線の情報を記憶する。従って、実体テー
ブルと関連テーブルとの間の線は関連テーブルにつなが
る線として記憶される。
The file is an element table 51 storing the name of each element of the database structure diagram, the type of the element, and the display position,
The line table 52 stores a table name to be connected to each line, a connection name, and a display position. The line table 52 stores information on a line between the entity table and the item and a line connected to the related table. Therefore, the line between the entity table and the related table is stored as a line leading to the related table.

第2図のフローチャートを参照して、本発明のデータ
ベース構造定義文の生成手順を説明する。
The procedure for generating a database structure definition sentence according to the present invention will be described with reference to the flowchart of FIG.

データベース改造定義文自動生成手段4はデータベー
スの構造図を読み込み(100)、構造図の名称をスキー
マ名として、スキーマ定義文を生成する(101)。要素
テーブル51から要素を順に検索し(102)、要素が実体
テーブルならば(104)、実体テーブルの項目を線テー
ブル52から検索する(105)。第5図の実施例では、実
体テーブル‘プログラム’が最初に検索され、‘プログ
ラム’を線テーブル52から検索し、要素‘プログラム
名’が実体テーブルに接続していることがわかる。次に
‘プログラム名’がキー項目であることがわかる。検索
された項目の属性をデータ辞書記憶手段3から取得する
(107)。
The database remodeling definition sentence automatic generation means 4 reads the structure diagram of the database (100), and generates a schema definition sentence using the name of the structure diagram as a schema name (101). The elements are sequentially searched from the element table 51 (102). If the element is the entity table (104), the items of the entity table are searched from the line table 52 (105). In the embodiment of FIG. 5, the entity table 'program' is searched first, and 'program' is searched from the line table 52, and it can be seen that the element 'program name' is connected to the entity table. Next, you can see that 'program name' is a key item. The attribute of the searched item is acquired from the data dictionary storage unit 3 (107).

データ辞書は、各項目の名称,タイプ,長さを記憶し
たもので、その一実施例を第6図に示す。次に実体テー
ブルの他の項目を線テーブル52から検索する(108)。
第5図の実施例では、‘ステップ数’が次の項目として
検索される。実体テーブルの全ての項目について属性情
報を取得したら(106)、テーブル定義文を生成し(10
9)、次の要素を要素テーブル51から検索する(110)。
要素が関連テーブルならば(111)、関連テーブルに接
続する実体テーブルを線テーブル52から検索し(11
2)、接続する実体テーブルのキー項目を線テーブル52
から検索する(114)。第5図の実施例では‘プログラ
ム−レコード’が関連テーブルとして検索される。‘プ
ログラム−レコード’に接続する実体テーブルとして
‘プログラム’が検索され、要素‘プログラム名’が
‘プログラム’に接続していることがわかる。次に、
‘プログラム名’を要素テーブル51から検索し、‘プロ
グラム名’がキー項目であることがわかる。検索された
キー項目の属性をデータ辞書記憶手段3から取得し(11
6)、他のキー項目を線テーブル52から検索する(11
7)。実体テーブル‘プログラム’には、‘プログラム
名’の他にキー項目は存在しない。実体テーブルの全て
のキー項目について属性情報を取得したら(115)、関
連テーブルに接続する他の実体テーブルを線テーブル52
から検索し(118)、既に接続する他の実体テーブルが
なかったら(113)、関連テーブルに接続する項目を線
テーブル52から検索する(119)。第5図の実施例で
は、‘参照更新区分’が‘プログラム−レコード’の項
目として検索される。検索された項目の属性をデータ辞
書記憶手段3から取得し(121)、他の項目を線テーブ
ル52から検索する(122)。関連テーブルの全ての項目
について属性情報を取得したら(120)、テーブル定義
文を生成し(109)、次の要素を要素テーブル51から検
索する(110)。以上の処理を要素が存在するまで繰り
返す(103)。
The data dictionary stores the name, type, and length of each item, and one embodiment is shown in FIG. Next, another item of the entity table is searched from the line table 52 (108).
In the embodiment shown in FIG. 5, 'step number' is searched as the next item. When the attribute information is obtained for all the items of the entity table (106), a table definition statement is generated (10).
9) Then, the next element is searched from the element table 51 (110).
If the element is a related table (111), an entity table connected to the related table is searched from the line table 52 (11).
2) Connect the key items of the entity table to be connected to the line table 52
(114). In the embodiment shown in FIG. 5, 'program-record' is searched as a relation table. 'Program' is searched as an entity table connected to 'Program-Record', and it is found that the element 'Program Name' is connected to 'Program'. next,
The "program name" is searched from the element table 51, and it is found that the "program name" is a key item. The attribute of the searched key item is obtained from the data dictionary storage unit 3 (11).
6), another key item is searched from the line table 52 (11)
7). In the entity table 'program', there is no key item other than 'program name'. When the attribute information is obtained for all key items of the entity table (115), another entity table connected to the related table is changed to the line table 52.
(118), and if there is no other entity table to be connected (113), an item to be connected to the related table is searched from the line table 52 (119). In the embodiment of FIG. 5, the "reference update section" is searched for as an item of the "program-record". The attribute of the searched item is acquired from the data dictionary storage unit 3 (121), and another item is searched from the line table 52 (122). When the attribute information has been acquired for all items of the related table (120), a table definition statement is generated (109), and the next element is searched from the element table 51 (110). The above processing is repeated until an element exists (103).

このようにして生成されたデータベース構造定義文の
一実施例を第7図に示す。
FIG. 7 shows an embodiment of the database structure definition sentence generated in this way.

生成されたデータベース構造定義文を実行し、データ
ベース7を構築する。その際に、構造定義文生成に使わ
れた泥差ベース構造図をデータベース構造情報としたデ
ータベース構造情報記憶手段8に記憶する。
The generated database structure definition statement is executed to construct the database 7. At this time, the mud difference base structure diagram used for generating the structure definition sentence is stored in the database structure information storage means 8 as database structure information.

なお、上述の実施例ではテーブルと項目との関係をデ
ータベース構造図で定義したが、該関係を予めデータ辞
書記憶手段3に登録しておく方法も可能である。この場
合、データベース構造図は第8図に示すように、テーブ
ルとテーブルの関係だけを定義した図になる。一方、デ
ータ辞書記憶手段3は第6図に示すテーブルの他に、テ
ーブルと項目との関係を定義するテーブルが必要であ
る。そのようなテーブルを第9図に示す。データベース
構造定義文を自動生成する処理手順は、第2図に示した
フローチャートと同じである。
In the above-described embodiment, the relationship between the table and the item is defined in the database structure diagram. However, a method in which the relationship is registered in the data dictionary storage unit 3 in advance is also possible. In this case, the database structure diagram is a diagram in which only the relation between tables is defined as shown in FIG. On the other hand, the data dictionary storage means 3 needs a table that defines the relationship between the table and the item in addition to the table shown in FIG. Such a table is shown in FIG. The processing procedure for automatically generating the database structure definition statement is the same as the flowchart shown in FIG.

次に、構築したデータベースの操作命令文を自動生成
する本発明のデータベース管理手段6について、その処
理手順の一実施例を示す第10図のフローチャートを用い
て説明する。
Next, the database management means 6 of the present invention for automatically generating an operation command sentence of the constructed database will be described with reference to the flowchart of FIG. 10 showing one embodiment of the processing procedure.

まず、データベース構造情報をデータベース管理手段
6が読み込み、データベース構造図を画面上に表示する
(200)。操作対象、操作条件、操作命令を読み込む(2
01、202、203)。操作条件を付けた項目を持つテーブル
を第5図の線テーブル52から検索する(204)。操作条
件を付けたテーブルと操作対象のテーブルが異なる場合
には(205)、2つのテーブル間のパスを求める(20
6)。第11図の画面の実施例では、操作条件を付けたテ
ーブルが‘プログラム'11のテーブル、操作対象のテー
ブルが‘アイテム'15のテーブル、操作命令が検索命令
である場合を図示したもので、操作条件を付けたテーブ
ルと操作対象のテーブルが異なっている。
First, the database management unit 6 reads the database structure information and displays the database structure diagram on the screen (200). Read the operation target, operation conditions, and operation instructions (2
01, 202, 203). A table having items with operation conditions is searched from the line table 52 in FIG. 5 (204). When the table to which the operation condition is attached is different from the table to be operated (205), a path between the two tables is obtained (20).
6). In the embodiment of the screen of FIG. 11, the table with the operation condition is a table of 'program' 11, the table to be operated is a table of 'item' 15, and the operation command is a search command. The table to which the operation condition is set is different from the table to be operated.

そして、操作条件を浸けたテーブルと操作対象のテー
ブルの間のパスを求める処理手順を第12図に示す。開始
テーブルが関連テーブルの場合には、線テーブル52のテ
ーブル名称の中から関連テーブル名を検索し、関連テー
ブルに接続する実体テーブルを検索する。開始テーブル
が実体テーブルの場合には、線テーブル52の要素名称の
中から実体テーブル名を検索し、実体テーブルに接続す
る関連テーブルを検索する。上記の方法で、開始テーブ
ルに接続するテーブルを線テーブルから検索する(21
9)。初めは開始テーブルは検索条件を付けたテーブル
となる。第11図の例では、開始テーブルは‘プログラ
ム'11であり、開始テーブルに接続するテーブルが‘プ
ログラム−レコード'12のテーブルと‘プログラム−ア
イテム'16のテーブルが接続するテーブルとなる。次
に、接続するテーブルが検索対象のテーブルか否かを調
べ(221)、検索対象のテーブルである場合には検索パ
スとして記憶し(224)、開始テーブルに接続する他の
テーブルを検索する(225)。そうでない場合、接続す
るテーブルが、今までたどってきたパスの中に存在する
か否かを調べ(223)、存在する場合、つまり、たどっ
てきたパスがループを形成する場合、開始テーブルに接
続する他のテーブルを検索する(225)。ループを形成
しない場合、接続するテーブルを新しい開始テーブルと
して本ルーチンを再帰的に呼び出す(223)。
FIG. 12 shows a processing procedure for obtaining a path between the table in which the operation conditions are immersed and the table to be operated. When the start table is the related table, the related table name is searched from the table names of the line table 52, and the entity table connected to the related table is searched. When the start table is an entity table, the entity table name is searched from the element names of the line table 52, and a related table connected to the entity table is searched. With the above method, the table connected to the start table is searched from the line table (21
9). Initially, the start table is a table with search conditions. In the example of FIG. 11, the start table is “program” 11, and the table connected to the start table is the table connected to the “program-record” 12 table and the “program-item” 16 table. Next, it is checked whether the table to be connected is a table to be searched (221), and if it is a table to be searched, it is stored as a search path (224), and another table to be connected to the start table is searched ( 225). Otherwise, it is checked whether or not the table to be connected exists in the path that has been reached so far (223), and if it exists, that is, if the path that has been taken forms a loop, the connection to the start table is made. The other table to be searched is searched (225). If a loop is not formed, this routine is recursively called with the connected table as a new start table (223).

第11図の例では、まず、‘プログラム−レコード'12
のテーブルを開始点として本ルーチンを再帰的に呼び出
す。接続するテーブルとして‘レコード'13のを検索
し、再び本ルーチンを再帰的に呼び出す。これを繰り返
して、操作対象となる‘アイテム'15のテーブルにたど
りつく。‘プログラム−アイテム'16のテーブルの側か
らたどっても、操作対象となる‘アイテム15'のテーブ
ルにたどりつき、検査パスは2つ発見できる。
In the example of FIG. 11, first, 'program-record' 12
This routine is called recursively starting from the table of The 'record' 13 is searched as a table to be connected, and this routine is recursively called again. By repeating this, the operation reaches the table of the 'item' 15 to be operated. Even from the side of the table of “program-item” 16, it reaches the table of “item 15” to be operated, and two inspection paths can be found.

パスが2つ以上発見できた場合は(207)、利用者に
パスを選択させる(208)。次にパス中に存在するテー
ブルのキー項目を検索し、テーブル結合のための条件を
作成する(209)。テーブル結合のための条件とは、パ
ス中に存在するテーブルのキー項目を符号でむすび、そ
れらをAND条件で結合した条件である。利用者が‘プロ
グラム−アイテム'16のテーブルを含むパスを選択した
とすると‘(プログラム.プログラム名=プログラム−
アイテム.プログラム名)AND(プログラム−アイテ
ム.アイテム名=アイテム.アイテム名)’の条件を作
成する。
If two or more paths are found (207), the user is prompted to select a path (208). Next, a key item of a table existing in the path is searched, and a condition for joining the tables is created (209). The condition for joining tables is a condition in which key items of tables existing in the path are signed with signs, and they are joined by AND conditions. Assuming that the user selects the path including the table of 'program-item' 16 '(program.program name = program-
item. A program name) AND (program-item.item name = item.item name) 'condition is created.

次に操作命令の種類を調べ(210、212、214、216)、
操作命令に対応した命令文を生成する(211、213、21
5、217)。
Next, the type of the operation instruction is checked (210, 212, 214, 216).
Generate a statement corresponding to the operation instruction (211, 213, 21
5, 217).

生成された検索命令を第13図に示す。生成された命令
文を実行して(218)、結果を画面上に表示し、再びデ
ータベース構造図を画面上に表示することも可能であ
る。
The generated search command is shown in FIG. It is also possible to execute the generated statement (218), display the result on the screen, and display the database structure diagram again on the screen.

第14図は、第13図の検索命令を実行した検索結果を図
示したものであり、検索されたアイテム名とそのタイプ
が画面上に表示されている。
FIG. 14 illustrates a search result obtained by executing the search command of FIG. 13, and the searched item name and its type are displayed on the screen.

第15図は、挿入操作の実施例を示したもので、この実
施例では‘アイテム'15のテーブルにアイテム名‘data0
1'、タイプ‘char'、長さ‘12'のレコードを挿入する操
作を示している。
FIG. 15 shows an embodiment of the insert operation. In this embodiment, the item name 'data0
This shows an operation to insert a record of type 1 ', type' char ', and length' 12 '.

第16図は、複数レコードをまとめて挿入する操作の例
を示し、‘アイテム'15のテーブルに複数レコードを挿
入する操作を示す。‘アイテム'15のテーブルの登録画
面が別のウインドウに表示され、この登録画面で複数レ
コードを記述し登録する。
FIG. 16 shows an example of an operation of inserting a plurality of records at once, and shows an operation of inserting a plurality of records into a table of 'item'15. The registration screen of the table of 'item' 15 is displayed in another window, and multiple records are described and registered on this registration screen.

挿入対象のテーブルに接続するテーブルのキー項目に
登録済みの値を画面上に表示し、その中から利用者が選
択した値を、画面上で転記すれば、利用者のキー入力が
削減できる。
If the values registered in the key items of the table connected to the table to be inserted are displayed on the screen and the values selected by the user are transcribed on the screen, the key input by the user can be reduced.

第17図は、挿入処理手順を示すフローチャートであ
る。挿入物対象のテーブルとその項目名を入力する(30
0)。該テーブルに接続し該項目を項目とするテーブル
を線テーブル52から検索する(301)。テーブルが存在
するならば(302)、検索されたテーブルの項目値をデ
ータベース7から検索し(303)、検索された値を画面
上に表示する(304)。その中から利用者が選択した項
目値を入力し(305)、入力した値を挿入する項目欄に
表示する(306) 第18図は、関連テーブルである‘プログラム−レコー
ド'12にレコードを挿入する場合の画面例を示す。‘プ
ログラム−レコード'12のテーブルは3つの項目から成
り、その内、項目‘レコード名’に値を挿入する場合
に、画面右上に登録済みのキー項目値を画面上にメニュ
ーとして表示する。利用者はメニュー上から‘record0
3'の値を選択し、登録画面上で転記する。該項目が接続
するテーブルに存在しなければ、利用者のキー入力を読
み込み(307)、読み込んだ値を表示する。
FIG. 17 is a flowchart showing an insertion processing procedure. Enter the table to insert and its item name (30
0). The line table 52 is searched for a table connected to the table and using the item as an item (301). If the table exists (302), the item value of the searched table is searched from the database 7 (303), and the searched value is displayed on the screen (304). The user inputs the item value selected by the user (305) and displays it in the item column for inserting the input value (306). FIG. The following shows an example of the screen when performing the operation. The table of the "program-record" 12 is composed of three items. When a value is inserted in the item "record name", registered key item values are displayed as a menu on the upper right of the screen. The user can select 'record0' from the menu
Select the value of 3 'and post it on the registration screen. If the item does not exist in the connected table, the key input of the user is read (307), and the read value is displayed.

また、挿入対象のテーブルが実体テーブルであり、該
実体テーブルに接続する関連テーブルに既にレコードが
登録されている場合には、該関連テーブルに登録されて
いる値を実体テーブルに自動的に登録できる。
If the table to be inserted is an entity table and a record is already registered in a related table connected to the entity table, the value registered in the related table can be automatically registered in the entity table. .

第19図は、登録処理手順の一実施例を示すフローチャ
ートである。まず、挿入対象となる実体テーブルのキー
項目名と該実体テーブルに接続する関連テーブルをデー
タベース構造図から検索する(400、401)。接続する関
連テーブルのレコードを検索し、該実体テーブルのキー
項目となる項目の値を取得する(403)。検索されたレ
コードの項目値が、該実体テーブルに未登録ならば(40
5)、該実体テーブルのキー項目値として登録する(40
6)。関連テーブルの最後のレコードまで検索し(40
7)、該実体テーブルに登録していく(404)。レコード
がなくなったならば、該実体テーブルに接続する他の関
連テーブルを検索して(408)、上記手順を繰り返す。
FIG. 19 is a flowchart showing an embodiment of a registration processing procedure. First, a key item name of an entity table to be inserted and a related table connected to the entity table are searched from the database structure diagram (400, 401). The record of the related table to be connected is searched, and the value of the item serving as the key item of the entity table is obtained (403). If the item value of the found record is not registered in the entity table (40
5), register as the key item value of the entity table (40
6). Search up to the last record of the related table (40
7), it is registered in the entity table (404). When there are no more records, another related table connected to the entity table is searched (408), and the above procedure is repeated.

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

以上説明したように、本発明のデータベース操作方法
によれば、次のような効果を得ることができる。
As described above, according to the database operation method of the present invention, the following effects can be obtained.

利用者が作成したデータベースの構造を定義した仕様
書からスキーマ定義文、テーブル定義文を自動的に生成
することができるので、これらの定義文を作成する時間
を大幅に短縮できるとともに、項目属性データ辞書で一
元的に管理することにより項目属性の整合性を保持する
ことが出来る。
Since schema definition statements and table definition statements can be automatically generated from specifications that define the structure of the database created by the user, the time to create these definition statements can be significantly reduced, and the item attribute data By centrally managing with a dictionary, consistency of item attributes can be maintained.

データベース構造を画面上に表示し、その上でデータ
ベースの操作ができるので、データベースの構造を考え
ながら、データベースの操作をする必要がない。
Since the database structure is displayed on the screen and the database can be operated on the screen, there is no need to operate the database while considering the database structure.

テーブルにレコードを挿入する際に、挿入対象となる
テーブルに接続するテーブルのキー項目の値を画面上に
表示し、画面上で転記できるので、データベースにレコ
ードを挿入する際に、キー入力をしなくて済み、誤入力
が防止される。
When inserting a record into a table, the value of the key item of the table connected to the table to be inserted is displayed on the screen and can be transcribed on the screen. This eliminates the need for erroneous input.

挿入対象となるテーブルが実体テーブルの場合には、
該実体テーブルに接続する関連テーブルのレコード値を
自動的に実体テーブルに登録できるので、登録の手間が
省け、データの記入洩れや、誤入力を防止できる。
If the table to be inserted is an entity table,
Since the record value of the related table connected to the entity table can be automatically registered in the entity table, the trouble of registration can be saved, and omission of data entry and erroneous input can be prevented.

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

第1図は、本発明のシステム構成を示すブロック図、 第2図は、本発明のデータベース構造定義文を自動生成
するための処理手順を示すフローチャート、 第3図は、本発明が適用されるハードウェア構成図、 第4図は、本発明のデータベース構造図、 第5図は、本発明のデータベース構造図のファイル形式
を示す図、 第6図は本発明のデータ辞書の一実施例を示す図、 第7図は、本発明によって生成されたデータベース構造
定義文の一実施例を示す図、 第8図は、本発明にかかるデータベース構造図の他の実
施例、 第9図は、本発明のデータ辞書の他の一実施例を示す
図、 第10図は、本発明のデータベース管理手段がデータベー
ス操作命令文を自動生成する処理手順を示すフローチャ
ート、 第11図は、本発明の一実施例にかかる検索操作画面を示
す図、 第12図は、本発明のテーブル間のパスを求めるための処
理手順を示すフローチャート、 第13図は、本発明によって生成された検索命令の一実施
例を示す図、 第14図は、本発明によって実行された検索結果を示す
図、 第15図は、本発明の挿入操作を示す図、 第16図は、本発明の複数レコードを挿入する場合の画面
を示す図、 第17図は、本発明の他の実施例である挿入処理手順を示
すフローチャート、 第18図は、本発明のレコードを挿入する場合の画面を示
す図、 第19図は、本発明の登録処理手順を示すフローチャート
である。 図中、1……データベース構造図編集手段、2……デー
タベース構造図記憶手段、3……データ辞書記憶手段、
4……データベース構造定義文自動生成手段、5……デ
ータベース構造定義文記憶手段、6データベース管理手
段、7データベース、8……データベース構造情報記憶
手段、9……ディスプレイ、10……入力装置。
FIG. 1 is a block diagram showing a system configuration of the present invention, FIG. 2 is a flowchart showing a processing procedure for automatically generating a database structure definition sentence of the present invention, and FIG. 3 is an application of the present invention. FIG. 4 is a diagram showing a file structure of the database structure diagram of the present invention. FIG. 6 is a diagram showing an embodiment of the data dictionary of the present invention. FIG. 7, FIG. 7 is a diagram showing an embodiment of a database structure definition sentence generated by the present invention, FIG. 8 is another embodiment of the database structure diagram according to the present invention, and FIG. FIG. 10 is a diagram showing another embodiment of the data dictionary of the present invention. FIG. 10 is a flowchart showing a processing procedure for automatically generating a database operation command sentence by the database management means of the present invention. FIG. 11 is an embodiment of the present invention. Search operations on FIG. 12 is a diagram showing a screen, FIG. 12 is a flowchart showing a processing procedure for obtaining a path between tables of the present invention, FIG. 13 is a diagram showing an embodiment of a search command generated by the present invention, FIG. FIG. 15 is a diagram showing a search result executed according to the present invention, FIG. 15 is a diagram showing an insertion operation of the present invention, FIG. 16 is a diagram showing a screen for inserting a plurality of records of the present invention, FIG. FIG. 17 is a flowchart showing an insertion processing procedure according to another embodiment of the present invention. FIG. 18 is a view showing a screen for inserting a record of the present invention. FIG. 19 is a registration processing procedure of the present invention. It is a flowchart which shows. In the figure, 1... Database structure diagram editing means, 2... Database structure diagram storage means, 3.
4 ... Database structure definition sentence automatic generation means, 5 ... Database structure definition sentence storage means, 6 Database management means, 7 databases, 8 ... Database structure information storage means, 9 ... Display, 10 ... Input device.

フロントページの続き (56)参考文献 特開 昭63−174128(JP,A) 特開 平1−116766(JP,A) 特開 平1−169675(JP,A) 特開 平1−200437(JP,A) 特開 昭63−280373(JP,A) (58)調査した分野(Int.Cl.6,DB名) G06F 12/00 Continuation of the front page (56) References JP-A-63-174128 (JP, A) JP-A-1-116766 (JP, A) JP-A-1-169675 (JP, A) JP-A-1-200437 (JP) , A) JP-A-63-280373 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) G06F 12/00

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】データベースの構造を図形を用いて定義す
る仕様書を、データベース構造図編集手段によって作成
し、作成された前記仕様書をデータベース構造定義分自
動生成手段で読み込み、前記仕様書の名称をスキーマ名
にしてスキーマ定義文を自動生成し、前記仕様書で記述
されたテーブルの項目の属性をデータ辞書記憶手段から
検索して、テーブル定義文を自動生成することを特徴と
するデータベース操作方法。
1. A specification which defines the structure of a database by using graphics is created by a database structure diagram editing means, and the created specification is read by a database structure definition automatic generation means, and the name of the specification Automatically generating a schema definition sentence by setting a table name as a schema name, searching an attribute of a table item described in the specification from the data dictionary storage means, and automatically generating a table definition sentence. .
【請求項2】請求項1記載のデータベース操作方法にお
いて、データベース管理手段は前記生成されたスキーマ
定義文、テーブル定義文を実行してデータベースを構築
し、前記仕様書をデータベース構造情報として記憶する
ことを特徴とするデータベース操作方法。
2. The database operation method according to claim 1, wherein the database management means executes the generated schema definition statement and table definition statement to construct a database, and stores the specification as database structure information. A database operation method characterized by the following.
【請求項3】請求項2記載のデータベース操作方法にお
いて、前記データベース管理手段は前記データベース構
造情報を読込み、データベース構造図を画面上に表示
し、画面上で指定された操作対象、操作条件、操作命令
を読み込み、データベース操作文を生成することを特徴
とするデータベース操作方法。
3. The database operation method according to claim 2, wherein said database management means reads said database structure information, displays a database structure diagram on a screen, and specifies an operation target, an operation condition, and an operation specified on the screen. A database operation method comprising reading an instruction and generating a database operation statement.
【請求項4】請求項3記載のデータベース操作方法にお
いて、生成されたデータベース操作文を実行し、操作結
果を画面上に表示することを特徴とするデータベース操
作方法。
4. The database operation method according to claim 3, wherein the generated database operation statement is executed, and the operation result is displayed on a screen.
【請求項5】請求項1記載のデータベース操作方法にお
いて、利用者がテーブルにレコードを登録する際に、デ
ータベースの構造上、前記テーブルに接続するテーブル
を前記データベース構造情報から検索し、前記接続する
テーブルの項目値を画面上に表示し、その中から利用者
が指定した値を画面上で転記することを特徴とするデー
タベース操作方法。
5. A database operating method according to claim 1, wherein when a user registers a record in a table, a table to be connected to said table is searched from said database structure information due to the structure of the database and said connection is made. A database operation method comprising displaying item values of a table on a screen, and transcribing a value specified by a user from the table values on the screen.
【請求項6】請求項1記載のデータベース操作方法にお
いて、データベースのテーブルを、実体テーブルと、実
体テーブル間の関係を定義した関連テーブルとで構成
し、実体テーブルに接続する関連テーブルを前記データ
ベース構造情報から検索し、前記関連テーブルに登録済
みのレコード値を、前記実体テーブルのキー項目値とし
て自動的に登録することを特徴とするデータベース操作
方法。
6. The database operation method according to claim 1, wherein a table of the database comprises an entity table and an association table defining a relationship between the entity tables, and the association table connected to the entity table is a database structure. A database operation method, wherein information is retrieved from information and a record value registered in the related table is automatically registered as a key item value of the entity table.
JP1212763A 1989-08-17 1989-08-17 Database operation method Expired - Lifetime JP2929542B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1212763A JP2929542B2 (en) 1989-08-17 1989-08-17 Database operation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1212763A JP2929542B2 (en) 1989-08-17 1989-08-17 Database operation method

Publications (2)

Publication Number Publication Date
JPH0375846A JPH0375846A (en) 1991-03-29
JP2929542B2 true JP2929542B2 (en) 1999-08-03

Family

ID=16627997

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1212763A Expired - Lifetime JP2929542B2 (en) 1989-08-17 1989-08-17 Database operation method

Country Status (1)

Country Link
JP (1) JP2929542B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07287652A (en) * 1994-04-18 1995-10-31 Nec Corp Automatic generation system for db extraction processing program

Also Published As

Publication number Publication date
JPH0375846A (en) 1991-03-29

Similar Documents

Publication Publication Date Title
JP3123025B2 (en) Cut and paste filter in data processing system
US5513305A (en) System and method for documenting and displaying computer program code
US8060519B2 (en) Ontology-integration-position specifying apparatus, ontology-integration supporting method, and computer program product
KR101323011B1 (en) Command user interface for displaying selectable functionality controls in a database application
US6035300A (en) Method and apparatus for generating a user interface from the entity/attribute/relationship model of a database
US20080091707A1 (en) Method and medium for managing data
JPH01180062A (en) Document shaping device
JP2929542B2 (en) Database operation method
JP2000276338A (en) Method and system for visual programming, and recording medium for visual programming
US7562091B2 (en) Cascade feature for creating records in a database
JP3167412B2 (en) Database search processor
JP2004126680A (en) Sql masking type database access method and computer program
KR0165510B1 (en) Table of database management system
JP2798147B2 (en) Database input / output method and input / output device
JPH0424733A (en) Structural drawing editing process system for program
JP2000322295A (en) Method and device for programming support for data base stored sub-program
JPH0378861A (en) Process system for transformation of man-machine interface into parts
JPH11203031A (en) Data input device and its control method and storage medium
JP2000259461A (en) Data connection system and computer readable recording medium with program recorded thereon
JP2990314B2 (en) Data management device
JPH07129445A (en) Method for generating logical configuration of data base file
JP2922536B2 (en) Logic circuit diagram processing apparatus and logic circuit diagram display method
JPH11219372A (en) Data categorizing device
JPS62202243A (en) Duplex management system for data base file
Mallet et al. User Guide of the Workload Analyser Tool within IMSE

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080521

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090521

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100521

Year of fee payment: 11

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100521

Year of fee payment: 11