JP5023038B2 - Program generating program and program generating apparatus - Google Patents

Program generating program and program generating apparatus Download PDF

Info

Publication number
JP5023038B2
JP5023038B2 JP2008276833A JP2008276833A JP5023038B2 JP 5023038 B2 JP5023038 B2 JP 5023038B2 JP 2008276833 A JP2008276833 A JP 2008276833A JP 2008276833 A JP2008276833 A JP 2008276833A JP 5023038 B2 JP5023038 B2 JP 5023038B2
Authority
JP
Japan
Prior art keywords
program
data
definition information
structure definition
table structure
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.)
Active
Application number
JP2008276833A
Other languages
Japanese (ja)
Other versions
JP2010108055A (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.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Solutions Corp
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 Toshiba Corp, Toshiba Solutions Corp filed Critical Toshiba Corp
Priority to JP2008276833A priority Critical patent/JP5023038B2/en
Publication of JP2010108055A publication Critical patent/JP2010108055A/en
Application granted granted Critical
Publication of JP5023038B2 publication Critical patent/JP5023038B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、データベースに対して処理を行うためのプログラムを自動的に生成するプログラム生成用プログラム及びこのプログラムが動作するプログラム生成装置に関する。   The present invention relates to a program generation program that automatically generates a program for performing processing on a database, and a program generation apparatus on which the program operates.

近年、例えばデータベースに対するデータの生成、読み取り、更新または削除等の処理を行うためのプログラム(アプリケーション)を自動生成する装置(以下、プログラム生成装置と表記)が開発されている。   In recent years, for example, an apparatus (hereinafter referred to as a program generation apparatus) that automatically generates a program (application) for performing processing such as data generation, reading, update, or deletion for a database has been developed.

上記したようにプログラムを自動生成する技術として、例えばデータベースに接続し、既存のテーブル情報を利用してプログラムを生成することができる技術が知られている。   As a technique for automatically generating a program as described above, for example, a technique for connecting to a database and generating a program using existing table information is known.

例えばデータベース操作を行うアプリケーション開発において、データベースアクセス部分のプログラムを作成の自動化に関する技術(以下、第1の先行技術と表記)が開示されている(例えば、特許文献1を参照)。この第1の先行技術によれば、データベース操作の種類である新規(生成)・更新・削除・読み取りの各機能毎に条件を付与し、総合的にデータを処理することが可能となる。この第1の先行技術においては、データベースファイルを読み込み、データベースにアクセスするプログラムが自動生成される。   For example, in application development for performing database operations, a technique related to automation of creating a database access part program (hereinafter referred to as a first prior art) is disclosed (for example, see Patent Document 1). According to this first prior art, it is possible to process data comprehensively by assigning conditions to each function of new (generation), update, deletion, and reading, which are types of database operations. In the first prior art, a program for reading a database file and accessing the database is automatically generated.

また、例えば指定情報に基づいてプログラムのソースコードを生成する技術(以下、第2の先行技術と表記)が開示されている(例えば、特許文献2を参照)。この第2の先行技術によれば、アプリケーションプログラムの開発者に対しては、プルダウンリストを桁毎に分割する、分割しないを自動判別し、長い選択リストを作らずに短い選択リストから数値を選択入力できる機能が提供されている。そして、プルダウンリストから目的の数値を容易に選択入力可能なプログラムを、プルダウンリスト長や画面状況を考慮せず、簡便な定義情報のみで生成することができる仕組みも提供されている。また、アプリケーションプログラムの使用者に対しては、プルダウンリストを桁毎に分割する、分割しないが自動判別され、短い選択リストから目的の数値を容易に選択する仕組みを提供することが可能となる機能が提供されている。つまり、この第2の先行技術によれば、プログラムを自動生成する際に、生成されたプログラムの利用者(使用者)がプルダウンリストから目的として数値を容易に選択できるような入力画面(を表示するためのプログラム)を生成することができる。
特開平11−53391号公報 特開2008−52386号公報
In addition, for example, a technique for generating a source code of a program based on designation information (hereinafter referred to as second prior art) is disclosed (for example, see Patent Document 2). According to this second prior art, for the application program developer, the pull-down list is automatically divided for each digit and not divided, and a numerical value is selected from a short selection list without creating a long selection list. A function that can be entered is provided. There is also provided a mechanism that can generate a program that can easily select and input a target numerical value from a pull-down list with only simple definition information without considering the length of the pull-down list and the screen status. In addition, it is possible to provide a mechanism for the application program user to divide the pull-down list for each digit or not to divide it automatically, and to easily select a desired numerical value from a short selection list. Is provided. In other words, according to the second prior art, when a program is automatically generated, an input screen (in which a user (user) of the generated program can easily select a numerical value as a purpose from a pull-down list is displayed. To generate a program).
Japanese Patent Laid-Open No. 11-53391 JP 2008-52386 A

しかしながら、上記したプログラム生成装置では、例えば動作するプログラムを生成するためには詳細な物理仕様の入力が必要である。また、物理仕様の入力がない場合は一部のプログラムしか自動生成することができない。   However, in the above-described program generation device, for example, in order to generate an operating program, it is necessary to input detailed physical specifications. If there is no input of physical specifications, only a part of programs can be automatically generated.

また、例えば生成されたプログラムの利用者が入力画面からデータを入力する際に、当該入力されるデータがテーブルの定義に起因する制約条件を満たすか否かのチェックや、既存のデータに基づいて入力補助等を行うためには、そのためのプログラムを別に作成して処理を追加する必要がある。   For example, when the user of the generated program inputs data from the input screen, it is checked whether the input data satisfies a constraint condition caused by the definition of the table, or based on existing data In order to perform input assistance or the like, it is necessary to create a separate program and add processing.

更に、データベースのテーブル構造の定義により、各項目への入力可能なデータの範囲または値には制約が生じるが、プログラム(アプリケーション)の運用上の制約はデータベースのテーブル構造定義による制約だけでは不十分である。このため、入力補助を行うプログラムを別途作成して処理を追加する必要がある。   In addition, the definition of the database table structure causes restrictions on the range or value of data that can be entered in each item. However, restrictions on the operation of the program (application) are not limited by the database table structure definition alone. It is. For this reason, it is necessary to separately create a program for assisting input and add processing.

上記したように第1の先行技術においては、データベース操作の種類である新規・更新・削除・読み取りの各機能毎に条件を付与し総合的にデータを処理することが可能となる。しかしながら、第1の先行技術においては、各機能(新規・更新・削除・読み取り)のいずれの処理を生成するかは予め指定する必要がある。また、第1の先行技術においては、生成されたプログラムの利用者による入力データの条件も関数毎に指定する必要がある。このように関数毎に指定する必要があると、「入力データの条件を変える」などの保守の際に、変更する関数にそれぞれ変更を加える必要があるため、保守性が悪くなるという弊害も出てくる。   As described above, in the first prior art, it is possible to process data comprehensively by assigning conditions to each function of new / update / delete / read which are types of database operations. However, in the first prior art, it is necessary to specify in advance which process of each function (new, update, delete, and read) is to be generated. In the first prior art, it is also necessary to specify the condition of input data by the user of the generated program for each function. If it is necessary to specify for each function in this way, it is necessary to make changes to each function to be changed when performing maintenance such as `` changing the input data conditions ''. Come.

また、上記したように第2の先行技術においては、生成されたプログラムの利用者がプルダウンリストから目的として数値を容易に選択できる入力画面を生成することができる。つまり、第2の先行技術においては、上記した入力補助を行うことが可能である。しかしながら、第2の先行技術では、プルダウンリストの項目の数値間隔のような利用者の入力補助(支援)処理生成のための条件は予め指定しておく必要がある。   As described above, in the second prior art, it is possible to generate an input screen that allows a user of the generated program to easily select a numerical value as a purpose from a pull-down list. That is, in the second prior art, it is possible to perform the input assistance described above. However, in the second prior art, conditions for generating user input assistance (support) processing such as the numerical interval of items in the pull-down list must be specified in advance.

そこで、本発明の目的は、プログラムを自動生成する際に、当該生成されるプログラムの利用者の入力を補助するための入力補助プログラムを生成することが可能なプログラム生成用プログラム及びプログラム生成装置を提供することにある。   Accordingly, an object of the present invention is to provide a program generation program and a program generation apparatus capable of generating an input auxiliary program for assisting a user input of the generated program when the program is automatically generated. It is to provide.

本発明の1つの態様によれば、データベースに格納されているデータを保持するテーブルに対して処理を行うためのプログラムを利用する利用者のデータ入力を補助するための入力補助プログラムの生成に用いられるテンプレートを当該テーブルに保持されるデータの種類に対応付けて予め格納するテンプレート格納手段とテーブル構造定義情報格納手段とを有する外部記憶装置と、当該外部記憶装置を利用するコンピュータとから構成されるプログラム生成装置において、前記コンピュータによって実行されるプログラム生成用プログラムであって、前記コンピュータに、前記データベースに格納されているテーブルの構造を示すテーブル情報であって、当該テーブルに保持されるデータの種類を含むテーブル情報及び当該テーブルに保持されているデータ前記データベースに格納されている当該テーブルから取得するステップと、前記取得されたデータを解析するステップと、前記取得されたテーブル情報によって示されるテーブルの構造及び前記解析結果に基づいて、当該テーブル情報に含まれるデータの種類及び当該テーブルに保持されるデータの範囲を含むテーブル構造定義情報を生成するステップと、前記生成されたテーブル構造定義情報を前記テーブル構造定義情報格納手段に格納するステップと、前記テーブル構造定義情報格納手段に格納されたテーブル構造定義情報に含まれるデータの範囲を、当該テーブル構造定義情報に含まれるデータの種類に対応付けて前記テンプレート格納手段に格納されているテンプレートに当てはめることによって入力チェックルールプログラムを生成するステップを実行させるためのプログラム生成用プログラムが提供される。
According to one aspect of the present invention, it is used to generate an input auxiliary program for assisting a user to input data using a program for performing processing on a table holding data stored in a database. An external storage device having template storage means and table structure definition information storage means for storing in advance a template to be associated with the type of data held in the table, and a computer using the external storage device In the program generation apparatus, a program generation program executed by the computer, the table information indicating the structure of the table stored in the database in the computer, the type of data held in the table holding the table information and the table including The data that is, a step of acquiring from said table stored in said database, parsing the acquired data, based on the structure and the analysis results of the table indicated by the obtained table information Generating table structure definition information including the type of data included in the table information and the range of data held in the table, and storing the generated table structure definition information in the table structure definition information storage unit. The step of storing and the range of data included in the table structure definition information stored in the table structure definition information storage unit are stored in the template storage unit in association with the type of data included in the table structure definition information. input check by fitting in with templates Program for producing a program for executing the steps of generating Lumpur program is provided.

本発明によれば、プログラムを自動生成する際に、当該生成されるプログラムの利用者の入力を補助するための入力補助プログラムを生成することを可能とする。   According to the present invention, when a program is automatically generated, it is possible to generate an input assistance program for assisting the user's input of the generated program.

以下、図面を参照して、本発明の各実施形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[第1の実施形態]
まず、図1及び図2を参照して、本発明の第1の実施形態について説明する。図1は、本実施形態に係るプログラム生成装置のハードウェア構成を示すブロック図である。図1に示すように、コンピュータ10は、例えばハードディスクドライブ(HDD:Hard Disk Drive)のような外部記憶装置20と接続されている。この外部記憶装置20は、コンピュータ10によって実行されるプログラム21を格納する。コンピュータ10及び外部記憶装置20は、プログラム生成装置30を構成する。
[First Embodiment]
First, a first embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram illustrating a hardware configuration of the program generation apparatus according to the present embodiment. As shown in FIG. 1, the computer 10 is connected to an external storage device 20 such as a hard disk drive (HDD). The external storage device 20 stores a program 21 executed by the computer 10. The computer 10 and the external storage device 20 constitute a program generation device 30.

図2は、図1に示すプログラム生成装置30の主として機能構成を示すブロック図である。プログラム生成装置30は、例えば各種データを保持するテーブルを例えばスキーマ名毎に格納するデータベース40と接続されている。   FIG. 2 is a block diagram mainly showing a functional configuration of the program generation apparatus 30 shown in FIG. The program generation device 30 is connected to a database 40 that stores, for example, a table holding various data, for example, for each schema name.

図2に示すように、プログラム生成装置30は、全体制御部31、テーブル情報取得部32、データ項目仕様生成部33、プログラム生成部34及び入力チェックルール生成部35を含む。本実施形態において、これらの各部31乃至35は、図1に示すコンピュータ10が外部記憶装置20に格納されているプログラム(プログラム生成用プログラム)21を実行することにより実現されるものとする。このプログラム21は、コンピュータ読み取り可能な記憶媒体に予め格納して頒布可能である。また、このプログラム21が例えばネットワークを介してコンピュータ10にダウンロードされても構わない。   As illustrated in FIG. 2, the program generation device 30 includes an overall control unit 31, a table information acquisition unit 32, a data item specification generation unit 33, a program generation unit 34, and an input check rule generation unit 35. In the present embodiment, these units 31 to 35 are realized by the computer 10 shown in FIG. 1 executing the program (program generation program) 21 stored in the external storage device 20. This program 21 can be stored in advance in a computer-readable storage medium and distributed. The program 21 may be downloaded to the computer 10 via, for example, a network.

また、プログラム生成装置30は、テーブル構造定義情報格納部22及び入力チェックルールテンプレート格納部23を有する。本実施形態において、テーブル構造定義情報格納部22及び入力チェックルールテンプレート格納部23は、例えば外部記憶装置20に格納される。   Further, the program generation device 30 includes a table structure definition information storage unit 22 and an input check rule template storage unit 23. In the present embodiment, the table structure definition information storage unit 22 and the input check rule template storage unit 23 are stored in, for example, the external storage device 20.

全体制御部31は、例えばプログラム生成装置30のユーザ(以下、管理者と表記)の操作に応じて、データベース接続情報を入力する。このデータベース接続情報は、例えばURI(Uniform Resource Identifier)を含む。   The overall control unit 31 inputs database connection information in accordance with, for example, an operation of a user (hereinafter referred to as an administrator) of the program generation device 30. This database connection information includes, for example, a URI (Uniform Resource Identifier).

全体制御部31は、テーブル情報取得部32に作用し、管理者の操作(指示)に応じてデータベース40からテーブル情報を取得するように指示する。また、全体制御部31は、プログラム生成部34に作用し、管理者の操作に応じてデータベース40に対して一連のCRUD処理(生成・読み取り・更新・削除)を行うためのプログラム(以下、本体プログラムと表記)を生成するように指示する。   The overall control unit 31 acts on the table information acquisition unit 32 and instructs to acquire table information from the database 40 in accordance with an operation (instruction) of the administrator. The overall control unit 31 operates on the program generation unit 34 and performs a series of CRUD processing (generation / reading / update / deletion) on the database 40 in accordance with the operation of the administrator (hereinafter referred to as a main body). To generate a program).

テーブル情報取得部32は、全体制御部31からの指示に応じて、データベース40に格納されているテーブルのテーブル名を取得する。この取得されたテーブル名は、例えば管理者に対して表示される。   The table information acquisition unit 32 acquires the table name of the table stored in the database 40 in response to an instruction from the overall control unit 31. The acquired table name is displayed to the administrator, for example.

また、テーブル情報取得部32は、管理者によって指定(選択)されたテーブルの構造を示すテーブル情報を、データベース40に格納されている当該テーブルから取得する。このテーブル情報には、例えばテーブル名、テーブルに保持されるデータの種類(型)及び当該データの制約等が含まれる。この型には、例えばVARCHAR2型(文字データ)、NUMBER型(数値データ)またはTIMESTAMP型(日付データ)等が含まれる。また、データの制約には、例えばデータの文字数または桁数等が含まれる。   The table information acquisition unit 32 acquires table information indicating the structure of the table designated (selected) by the administrator from the table stored in the database 40. This table information includes, for example, the table name, the type (type) of data held in the table, restrictions on the data, and the like. This type includes, for example, a VARCHAR2 type (character data), a NUMBER type (numeric data), a TIMESTAMP type (date data), and the like. The data constraint includes, for example, the number of characters or the number of digits of data.

データ項目仕様生成部33は、テーブル情報取得部32によって取得されたテーブル情報によって示されるテーブルの構造に基づいて、当該テーブルに保持されるデータの範囲を含むテーブル構造定義情報を生成する。このテーブル構造定義情報は、テーブル情報取得部32によって取得されたテーブル情報に、当該テーブル情報によって示されるテーブルの構造において当該テーブルに保持されるデータの範囲が追加されたものである。このデータの範囲は、テーブル情報取得部32によって取得されたテーブル情報に含まれるテーブルに保持されるデータの制約等に基づいて定められる。   Based on the table structure indicated by the table information acquired by the table information acquisition unit 32, the data item specification generation unit 33 generates table structure definition information including a range of data held in the table. The table structure definition information is obtained by adding the range of data held in the table in the table structure indicated by the table information to the table information acquired by the table information acquisition unit 32. The range of this data is determined based on the restriction of data held in the table included in the table information acquired by the table information acquisition unit 32.

データ項目仕様生成部33は、生成されたテーブル構造定義情報をテーブル構造定義情報格納部22に格納する。   The data item specification generation unit 33 stores the generated table structure definition information in the table structure definition information storage unit 22.

プログラム生成部34は、全体制御部31の指示に応じて、上記した本体プログラムを生成する処理を実行する。プログラム生成部34は、テーブル構造定義情報格納部22に格納されたテーブル構造定義情報に基づいて本体プログラムを生成する。この本体プログラムは、例えばWebアプリケーションのプログラムである。   In response to an instruction from the overall control unit 31, the program generation unit 34 executes processing for generating the main body program described above. The program generation unit 34 generates a main body program based on the table structure definition information stored in the table structure definition information storage unit 22. This main body program is, for example, a web application program.

このプログラム生成部34によって生成されたプログラム(本体プログラム)は、例えば当該プログラムを利用するユーザ(以下、利用者と表記)の端末等において用いられる(実行される)。   The program (main program) generated by the program generation unit 34 is used (executed) in a terminal of a user (hereinafter referred to as a user) who uses the program, for example.

入力チェックルールテンプレート格納部23には、プログラム生成部34によって生成される本体プログラムを利用する利用者のデータ入力を補助するためのプログラム(以下、入力補助プログラムと表記)の生成に用いられるテンプレートが予め格納される。このテンプレートは、例えばXML(eXtensible Markup Language)形式で、データベース40に格納されているテーブルに保持されるデータの種類(つまり、型)毎に対応付けて入力チェックルールテンプレート格納部23に格納されている。   The input check rule template storage unit 23 includes a template used to generate a program for assisting a user to input data using the main body program generated by the program generation unit 34 (hereinafter referred to as an input auxiliary program). Stored in advance. This template is stored in the input check rule template storage unit 23 in association with each type of data (that is, type) held in a table stored in the database 40 in, for example, XML (eXtensible Markup Language) format. Yes.

入力チェックルール生成部35は、テーブル構造定義情報格納部22に格納されたテーブル構造定義情報に含まれるデータの範囲を、入力チェックルールテンプレート格納部23に格納されているテンプレートに当てはめることによって入力補助プログラムを生成する。入力チェックルール生成部35は、テーブル構造定義情報格納部22に格納されたテーブル構造定義情報に含まれるデータの範囲外のデータ入力がされた場合に、当該データ入力をエラーとする処理と行うための入力チェックルール(入力補助ルール)のプログラム(以下、入力チェックルールプログラムと表記)を入力補助プログラムとして生成する。   The input check rule generation unit 35 applies the input assistance by applying the range of data included in the table structure definition information stored in the table structure definition information storage unit 22 to the template stored in the input check rule template storage unit 23. Generate a program. The input check rule generation unit 35 performs a process to make an error when the data input outside the range of the data included in the table structure definition information stored in the table structure definition information storage unit 22 is input. The input check rule (input support rule) program (hereinafter referred to as input check rule program) is generated as an input support program.

プログラム生成装置30は、上記したプログラム生成部34によって生成された本体プログラム及び入力チェックルール生成部35によって生成された入力チェックルールプログラム(入力補助プログラム)のセットを利用者に提供する。入力チェックルールプログラムは、例えば利用者によって用いられる端末等において本体プログラムに組み込まれる。これにより、利用者は、入力チェック機能が含まれるプログラムを利用することができる。   The program generation device 30 provides the user with a set of the main body program generated by the program generation unit 34 and the input check rule program (input auxiliary program) generated by the input check rule generation unit 35. The input check rule program is incorporated into the main body program in, for example, a terminal used by a user. Thereby, the user can use the program including the input check function.

図3は、図2に示すテーブル情報取得部32によって取得されるテーブル情報のデータ構造の一例を示す。   FIG. 3 shows an example of the data structure of the table information acquired by the table information acquisition unit 32 shown in FIG.

図3に示すように、テーブル情報には、テーブル名、カラム名、型、カラム属性及び当該カラム属性の値(カラム属性値)が対応付けて含まれている。カラム属性及びカラム属性値は、テーブルに保持されるデータの制約(例えば桁数等)を示す。   As shown in FIG. 3, the table information includes a table name, a column name, a type, a column attribute, and a value of the column attribute (column attribute value) in association with each other. The column attribute and the column attribute value indicate restrictions (for example, the number of digits) of data held in the table.

図3に示す例では、テーブル情報には、テーブル名「emp」に対応付けてカラム名「empNo」、「salary」及び「hiredate」が含まれている。また、テーブル情報には、カラム名「empNo」に対応付けて型「VARCHAR2(文字データ型)」が含まれている。更に、テーブル情報には、カラム名「salary」に対応付けて型「NUMBER(数値データ型)」、カラム名「hiredate」に対応付けて型「TIMESTAMP(日付データ型)」が含まれている。   In the example illustrated in FIG. 3, the table information includes column names “empNo”, “salary”, and “hiredate” in association with the table name “emp”. The table information includes a type “VARCHAR2 (character data type)” in association with the column name “empNo”. Further, the table information includes a type “NUMBER (numerical data type)” associated with the column name “salary” and a type “TIMESTAMP (date data type)” associated with the column name “hiredate”.

テーブル情報には、型「VARCHAR2」に対応付けてカラム属性「桁(文字数)」及びカラム属性値「x=200」が含まれている。これによれば、カラム名が「empNo」であり、型が「VARCHAR2」であるカラムのデータは、桁が「200(以下)」の文字データであることが示されている。   The table information includes a column attribute “digit (number of characters)” and a column attribute value “x = 200” in association with the type “VARCHAR2”. According to this, it is indicated that the data of the column whose column name is “empNo” and whose type is “VARCHAR2” is character data whose digit is “200 (below)”.

テーブル情報には、型「NUMBER」に対応付けてカラム属性「桁」及びカラム属性値「y=5」が含まれている。同様に、テーブル情報には、型「NUMBER」に対応付けてカラム属性「位取」及びカラム属性値「z=0」が含まれている。これによれば、カラム名が「salary」であり、型が「NUMBER」であるカラムのデータは、桁が「5(以下)」で、位取が「0」の数値データであることが示されている。   The table information includes a column attribute “digit” and a column attribute value “y = 5” in association with the type “NUMBER”. Similarly, the table information includes a column attribute “scale” and a column attribute value “z = 0” in association with the type “NUMBER”. According to this, it is shown that the data of the column whose column name is “salary” and whose type is “NUMBER” is numeric data whose digit is “5 (less than)” and whose scale is “0”. Has been.

図4は、図2に示すテーブル構造定義情報格納部22に格納されるテーブル構造定義情報のデータ構造の一例を示す。図4に示すテーブル構造定義情報は、上記した図3に示すテーブル情報によって示されるテーブルの構造に基づいてデータ項目仕様生成部33によって生成されたテーブル構造定義情報であるものとする。   FIG. 4 shows an example of the data structure of the table structure definition information stored in the table structure definition information storage unit 22 shown in FIG. The table structure definition information illustrated in FIG. 4 is table structure definition information generated by the data item specification generation unit 33 based on the table structure indicated by the table information illustrated in FIG. 3 described above.

図4に示すように、テーブル構造定義情報には、上記した図3に示すテーブル情報と比較して、型「VARCHAR2」に対応付けてカラム属性「最小文字長」及び「最大文字長」が追加されている。テーブル構造定義情報には、カラム属性「最小文字長」に対応付けてカラム属性値「0」が追加されている。また、テーブル構造定義情報には、カラム属性「最大文字長」に対応付けてカラム属性値「200」が追加されている。この「最小文字長」に対応付けられている「0」から「最大文字長」に対応付けられている「200」までが、カラム名が「empNo」であり、型が「VARCHAR2(文字データ型)」であるカラムにおけるデータの範囲(文字数)である。   As shown in FIG. 4, in the table structure definition information, column attributes “minimum character length” and “maximum character length” are added in association with the type “VARCHAR2” as compared with the table information shown in FIG. Has been. In the table structure definition information, a column attribute value “0” is added in association with the column attribute “minimum character length”. In the table structure definition information, a column attribute value “200” is added in association with the column attribute “maximum character length”. The column name is "empNo" from "0" associated with this "minimum character length" to "200" associated with "maximum character length", and the type is "VARCHAR2 (character data type ) ”Is the data range (number of characters) in the column.

このカラム属性「最小文字長」及びカラム属性値「0」、カラム属性「最大文字長」及びカラム属性値「200」は、型「VARCHAR2」に対応付けて図3に示すテーブル情報に含まれるカラム属性「桁」及びカラム属性値「x=200」に基づいて定められる。   The column attribute “minimum character length” and the column attribute value “0”, the column attribute “maximum character length” and the column attribute value “200” are associated with the type “VARCHAR2” and included in the table information shown in FIG. It is determined based on the attribute “digit” and the column attribute value “x = 200”.

また、テーブル構造定義情報には、上記した図3に示すテーブル情報と比較して、型「」に対応付けてカラム属性「最小値」及び「最大値」が追加されている。テーブル構造定義情報には、カラム属性「最小値」に対応付けてカラム属性値「−99999」が追加されている。また、テーブル構造定義情報には、カラム属性「最大値」に対応付けてカラム属性値「99999」が追加されている。この「最小値」に対応付けられている「−99999」から「最大値」に対応付けられている「99999」が、カラム名が「salary」であり、型が「NUMBER(数値データ型)」であるカラムにおけるデータの範囲(数値の範囲)である。   Further, in the table structure definition information, column attributes “minimum value” and “maximum value” are added in association with the type “” as compared with the table information shown in FIG. 3 described above. In the table structure definition information, a column attribute value “−99999” is added in association with the column attribute “minimum value”. In the table structure definition information, a column attribute value “99999” is added in association with the column attribute “maximum value”. From “−99999” associated with this “minimum value” to “99999” associated with “maximum value”, the column name is “salary” and the type is “NUMBER (numeric data type)”. This is the data range (numerical range) in the column.

このカラム属性「最小値」及びカラム属性値「−99999」、カラム属性「最大値」及びカラム属性値「99999」は、型「NUMBER」に対応付けて図3に示すテーブル情報に含まれるカラム属性「桁」及びカラム属性値「y=5」とカラム属性「位取」及びカラム属性値「z=0」とに基づいて定められる。   The column attribute “minimum value”, the column attribute value “−99999”, the column attribute “maximum value”, and the column attribute value “99999” are associated with the type “NUMBER” and are included in the table information shown in FIG. It is determined based on “digit” and column attribute value “y = 5”, column attribute “scale” and column attribute value “z = 0”.

このように、図3に示すテーブル情報によって示されるテーブルの構造(ここでは、カラム属性「桁」及びカラム属性値「x=200」、カラム属性「桁」及びカラム属性値「y=5」、カラム属性「位取」及びカラム属性値「z=0」)に基づいて定められた、カラム属性「最小文字長」及び当該カラム属性に対応付けられたカラム属性値「0」、カラム属性「最大文字長」及び当該カラム属性に対応付けられたカラム属性値「200」、カラム属性「最小値」及び当該カラム属性に対応付けられたカラム属性値「−99999」、カラム属性「最大値」及び当該カラム属性に対応付けられたカラム属性値「99999」が当該テーブル情報に追加されることによって、図4に示すテーブル構造定義情報が生成される。   Thus, the structure of the table indicated by the table information shown in FIG. 3 (here, column attribute “digit” and column attribute value “x = 200”, column attribute “digit” and column attribute value “y = 5”, Column attribute “scale” and column attribute value “z = 0”), column attribute “minimum character length”, column attribute value “0” associated with the column attribute, column attribute “maximum” The column attribute value “200” associated with the column attribute “character length”, the column attribute “minimum value”, the column attribute value “−99999” associated with the column attribute, the column attribute “maximum value”, and the By adding a column attribute value “99999” associated with the column attribute to the table information, the table structure definition information shown in FIG. 4 is generated.

次に、本実施形態に係るプログラム生成装置30の処理手順について説明する。プログラム生成装置30の処理は、テーブル構造定義情報を生成する処理と本体プログラム及び入力補助プログラムを生成する処理(以下、単にプログラムを生成する処理と表記)とに分けられる。以下、これらの各処理について説明する。   Next, a processing procedure of the program generation device 30 according to the present embodiment will be described. The processing of the program generation device 30 is divided into processing for generating table structure definition information and processing for generating a main body program and an input auxiliary program (hereinafter simply referred to as processing for generating a program). Hereinafter, each of these processes will be described.

まず、図5のフローチャートを参照して、本実施形態に係るプログラム生成装置30におけるテーブル構造定義情報を生成する処理の処理手順について説明する。   First, with reference to the flowchart of FIG. 5, the process sequence of the process which produces | generates the table structure definition information in the program production | generation apparatus 30 concerning this embodiment is demonstrated.

テーブル構造定義情報を生成する処理が実行される際には、データベース40に対してアクセスするための最小限の初期情報を指定させるための画面(入力画面)がプログラム生成装置30の管理者に対して表示される。この画面は、プログラム生成装置30に備えられている表示部(図示せず)を介して表示される。以下、管理者に対して表示される画面については同様である。   When the process of generating the table structure definition information is executed, a screen (input screen) for specifying minimum initial information for accessing the database 40 is displayed to the administrator of the program generating device 30. Displayed. This screen is displayed via a display unit (not shown) provided in the program generation device 30. The same applies to screens displayed to the administrator below.

管理者は、この画面を介して例えばURIを含むデータベース接続情報を指定することができる。つまり、管理者は、例えばURIを指定することによって、データベース40を指定することができる。データベース接続情報が指定されると、管理者は、画面上に表示された例えば「テーブル構造定義情報の生成」または「テーブル情報を取得」メニューを選択(押下)することにより、テーブル構造定義情報の生成を指示する。   The administrator can specify database connection information including, for example, a URI via this screen. That is, the administrator can specify the database 40 by specifying, for example, a URI. When the database connection information is designated, the administrator selects (presses), for example, the “generate table structure definition information” or “get table information” menu displayed on the screen, to change the table structure definition information. Directs generation.

プログラム生成装置30に含まれる全体制御部31は、上記したような管理者の操作に応じて、データベース接続情報を入力する(ステップS1)。全体制御部31は、管理者からのテーブル構造定義情報の生成の指示に応じて、データ項目仕様生成部33を起動する。このとき、全体制御部31は、入力されたデータベース接続情報をデータ項目仕様生成部33に渡す。   The overall control unit 31 included in the program generation device 30 inputs the database connection information in response to the administrator's operation as described above (step S1). The overall control unit 31 activates the data item specification generation unit 33 in response to an instruction to generate table structure definition information from the administrator. At this time, the overall control unit 31 passes the input database connection information to the data item specification generation unit 33.

データ項目仕様生成部33は、全体制御部31から渡されたデータベース40に対するデータベース接続情報を検証する(ステップS2)。データ項目仕様生成部33は、データベース接続情報(URI)が正しいか否かを検証する。データ項目仕様生成部33は、検証の結果、データベース接続情報が正しい場合には、テーブル情報取得部32を起動する。このとき、データ項目仕様生成部33は、データベース接続情報をテーブル情報取得部32に渡す。   The data item specification generation unit 33 verifies the database connection information for the database 40 passed from the overall control unit 31 (step S2). The data item specification generation unit 33 verifies whether the database connection information (URI) is correct. If the database connection information is correct as a result of the verification, the data item specification generation unit 33 activates the table information acquisition unit 32. At this time, the data item specification generation unit 33 passes the database connection information to the table information acquisition unit 32.

なお、検証の結果、データベース接続情報が正しくない場合には、その旨が管理者に対して返される(表示される)。   If the database connection information is not correct as a result of the verification, the fact is returned (displayed) to the administrator.

次に、データ情報取得部32は、データ項目仕様生成部33から渡されたデータベース接続情報をもとに、データベース40に接続する。   Next, the data information acquisition unit 32 connects to the database 40 based on the database connection information passed from the data item specification generation unit 33.

データ情報取得部32は、予め設定(初期設定)されているスキーマ名(デフォルトのスキーマ名)を取得する(ステップS3)。データ情報取得部32は、データベース40からデフォルトのスキーマ名を取得する。   The data information acquisition unit 32 acquires a schema name (default schema name) set (initially set) in advance (step S3). The data information acquisition unit 32 acquires a default schema name from the database 40.

データ情報取得部32は、取得されたスキーマ名に対応するテーブルのテーブル名をデータベース40から取得する(ステップS4)。   The data information acquisition unit 32 acquires the table name of the table corresponding to the acquired schema name from the database 40 (step S4).

データ情報取得部32によって取得されたスキーマ名及びテーブル名は、管理者に対して表示される(ステップS5)。   The schema name and table name acquired by the data information acquisition unit 32 are displayed to the administrator (step S5).

ここで、図6は、データ情報取得部32によって取得されたスキーマ名及びテーブル名が表示される画面(以下、テーブル選択画面と表記)の一例を示す。   Here, FIG. 6 shows an example of a screen (hereinafter referred to as a table selection screen) on which the schema name and the table name acquired by the data information acquisition unit 32 are displayed.

図6に示すテーブル選択画面100には、スキーマ名表示欄101、テーブル名表示欄102、選択テーブル名表示欄103、インポートボタン104及びキャンセルボタン105が設けられている。   The table selection screen 100 shown in FIG. 6 includes a schema name display field 101, a table name display field 102, a selected table name display field 103, an import button 104, and a cancel button 105.

スキーマ名表示欄101には、データ情報取得部32によって取得されたスキーマ名(ここでは、デフォルトのスキーマ名)が表示される。図6に示す例では、スキーマ名表示欄101には、デフォルトのスキーマ名として「SCOTT」が表示されている。なお、管理者は、例えばプログラム生成装置30を操作することによって、スキーマ名表示欄101に表示されているスキーマ名を変更することができる。   In the schema name display field 101, the schema name acquired by the data information acquisition unit 32 (here, the default schema name) is displayed. In the example shown in FIG. 6, “SCOTT” is displayed as the default schema name in the schema name display field 101. Note that the administrator can change the schema name displayed in the schema name display column 101 by operating the program generation device 30, for example.

テーブル名表示欄102には、データ情報取得部32によって取得されたテーブル名(スキーマ名表示欄101に表示されているスキーマ名に対応するテーブル名)が表示される。図6に示す例では、テーブル名表示欄102には、テーブル名として「ACCOUNT」、「APPCLASS」、「APPINSTANCE」及び「APPLOG」等の複数のテーブル名が表示されている。   In the table name display column 102, the table name acquired by the data information acquisition unit 32 (the table name corresponding to the schema name displayed in the schema name display column 101) is displayed. In the example shown in FIG. 6, the table name display field 102 displays a plurality of table names such as “ACCOUNT”, “APPCLASS”, “APPINSTANCE”, and “APPLOG” as table names.

管理者は、プログラム生成装置30を操作することによって、テーブル名表示欄102に表示されている複数のテーブル名の中からテーブル情報を取得するテーブル(名)を選択することができる。つまり、管理者は、テーブル構造定義情報の生成の対象となるテーブルを指定することができる。   The administrator can select a table (name) from which table information is acquired from a plurality of table names displayed in the table name display field 102 by operating the program generation device 30. That is, the administrator can specify a table for which table structure definition information is generated.

この場合、管理者は、テーブル名表示欄102に表示されているテーブル名を選択テーブル名表示欄103に移動させ、インポートボタン104を押下(指定)することでテーブルを選択することができる。   In this case, the administrator can select a table by moving the table name displayed in the table name display field 102 to the selected table name display field 103 and pressing (specifying) the import button 104.

なお、例えばテーブル名表示欄102に表示されているテーブル名を選択テーブル名表示欄103に移動させた後、当該テーブルの選択をキャンセルしたい場合には、キャンセルボタン105を押下することで、当該テーブルの選択をキャンセルすることができる。   For example, when the table name displayed in the table name display field 102 is moved to the selected table name display field 103 and the selection of the table is to be canceled, the table is displayed by pressing the cancel button 105. You can cancel the selection.

再び、図5のフローチャートに戻ると、テーブル情報取得部32によって取得されたスキーマ名及びテーブル名が表示された後、上記したような管理者の操作によってデフォルトのスキーマ名(スキーマ名表示欄101に表示されているスキーマ名)が変更されたか否かが判定される(ステップS6)。   Returning to the flowchart of FIG. 5 again, after the schema name and table name acquired by the table information acquisition unit 32 are displayed, the default schema name (in the schema name display column 101 is displayed by the administrator's operation as described above. It is determined whether or not the displayed schema name has been changed (step S6).

スキーマ名が変更されたと判定された場合(ステップS6のYES)、ステップS4に戻って処理が繰り返される。つまり、スキーマ名が変更された場合には、テーブル情報取得部32は、変更後のスキーマ名に対応するテーブルのテーブル名をデータベース40から取得する。この後、変更後のスキーマ名及びテーブル情報取得部32によって取得されたテーブル名(変更後のスキーマ名に対応するテーブル名)が図6に示すようなテーブル選択画面100において表示される。この場合、このテーブル選択画面100において、上記したように管理者によってテーブル名が選択される。   If it is determined that the schema name has been changed (YES in step S6), the process returns to step S4 and the process is repeated. That is, when the schema name is changed, the table information acquisition unit 32 acquires the table name of the table corresponding to the changed schema name from the database 40. Thereafter, the changed schema name and the table name acquired by the table information acquisition unit 32 (the table name corresponding to the changed schema name) are displayed on the table selection screen 100 as shown in FIG. In this case, the table name is selected by the administrator on the table selection screen 100 as described above.

一方、スキーマ名が変更されていないと判定された場合(ステップS6のNO)、テーブル情報取得部32は、管理者によって選択(指定)されたテーブルの構造を示すテーブル情報を、データベース40に格納されている当該テーブルから取得する(ステップS7)。テーブル情報取得部32は、取得されたテーブル情報をデータ項目仕様生成部33に渡す。テーブル情報がデータ項目仕様生成部33に渡されると、テーブル情報取得部32の処理は終了される。   On the other hand, when it is determined that the schema name has not been changed (NO in step S6), the table information acquisition unit 32 stores in the database 40 table information indicating the structure of the table selected (designated) by the administrator. It is acquired from the table that has been (step S7). The table information acquisition unit 32 passes the acquired table information to the data item specification generation unit 33. When the table information is passed to the data item specification generation unit 33, the processing of the table information acquisition unit 32 is terminated.

次に、データ項目仕様生成部33は、テーブル情報取得部32から渡されたテーブル情報に基づいて、テーブル情報によって示されるテーブルの構造において当該テーブルに保持されるデータ(当該テーブルにおけるカラムのデータ)の範囲を追加することによりテーブル構造定義情報を生成する(ステップS8)。具体的には、データ項目仕様生成部33は、上記した図3に示すテーブル情報に基づいて、上記した図4に示すテーブル構造定義情報を生成する。   Next, the data item specification generation unit 33, based on the table information passed from the table information acquisition unit 32, the data held in the table in the table structure indicated by the table information (column data in the table) Table structure definition information is generated by adding the range (step S8). Specifically, the data item specification generation unit 33 generates the table structure definition information shown in FIG. 4 based on the table information shown in FIG.

データ項目仕様生成部33は、生成されたテーブル構造定義情報をテーブル構造定義情報格納部22に書き込む(ステップS9)。このテーブル構造定義情報は、例えばスプレッドシートに保持される。テーブル構造定義情報がテーブル構造定義情報格納部22に書き込まれると、データ項目仕様生成部33の処理は終了される。   The data item specification generation unit 33 writes the generated table structure definition information in the table structure definition information storage unit 22 (step S9). This table structure definition information is held in a spreadsheet, for example. When the table structure definition information is written in the table structure definition information storage unit 22, the processing of the data item specification generation unit 33 is terminated.

データ項目仕様生成部33の処理が終了されると、テーブル構造定義情報を生成する処理が終了した旨の画面(終了画面)がユーザに対して表示される(ステップS10)。   When the process of the data item specification generation unit 33 is finished, a screen (end screen) indicating that the process of generating the table structure definition information is finished is displayed to the user (step S10).

次に、図7のフローチャートを参照して、本実施形態に係るプログラム生成装置30におけるプログラムを生成する処理の処理手順について説明する。本実施形態においては、入力補助プログラムとして、例えば利用者のデータ入力をチェックする入力チェックルール(プログラム)が生成される。   Next, with reference to the flowchart of FIG. 7, the process sequence of the process which produces | generates the program in the program production | generation apparatus 30 which concerns on this embodiment is demonstrated. In this embodiment, as an input assistance program, for example, an input check rule (program) for checking user data input is generated.

プログラムを生成する処理が実行される際には、当該処理を指示するための画面が管理者に対して表示される。管理者は、プログラム生成装置30を操作することによって、この画面を介してプログラムを生成する処理をプログラム生成装置30に対して指示する。具体的には、管理者は、画面上に表示された例えば「(プログラムの)生成開始」メニューを選択(押下)することにより、当該プログラムの生成を指示する。   When a process for generating a program is executed, a screen for instructing the process is displayed to the administrator. The administrator operates the program generation apparatus 30 to instruct the program generation apparatus 30 to generate a program via this screen. Specifically, the administrator instructs the generation of the program by, for example, selecting (pressing) the “start generation of (program)” menu displayed on the screen.

プログラム生成装置30に含まれる全体制御部31は、上記したような管理者の操作に応じてプログラムの生成が指示された場合、プログラム生成部34を起動する。   The general control unit 31 included in the program generation device 30 activates the program generation unit 34 when the generation of the program is instructed in accordance with the operation of the administrator as described above.

プログラム生成部34が起動されると、当該プログラム生成部34は、全体制御部31を介してテーブル構造定義情報格納部22に格納されているテーブル構造定義情報を読み込む(ステップS11)。   When the program generation unit 34 is activated, the program generation unit 34 reads the table structure definition information stored in the table structure definition information storage unit 22 via the overall control unit 31 (step S11).

プログラム生成部34は、読み込まれたテーブル構造定義情報に基づいて、データベース40(に格納されているテーブル)に対して一連のCRUD処理(生成・読み取り・更新・削除)を行うためのプログラム(つまり、本体プログラム)を生成する(ステップS12)。   Based on the read table structure definition information, the program generation unit 34 performs a series of CRUD processing (generation / read / update / delete) on the database 40 (the table stored in the database 40) , A main body program) is generated (step S12).

次に、プログラム生成部34は、入力チェックルール生成部35を起動する。このとき、プログラム生成部34は、読み込まれたテーブル構造定義情報を入力チェックルール生成部35に渡す。   Next, the program generation unit 34 activates the input check rule generation unit 35. At this time, the program generation unit 34 passes the read table structure definition information to the input check rule generation unit 35.

入力チェックルール生成部35は、プログラム生成部34から渡されたテーブル構造定義情報に基づいて、入力チェックルールテンプレート格納部23から適切なテンプレートを読み込む(ステップS13)。入力チェックルール生成部35は、プログラム生成部34から渡されたテーブル構造定義情報に含まれる型(文字データ、数値データまたは日付データ等のデータの種類)に対応付けて入力チェックルールテンプレート格納部23に格納されているテンプレートを読み込む。   The input check rule generation unit 35 reads an appropriate template from the input check rule template storage unit 23 based on the table structure definition information passed from the program generation unit 34 (step S13). The input check rule generation unit 35 is associated with the type (type of data such as character data, numerical data, or date data) included in the table structure definition information passed from the program generation unit 34, and the input check rule template storage unit 23 Load templates stored in.

入力チェックルール生成部35は、プログラム生成部34から渡されたテーブル構造定義情報及び読み込まれたテンプレートに基づいて、入力チェックルール(プログラム)を生成する(ステップS14)。入力チェックルール生成部35は、プログラム生成部34から渡されたテーブル構造定義情報においてカラム名及び型に対応付けられているデータの範囲を、読み取られた当該型に対応するテンプレートに当てはめることによって入力チェックルールプログラムを生成する。   The input check rule generation unit 35 generates an input check rule (program) based on the table structure definition information passed from the program generation unit 34 and the read template (step S14). The input check rule generation unit 35 inputs the range of data associated with the column name and type in the table structure definition information passed from the program generation unit 34 by applying the range of data to the template corresponding to the read type. Generate a check rule program.

上記した図4に示すテーブル構造定義情報に含まれる例えばカラム名「empNo」の入力チェックルールプログラムにおいては、最小文字長は、当該テーブル構造定義情報における「empNo」の「最小文字長」に対応付けられている「0」である。また、最大文字長は、図4に示すテーブル構造定義情報における「empNo」の「最大文字長」に対応付けられている「200」となる。つまり、この入力チェックルールプログラムによれば、最小文字長「0」から最大文字長「200」の範囲以外の文字長のデータが入力された場合には、当該入力がエラーであることをチェックすることができる。   For example, in the input check rule program for the column name “empNo” included in the table structure definition information shown in FIG. 4, the minimum character length is associated with the “minimum character length” of “empNo” in the table structure definition information. It is “0”. The maximum character length is “200” associated with “maximum character length” of “empNo” in the table structure definition information shown in FIG. That is, according to this input check rule program, when data having a character length outside the range of the minimum character length “0” to the maximum character length “200” is input, it is checked that the input is an error. be able to.

なお、上記した入力チェックルール生成部35によって生成される入力チェックルールプログラムは、入力チェックルールファイルに基づいて、入力チェックを行う。この入力チェックルールファイルは、ここでは例えばXMLファイルとしている。   Note that the input check rule program generated by the input check rule generation unit 35 performs input check based on the input check rule file. This input check rule file is, for example, an XML file here.

ここで、図8は、入力チェックルール生成部35によって生成された入力チェックルールプログラムで使用される設定ファイルの一例(定義例)について説明する。図8は、上記した図4に示すテーブル構造定義情報に基づいて生成された入力チェックルールプログラムで使用される設定ファイルを示す。   Here, FIG. 8 illustrates an example (definition example) of a setting file used in the input check rule program generated by the input check rule generation unit 35. FIG. 8 shows a setting file used in the input check rule program generated based on the table structure definition information shown in FIG.

図8に示す例では、2行目の<form id = …>、27行目の</form>で囲まれた部分が1つの入力チェックルールの定義を示す。   In the example shown in FIG. 8, the portion surrounded by <form id =...> On the second line and </ form> on the 27th line indicates the definition of one input check rule.

図8に示す例の4行目の<item key = …>、6行目の</item>で囲まれた部分がテーブルに存在するカラム(カラム名「empNo」)の設定項目となる。以下、<item key = …>〜</item>で囲まれた部分が各項目(カラム名「salary」及び「hiredate」)の入力チェックルールの定義となる。   In the example shown in FIG. 8, the portion surrounded by <item key =...> On the fourth line and </ item> on the sixth line is a setting item for a column (column name “empNo”) existing in the table. Hereinafter, the part enclosed by <item key = ...> to </ item> is the definition of the input check rule for each item (column names “salary” and “hiredate”).

例えば5行目の<ank-length max = “x” min=”0” erro-message=”ank-length-char”/>の”ank-length”は、半角文字換算の文字長による入力チェックの例であり、この場合の属性、max及びminは、半角文字換算による文字長の最大値(最大文字長)及び最小値(最小文字長)を示す。   For example, <ank-length max = “x” min = ”0” erro-message = ”ank-length-char” /> on the 5th line is an input check based on the character length converted to single-byte characters. In this case, the attributes, max and min, indicate the maximum value (maximum character length) and the minimum value (minimum character length) of the character length by half-width character conversion.

図8に示す例では、5行目に示す通り、max=x(実際はデータベース40から取得された桁、例えば200が入力される)、min=0となっている。つまり、例えばカラム名「empNo」の部分の入力チェックルールは、入力チェックルールテンプレート格納部23において当該カラム名の型「VARCHAR2」に対応付けられているテンプレートに、当該カラム名「empNo」の最小文字列「0」及び最大文字列「x(=200)」を当てはめることによって生成される。他のカラム名(例えば「salary」)等についても同様である。   In the example shown in FIG. 8, as shown in the fifth line, max = x (actually, a digit obtained from the database 40, for example, 200 is input), and min = 0. That is, for example, the input check rule for the column name “empNo” is stored in the template associated with the column name type “VARCHAR2” in the input check rule template storage unit 23 in the minimum character of the column name “empNo”. It is generated by fitting the column “0” and the maximum character string “x (= 200)”. The same applies to other column names (for example, “salary”).

再び図7に戻ると、上記したように入力チェックルールプログラムが生成されると、入力チェックルール生成部35は、当該入力チェックルールプログラムをプログラム生成部34に返す。入力チェックルールプログラムがプログラム生成部34に返されると、入力チェックルール生成部35の処理は終了される。   Returning to FIG. 7 again, when the input check rule program is generated as described above, the input check rule generation unit 35 returns the input check rule program to the program generation unit 34. When the input check rule program is returned to the program generation unit 34, the processing of the input check rule generation unit 35 is terminated.

入力チェックルール生成部35の処理が終了されると、プログラムを生成する処理が終了した旨の画面(終了画面)がユーザに対して表示される(ステップS15)。   When the process of the input check rule generation unit 35 is completed, a screen (end screen) indicating that the process of generating the program is completed is displayed to the user (step S15).

上記したように、プログラム生成装置30は、ステップS12において生成された本体プログラム及びステップS14において生成された入力チェックルールプログラムのセットを例えば利用者に提供する。入力チェックルールプログラムは、利用者によって用いられる端末等において本体プログラムに組み込まれる。これにより、例えば本体プログラムの入力項目に対する利用者のデータ入力が入力チェックルールの要件(上記した設定ファイルに定義されたデータの範囲)を満たさない場合には、例えば入力チェックエラー画面が当該利用者に対して表示される。   As described above, the program generation device 30 provides the user with a set of the main body program generated in step S12 and the input check rule program generated in step S14, for example. The input check rule program is incorporated into the main body program in a terminal or the like used by the user. Thus, for example, when the user's data input for the input item of the main body program does not satisfy the requirements of the input check rule (the range of data defined in the setting file described above), for example, the input check error screen is displayed Is displayed.

ここで、図9は、入力チェックエラー画面の一例を示す。図9に示す入力チェックエラー画面200には、利用者のデータ入力が入力チェックルールの要件を満たしていない旨が表示される。図9に示す例では、「SALARY(カラム名)は整数部5桁以内の数値(データの範囲)です。先頭に+または−をつけることができます。」が表示されている。利用者は、この入力チェックエラー画面200を参照することによって適切なデータ入力を行うことが可能となる。   Here, FIG. 9 shows an example of an input check error screen. The input check error screen 200 shown in FIG. 9 displays that the user's data input does not satisfy the requirements of the input check rule. In the example shown in FIG. 9, “SALARY (column name) is a numeric value (data range) within 5 digits of the integer part. + Or − can be added to the head.” Is displayed. The user can input appropriate data by referring to the input check error screen 200.

上記したように本実施形態においては、プログラム生成装置30の管理者によって指定(選択)されたテーブルのテーブル情報を取得し、当該テーブル情報から生成されたテーブル構造定義情報がテーブル構造定義情報格納部22に格納される。また、本実施形態においては、データベース40に対して一連のCRUD処理を行うためのプログラム(本体プログラム)がテーブル構造定義情報格納部22に格納されたテーブル構造定義情報に基づいて生成される際に、当該テーブル構造定義情報及び入力チェックルールテンプレート格納部23に格納されているテンプレートに基づいて、当該本体プログラムにおける入力項目に対するデータ入力をチェックするための入力チェックルールプログラム(入力補助プログラム)が生成される。   As described above, in the present embodiment, the table information of the table specified (selected) by the administrator of the program generation device 30 is acquired, and the table structure definition information generated from the table information is stored in the table structure definition information storage unit. 22. In the present embodiment, when a program (main program) for performing a series of CRUD processes on the database 40 is generated based on the table structure definition information stored in the table structure definition information storage unit 22. Based on the table structure definition information and the template stored in the input check rule template storage unit 23, an input check rule program (input auxiliary program) for checking data input to the input item in the main body program is generated. The

これにより、本実施形態においては、本体プログラムがアクセスするデータベース40に格納されるテーブルの構造により生じる入力データの制約に基づいて利用者のデータ入力に対する入力チェックルールプログラムを自動的に生成することが可能となる。つまり、本実施形態においては、本体プログラムを自動生成する際に、当該生成される本体プログラムの利用者の入力を補助するための入力補助プログラム(入力チェックルールプログラム)を生成することができるため、アプリケーションの生産効率を向上させることができる。   Thus, in the present embodiment, an input check rule program for data input by the user can be automatically generated based on the input data restriction caused by the structure of the table stored in the database 40 accessed by the main body program. It becomes possible. That is, in the present embodiment, when automatically generating a main body program, an input auxiliary program (input check rule program) for assisting the user's input of the generated main body program can be generated. The production efficiency of the application can be improved.

[第2の実施形態]
次に、図10を参照して、本発明の第2の実施形態について説明する。図10は、本実施形態に係るプログラム生成装置の主として機能構成を示すブロック図である。なお、前述した図2と同様の部分には同一参照符号を付してその詳しい説明を省略する。ここでは、図2と異なる部分について主に述べる。
[Second Embodiment]
Next, a second embodiment of the present invention will be described with reference to FIG. FIG. 10 is a block diagram mainly showing a functional configuration of the program generation device according to the present embodiment. The same parts as those in FIG. 2 described above are denoted by the same reference numerals, and detailed description thereof is omitted. Here, parts different from FIG. 2 will be mainly described.

また、本実施形態に係るプログラム生成装置のハードウェア構成は、前述した第1の実施形態と同様であるため、適宜、図1を用いて説明する。   The hardware configuration of the program generation device according to this embodiment is the same as that of the first embodiment described above, and will be described with reference to FIG. 1 as appropriate.

図10に示すプログラム生成装置300は、テーブル情報取得部301、データ解析部302、データ項目仕様生成部303及び画面選択肢生成部304を含む。本実施形態において、これらの各部301乃至304は、図1に示すコンピュータ10が外部記憶装置20に格納されているプログラム21を実行することにより実現されるものとする。   A program generation apparatus 300 illustrated in FIG. 10 includes a table information acquisition unit 301, a data analysis unit 302, a data item specification generation unit 303, and a screen option generation unit 304. In the present embodiment, these units 301 to 304 are realized by the computer 10 illustrated in FIG. 1 executing the program 21 stored in the external storage device 20.

なお、データベース40に格納されているテーブルには、例えば当該テーブルに対して入力されたデータが保持(格納)されている。   Note that the table stored in the database 40 holds (stores) data input to the table, for example.

テーブル情報取得部301は、前述した第1の実施形態におけるテーブル情報取得部32の機能に加えて、管理者によって指定されたテーブルに保持(格納)されているデータ(テーブル格納データ)を、データベース40に格納されている当該テーブルから取得する。   In addition to the function of the table information acquisition unit 32 in the first embodiment described above, the table information acquisition unit 301 stores data (table storage data) held (stored) in a table specified by the administrator as a database. 40 is obtained from the table stored in 40.

データ解析部302は、テーブル情報取得部301によって取得されたデータを解析する。   The data analysis unit 302 analyzes the data acquired by the table information acquisition unit 301.

データ項目仕様生成部303は、テーブル情報取得部301によって取得されたテーブル情報によって示されるテーブルの構造に加えて、更に、データ解析部302による解析結果に基づいて、テーブル構造定義情報を生成する。このデータ解析部302による解析結果には、例えばテーブル情報取得部301によって取得されたデータ(テーブルに保持されているデータ)の分布または間隔等(の情報)が含まれる。つまり、データ項目仕様生成部303によって生成されるテーブル構造定義情報には、テーブルに保持されているデータの分布及び間隔等(解析結果)が含まれる。このデータ項目仕様生成部303によって生成されるテーブル構造定義情報の詳細については後述する。   In addition to the table structure indicated by the table information acquired by the table information acquisition unit 301, the data item specification generation unit 303 further generates table structure definition information based on the analysis result of the data analysis unit 302. The analysis result by the data analysis unit 302 includes, for example, the distribution or interval (information) of data acquired by the table information acquisition unit 301 (data held in the table). That is, the table structure definition information generated by the data item specification generating unit 303 includes the distribution and interval of data held in the table (analysis result). Details of the table structure definition information generated by the data item specification generation unit 303 will be described later.

画面選択肢生成部304は、テーブル構造定義情報格納部22に格納されたテーブル構造定義情報に基づいて、プログラム生成部34によって生成される本体プログラムを利用する利用者のデータ入力を補助するためのプログラム(入力補助プログラム)を生成する。画面選択肢生成部304は、本体プログラムにおける利用者のデータ入力の際に、当該利用者にデータを選択入力させる画面(画面選択肢)を表示させるためのプログラム(以下、画面選択肢表示プログラムと表記)を入力補助プログラムとして生成する。   The screen option generation unit 304 is a program for assisting user data input using the main body program generated by the program generation unit 34 based on the table structure definition information stored in the table structure definition information storage unit 22. (Input auxiliary program) is generated. The screen option generation unit 304 displays a program (hereinafter referred to as a screen option display program) for displaying a screen (screen option) that allows the user to select and input data when the user inputs data in the main program. Generate as an input auxiliary program.

つまり、本実施形態に係るプログラム生成装置300においては、入力補助プログラムとして、前述した第1の実施形態における入力チェックルールプログラム(第1の入力補助プログラム)及び上記した画面選択肢表示プログラム(第2の入力補助プログラム)の2つのプログラムが生成される。   That is, in the program generation device 300 according to the present embodiment, as the input auxiliary program, the input check rule program (first input auxiliary program) in the first embodiment described above and the screen option display program (second output) described above. Two programs (input auxiliary program) are generated.

図11は、図10に示すテーブル構造定義情報格納部22に格納されるテーブル構造定義情報のデータ構造の一例を示す。図11に示すテーブル構造定義情報は、上記したようにテーブルに保持(格納)されているデータ(テーブル格納データ)の解析結果(データの分布または間隔)に基づいて生成されている点が、前述した図4に示すテーブル構造定義情報とは異なる。ここでは、図4に示すテーブル構造定義情報と異なる点について主に述べる。   FIG. 11 shows an example of the data structure of the table structure definition information stored in the table structure definition information storage unit 22 shown in FIG. The table structure definition information shown in FIG. 11 is generated based on the analysis result (data distribution or interval) of data (table storage data) held (stored) in the table as described above. This is different from the table structure definition information shown in FIG. Here, differences from the table structure definition information shown in FIG. 4 will be mainly described.

図11に示すテーブル構造定義情報には、カラム名「empNo」、型「VARCHAR2」及びカラム属性「最小文字長」に対応付けてカラム属性値「3」が対応付けて含まれている。つまり、前述した図4に示すテーブル構造定義情報においては「0」であった最小文字長が「3」になっている。上記したデータの解析結果において、カラム名が「empNo」であり、型が「VARCHAR2」であるカラムのデータの分布における最小文字長が「3」である場合には、図11に示すように最小文字長として「3」がテーブル構造定義情報に含まれる。   The table structure definition information illustrated in FIG. 11 includes the column attribute value “3” in association with the column name “empNo”, the type “VARCHAR2”, and the column attribute “minimum character length”. That is, in the table structure definition information shown in FIG. 4 described above, the minimum character length that was “0” is “3”. In the above data analysis result, when the minimum character length in the data distribution of the column whose column name is “empNo” and whose type is “VARCHAR2” is “3”, the minimum is as shown in FIG. As the character length, “3” is included in the table structure definition information.

図11に示すテーブル構造定義情報には、カラム名「empNo」、型「VARCHAR2」及びカラム属性「最大文字長」に対応付けてカラム属性値「180」が対応付けて含まれている。つまり、前述した図4に示すテーブル構造定義情報においては「200」であった最小文字長が「180」になっている。上記したデータの解析結果において、カラム名が「empNo」であり、型が「VARCHAR2」であるカラムのデータの分布における最大文字長が「180」である場合には、図11に示すように最大文字長として「180」がテーブル構造定義情報に含まれる。   The table structure definition information illustrated in FIG. 11 includes a column attribute value “180” in association with the column name “empNo”, the type “VARCHAR2”, and the column attribute “maximum character length”. That is, in the table structure definition information shown in FIG. 4 described above, the minimum character length that was “200” is “180”. In the above data analysis result, when the maximum character length in the data distribution of the column having the column name “empNo” and the type “VARCHAR2” is “180”, the maximum is as shown in FIG. As the character length, “180” is included in the table structure definition information.

図11に示すテーブル構造定義情報には、カラム名「salary」、型「NUMBER」及びカラム属性「最小値」に対応付けてカラム属性値「0」が対応付けて含まれている。つまり、前述した図4に示すテーブル構造定義情報においては「−99999」であった最小値が「0」になっている。上記したデータの解析結果において、カラム名が「salary」であり、型が「NUMBER」であるカラムのデータの分布における最小値が「0」である場合には、図11に示すように最小値として「0」がテーブル構造定義情報に含まれる。   The table structure definition information illustrated in FIG. 11 includes a column attribute value “0” in association with a column name “salary”, a type “NUMBER”, and a column attribute “minimum value”. That is, in the table structure definition information shown in FIG. 4 described above, the minimum value that was “−99999” is “0”. In the above data analysis result, when the minimum value in the data distribution of the column whose column name is “salary” and whose type is “NUMBER” is “0”, as shown in FIG. “0” is included in the table structure definition information.

図11に示すテーブル構造定義情報には、カラム名「salary」、型「NUMBER」及びカラム属性「最大値」に対応付けてカラム属性値「6000」が対応付けて含まれている。つまり、前述した図4に示すテーブル構造定義情報においては「99999」であった最小文字長が「6000」になっている。上記したデータの解析結果において、カラム名が「salary」であり、型が「NUMBER」であるカラムのデータの分布における最大値が「6000」である場合には、図11に示すように最大値として「6000」がテーブル構造定義情報に含まれる。   The table structure definition information illustrated in FIG. 11 includes a column attribute value “6000” in association with the column name “salary”, the type “NUMBER”, and the column attribute “maximum value”. That is, in the table structure definition information shown in FIG. 4 described above, the minimum character length that was “999999” is “6000”. In the analysis result of the above data, when the maximum value in the data distribution of the column whose column name is “salary” and whose type is “NUMBER” is “6000”, as shown in FIG. “6000” is included in the table structure definition information.

また、図11に示すテーブル構造定義情報には、カラム名「hiredate」、型「TIMESTAMP」及びカラム属性「分間隔」に対応付けてカラム属性値「10」が対応付けて含まれている。上記したデータの解析結果において、カラム名が「hiredate」であり、型が「TIMESTAMP」であるカラムのデータ(日付データ)の分間隔が「10」である場合には、図11に示すように分間隔として「10」がテーブル構造定義情報に含まれる。   Further, the table structure definition information shown in FIG. 11 includes a column attribute value “10” in association with the column name “hiredate”, the type “TIMESTAMP”, and the column attribute “minute interval”. In the analysis result of the above data, when the minute interval of the data (date data) of the column whose column name is “hiredate” and whose type is “TIMESTAMP” is “10”, as shown in FIG. As the minute interval, “10” is included in the table structure definition information.

次に、本実施形態に係るプログラム生成装置300の処理手順について説明する。前述した第1の実施形態と同様に、プログラム生成装置300の処理は、テーブル構造定義情報を生成する処理とプログラムを生成する処理とに分けられる。以下、これらの各処理について説明する。   Next, a processing procedure of the program generation device 300 according to the present embodiment will be described. Similar to the first embodiment described above, the processing of the program generation device 300 is divided into processing for generating table structure definition information and processing for generating a program. Hereinafter, each of these processes will be described.

図12のフローチャートを参照して、本実施形態に係るプログラム生成装置300におけるテーブル構造定義情報を生成する処理の処理手順について説明する。   With reference to the flowchart of FIG. 12, the process sequence of the process which produces | generates the table structure definition information in the program production | generation apparatus 300 which concerns on this embodiment is demonstrated.

テーブル構造定義情報を生成する処理が実行される際には、前述した第1の実施形態と同様に、データベース40に対してアクセスするための最小限の初期情報を指定させるための画面がプログラム生成装置300の管理者に対して表示される。   When the process for generating the table structure definition information is executed, a screen for specifying minimum initial information for accessing the database 40 is generated as in the first embodiment described above. Displayed to the administrator of the device 300.

管理者は、この画面を介して例えばURIを含むデータベース接続情報を指定することができる。つまり、管理者は、例えばURIを指定することによって、データベース40を指定することができる。データベース接続情報が指定されると、管理者は、画面上に表示された例えば「テーブル構造定義情報の生成」または「テーブル情報を取得」メニューを選択(押下)することにより、テーブル構造定義情報の生成を指示する。   The administrator can specify database connection information including, for example, a URI via this screen. That is, the administrator can specify the database 40 by specifying, for example, a URI. When the database connection information is designated, the administrator selects (presses), for example, the “generate table structure definition information” or “get table information” menu displayed on the screen, to change the table structure definition information. Directs generation.

上記したように管理者によってテーブル構造定義情報の生成が指示されると、前述した図5に示すステップS1〜ステップS6の処理に相当するステップS21〜ステップS26の処理が実行される。   As described above, when generation of table structure definition information is instructed by the administrator, processing in steps S21 to S26 corresponding to the processing in steps S1 to S6 shown in FIG. 5 described above is executed.

ステップS26においてスキーマ名が変更されたと判定された場合、ステップS24に戻って処理が繰り返される。   If it is determined in step S26 that the schema name has been changed, the process returns to step S24 and the process is repeated.

一方、ステップS26においてスキーマ名が変更されていないと判定された場合、テーブル情報取得部301は、管理者によって選択(指定)されたテーブルの構造を示すテーブル情報及び当該テーブルに保持(格納)されているデータ(テーブル格納データ)を、データベース40に格納されている当該テーブルから取得する。テーブル情報取得部301は、取得されたテーブル情報及びデータをデータ項目仕様生成部303に渡す。テーブル情報及びデータがデータ項目仕様生成部303に渡されると、テーブル情報取得部301の処理は終了される。   On the other hand, when it is determined in step S26 that the schema name has not been changed, the table information acquisition unit 301 holds (stores) the table information indicating the structure of the table selected (designated) by the administrator and the table. Data (table storage data) is acquired from the table stored in the database 40. The table information acquisition unit 301 passes the acquired table information and data to the data item specification generation unit 303. When the table information and data are passed to the data item specification generation unit 303, the processing of the table information acquisition unit 301 is terminated.

次に、データ項目仕様生成部303は、データ解析部302を起動する。このとき、データ項目仕様生成部303は、テーブル情報取得部301から渡されたデータをデータ解析部302に渡す。   Next, the data item specification generation unit 303 activates the data analysis unit 302. At this time, the data item specification generation unit 303 passes the data passed from the table information acquisition unit 301 to the data analysis unit 302.

データ解析部302は、データ項目仕様生成部303から渡されたデータを解析する(ステップS28)。データ解析部302は、データ項目仕様生成部303から渡されたデータの分布または間隔等を含む解析結果をデータ項目仕様生成部303に渡す(出力する)。解析結果がデータ項目仕様生成部303に渡されると、データ解析部302の処理は終了される。   The data analysis unit 302 analyzes the data passed from the data item specification generation unit 303 (step S28). The data analysis unit 302 passes (outputs) the analysis result including the distribution or interval of the data passed from the data item specification generation unit 303 to the data item specification generation unit 303. When the analysis result is passed to the data item specification generation unit 303, the processing of the data analysis unit 302 ends.

データ項目仕様生成部303は、テーブル情報取得部301から渡されたテーブル情報及びデータ解析部302から渡された解析結果に基づいて、テーブル構造定義情報を生成する(ステップS30)。データ項目仕様生成部303は、上記した図11に示すようにテーブル情報によって示されるテーブルの構造において当該テーブルに保持されるデータ(当該テーブルにおけるカラムのデータ)の範囲(最小文字列、最大文字列等)に、解析結果に含まれるデータの分布が反映されたテーブル構造定義情報を生成する。また、データ項目仕様生成部303は、解析結果に含まれるデータの分間隔を含むテーブル構造定義情報を生成する。   The data item specification generation unit 303 generates table structure definition information based on the table information passed from the table information acquisition unit 301 and the analysis result passed from the data analysis unit 302 (step S30). As shown in FIG. 11, the data item specification generation unit 303 has a range (minimum character string, maximum character string) of data (column data in the table) held in the table in the table structure indicated by the table information. Etc.), the table structure definition information reflecting the distribution of data included in the analysis result is generated. In addition, the data item specification generation unit 303 generates table structure definition information including an interval of data included in the analysis result.

上記したステップS30の処理が実行されると、前述した図5に示すステップS9及びステップS10の処理に相当するステップS30及びステップS31の処理が実行される。   When the process of step S30 described above is executed, the processes of step S30 and step S31 corresponding to the processes of step S9 and step S10 shown in FIG. 5 described above are executed.

次に、図13のフローチャートを参照して、本実施形態に係るプログラム生成装置300におけるプログラムを生成する処理の処理手順について説明する。本実施形態においては、利用者のデータ入力をチェックする入力チェックルールプログラム(第1の入力補助プログラム)及び利用者のデータ入力の際に画面選択肢を表示するための画面選択肢表示プログラム(第2の入力補助プログラム)が入力補助プログラムとして生成される。   Next, a processing procedure for generating a program in the program generating apparatus 300 according to the present embodiment will be described with reference to the flowchart of FIG. In the present embodiment, an input check rule program (first input auxiliary program) for checking user data input and a screen option display program (second program) for displaying screen options at the time of user data input. An input auxiliary program) is generated as an input auxiliary program.

プログラムを生成する処理が実行される際には、前述した第1の実施形態と同様に、当該処理を指示するための画面が管理者に対して表示される。管理者は、プログラム生成装置300を操作することによって、この画面を介してプログラムを生成する処理をプログラム生成装置300に対して指示する。具体的には、管理者は、画面上に表示された例えば「(プログラムの)生成開始」メニューを選択(押下)することにより、当該プログラムの生成を指示する。   When a process for generating a program is executed, a screen for instructing the process is displayed to the administrator as in the first embodiment described above. The administrator operates the program generation apparatus 300 to instruct the program generation apparatus 300 to generate a program via this screen. Specifically, the administrator instructs the generation of the program by, for example, selecting (pressing) the “start generation of (program)” menu displayed on the screen.

上記したようにプログラムの生成が指示された場合、前述した図7に示すステップS11〜ステップS14の処理に相当するステップS41〜ステップS44の処理が実行される。つまり、ステップS42においてプログラム生成部34によって本体プログラムが生成される。   When the generation of the program is instructed as described above, the processes in steps S41 to S44 corresponding to the processes in steps S11 to S14 shown in FIG. 7 described above are executed. That is, the main body program is generated by the program generation unit 34 in step S42.

また、ステップS44において入力チェックルール生成部35によって入力チェックルールプログラム(第1の入力補助プログラム)が生成される。このとき、入力チェックルール生成部35は、テーブル構造定義情報が上記した図11に示すデータ構造である場合、例えばカラム名が「empNo」であるカラムのデータ範囲が最小文字長「3」から最大文字長「180」までとなるような入力チェックルールプログラムを生成する。つまり、入力チェックルール生成部35は、上記した解析結果に含まれるデータの分布が反映された入力チェックルールプログラムを生成する。なお、この入力チェックルールプログラムにおいては、前述した第1の実施形態と同様に、データの範囲を最小文字列「0」から最大文字列「200」としても構わない。カラム名「empNo」以外(例えば、カラム名「salary」)についても同様である。   In step S44, the input check rule generation unit 35 generates an input check rule program (first input auxiliary program). At this time, when the table structure definition information has the data structure shown in FIG. 11, the input check rule generation unit 35, for example, the data range of the column whose column name is “empNo” is changed from the minimum character length “3” to the maximum. An input check rule program having a character length of up to “180” is generated. That is, the input check rule generation unit 35 generates an input check rule program that reflects the distribution of data included in the analysis result described above. In this input check rule program, the data range may be changed from the minimum character string “0” to the maximum character string “200” as in the first embodiment. The same applies to other than the column name “empNo” (for example, the column name “salary”).

なお、プログラム生成部34は、ステップS44の処理が実行されると、画面選択肢生成部304を起動する。このとき、プログラム生成部34は、読み込まれたテーブル構造定義情報を画面選択肢生成部304に渡す。   Note that the program generation unit 34 activates the screen option generation unit 304 when the process of step S44 is executed. At this time, the program generation unit 34 passes the read table structure definition information to the screen option generation unit 304.

画面選択肢生成部304は、プログラム生成部34から渡されたテーブル構造定義情報に含まれる解析結果に基づいて、画面選択肢表示プログラムを生成する(ステップS45)。画面選択肢生成部304は、テーブル構造定義情報に含まれるカラム属性及び当該カラム属性に対応付けられているカラム属性値に基づいて画面選択肢表示プログラムを生成する。具体的には、画面選択肢生成部304は、テーブル構造定義情報に含まれる分間隔(図11に示すデータ構造定義情報においては、カラム属性「分間隔」に対応付けられているカラム属性値「10」)に基づいて画面選択肢表示プログラムを生成する。   The screen option generation unit 304 generates a screen option display program based on the analysis result included in the table structure definition information passed from the program generation unit 34 (step S45). The screen option generation unit 304 generates a screen option display program based on the column attribute included in the table structure definition information and the column attribute value associated with the column attribute. Specifically, the screen option generation unit 304 includes the minute interval included in the table structure definition information (in the data structure definition information illustrated in FIG. 11, the column attribute value “10” associated with the column attribute “minute interval”). ]) To generate a screen option display program.

画面選択肢生成部304は、生成された画面選択肢表示プログラムをプログラム生成部34に返す。画面選択肢表示プログラムがプログラム生成部34に返されると、画面選択肢生成部304の処理は終了される。   The screen option generation unit 304 returns the generated screen option display program to the program generation unit 34. When the screen option display program is returned to the program generation unit 34, the processing of the screen option generation unit 304 is terminated.

画面選択肢生成部304の処理が終了されると、プログラムを生成する処理が終了した旨の画面(終了画面)がユーザに対して表示される(ステップS46)。   When the process of the screen option generation unit 304 is completed, a screen (end screen) indicating that the process of generating the program is completed is displayed to the user (step S46).

プログラム生成装置300は、ステップS42において生成された本体プログラム、ステップS44において生成された入力チェックルールプログラム及びステップS45において生成された画面選択肢表示プログラムのセットを例えば利用者に提供する。画面選択肢表示プログラムは、入力チェックルールプログラムと同様に、利用者によって用いられる端末等において本体プログラムに組み込まれる。これにより、例えば本体プログラムの入力項目に対する利用者のデータ入力の際に、当該データを選択入力させるための画面(画面選択肢)が当該利用者に対して表示される。   The program generation device 300 provides the user with a set of the main body program generated in step S42, the input check rule program generated in step S44, and the screen option display program generated in step S45, for example. Similar to the input check rule program, the screen option display program is incorporated in the main body program in a terminal or the like used by the user. Thereby, for example, when the user inputs data to the input item of the main program, a screen (screen option) for selectively inputting the data is displayed to the user.

ここで、図14は、画面選択肢生成部304によって生成された画面選択肢表示プログラムが実行された場合に表示される画面選択肢の一例を示す。図14に示す画面選択肢400は、上記した図11に示すテーブル構造定義情報に基づいて生成された画面選択肢表示プログラムが実行されることによって表示される画面であるとする。   Here, FIG. 14 shows an example of screen options displayed when the screen option display program generated by the screen option generation unit 304 is executed. The screen option 400 shown in FIG. 14 is a screen displayed by executing the screen option display program generated based on the table structure definition information shown in FIG. 11 described above.

上記したように図11に示すテーブル構造定義情報に含まれるカラム名「hiredate」、型「TIMESTAMP」及びカラム属性「分間隔」に対応付けられているカラム属性値は、「10」である。この場合、利用者が「TIMESTAMP型」である日付(時間)データを入力項目として入力する際には、図14に示すように10分間隔のプルダウンメニュー(プルダウンリスト)が画面選択肢400として表示される。これにより、本体プログラムを利用する利用者が日付データを入力する際には、当該本体プログラムに組み込まれた画面選択肢表示プログラムにより表示された画面選択肢400において適切な時間を選択することにより容易に日付データを入力することが可能となる。   As described above, the column attribute value associated with the column name “hiredate”, the type “TIMESTAMP”, and the column attribute “minute interval” included in the table structure definition information illustrated in FIG. 11 is “10”. In this case, when the user inputs date (time) data of “TIMESTAMP type” as an input item, a pull-down menu (pull-down list) at 10-minute intervals is displayed as a screen option 400 as shown in FIG. The Thus, when a user who uses the main body program inputs date data, the date can be easily selected by selecting an appropriate time in the screen option 400 displayed by the screen option display program incorporated in the main body program. Data can be input.

上記したように本実施形態においては、前述した第1の実施形態における入力チェックルールプログラムに加えて、データベース40に格納されているテーブルに保持されているデータ(テーブル格納データ)の解析結果が含まれたテーブル構造定義情報に基づいて、画面選択肢表示プログラムが入力補助プログラムとして生成される。   As described above, in this embodiment, in addition to the input check rule program in the first embodiment described above, the analysis result of the data (table storage data) held in the table stored in the database 40 is included. A screen option display program is generated as an input auxiliary program based on the table structure definition information.

これにより、本実施形態においては、前述した第1の実施形態と比較して、データベース40に格納されているテーブルの構造だけでは取得できないデータの分布または間隔を実際にテーブルに保持されているデータを解析することによって取得し、当該解析結果に基づいて入力補助プログラム(画面選択肢表示プログラム)を自動的に生成することができる。このため、本実施形態においては、アプリケーションの生産効率を向上させることが可能となる。   As a result, in this embodiment, as compared with the first embodiment described above, the data distribution or interval that cannot be obtained only by the structure of the table stored in the database 40 is actually stored in the table. And an input auxiliary program (screen option display program) can be automatically generated based on the analysis result. For this reason, in this embodiment, it becomes possible to improve the production efficiency of an application.

なお、本願発明は、上記各実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記各実施形態に開示されている複数の構成要素の適宜な組合せにより種々の発明を形成できる。例えば、各実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に亘る構成要素を適宜組合せてもよい。   Note that the present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. Further, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the above embodiments. For example, some components may be deleted from all the components shown in each embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.

本発明の第1の実施形態に係るプログラム生成装置のハードウェア構成を示すブロック図。The block diagram which shows the hardware constitutions of the program production | generation apparatus which concerns on the 1st Embodiment of this invention. 図1に示すプログラム生成装置30の主として機能構成を示すブロック図。The block diagram which mainly shows the function structure of the program generation apparatus 30 shown in FIG. 図2に示すテーブル情報取得部32によって取得されるテーブル情報のデータ構造の一例を示す図。The figure which shows an example of the data structure of the table information acquired by the table information acquisition part 32 shown in FIG. 図2に示すテーブル構造定義情報格納部22に格納されるテーブル構造定義情報のデータ構造の一例を示す図。The figure which shows an example of the data structure of the table structure definition information stored in the table structure definition information storage part 22 shown in FIG. 本実施形態に係るプログラム生成装置30におけるテーブル構造定義情報を生成する処理の処理手順を示すフローチャート。The flowchart which shows the process sequence of the process which produces | generates the table structure definition information in the program production | generation apparatus 30 which concerns on this embodiment. データ情報取得部32によって取得されたスキーマ名及びテーブル名が表示される画面の一例を示す図。The figure which shows an example of the screen on which the schema name and table name which were acquired by the data information acquisition part 32 are displayed. 本実施形態に係るプログラム生成装置30におけるプログラムを生成する処理の処理手順を示すフローチャート。The flowchart which shows the process sequence of the process which produces | generates the program in the program production | generation apparatus 30 which concerns on this embodiment. 入力チェックルール生成部35によって生成された入力チェックルールプログラムで使用される設定ファイルの一例について説明するための図。The figure for demonstrating an example of the setting file used with the input check rule program produced | generated by the input check rule production | generation part 35. FIG. 入力チェックエラー画面の一例を示す図。The figure which shows an example of an input check error screen. 本発明の第2の実施形態に係るプログラム生成装置の主として機能構成を示すブロック図。The block diagram which mainly shows the function structure of the program generation apparatus which concerns on the 2nd Embodiment of this invention. 図10に示すテーブル構造定義情報格納部22に格納されるテーブル構造定義情報のデータ構造の一例を示す図。The figure which shows an example of the data structure of the table structure definition information stored in the table structure definition information storage part 22 shown in FIG. 本実施形態に係るプログラム生成装置300におけるテーブル構造定義情報を生成する処理の処理手順を示すフローチャート。The flowchart which shows the process sequence of the process which produces | generates the table structure definition information in the program production | generation apparatus 300 which concerns on this embodiment. 本実施形態に係るプログラム生成装置300におけるプログラムを生成する処理の処理手順を示すフローチャート。The flowchart which shows the process sequence of the process which produces | generates the program in the program production | generation apparatus 300 which concerns on this embodiment. 画面選択肢生成部304によって生成された画面選択肢表示プログラムが実行された場合に表示される画面選択肢の位置例を示す図。The figure which shows the example of a position of the screen choice displayed when the screen choice display program produced | generated by the screen choice production | generation part 304 is performed.

符号の説明Explanation of symbols

10…コンピュータ、20…外部記憶装置、22…テーブル構造定義情報格納部、23…入力チェックルールテンプレート格納部、30,300…プログラム生成装置、31…全体制御部、32,301…テーブル情報取得部、33,303…データ項目仕様生成部、34…プログラム生成部、35…入力チェックルール生成部、40…データベース、302…データ解析部、304…画面選択子生成部。   DESCRIPTION OF SYMBOLS 10 ... Computer, 20 ... External storage device, 22 ... Table structure definition information storage part, 23 ... Input check rule template storage part, 30, 300 ... Program generation apparatus, 31 ... Overall control part, 32, 301 ... Table information acquisition part 33, 303 ... data item specification generation unit, 34 ... program generation unit, 35 ... input check rule generation unit, 40 ... database, 302 ... data analysis unit, 304 ... screen selector generation unit.

Claims (5)

データベースに格納されているデータを保持するテーブルに対して処理を行うためのプログラムを利用する利用者のデータ入力を補助するための入力補助プログラムの生成に用いられるテンプレートを当該テーブルに保持されるデータの種類に対応付けて予め格納するテンプレート格納手段とテーブル構造定義情報格納手段とを有する外部記憶装置と、当該外部記憶装置を利用するコンピュータとから構成されるプログラム生成装置において、前記コンピュータによって実行されるプログラム生成用プログラムであって、
前記コンピュータに、
前記データベースに格納されているテーブルの構造を示すテーブル情報であって、当該テーブルに保持されるデータの種類を含むテーブル情報及び当該テーブルに保持されているデータを、前記データベースに格納されている当該テーブルから取得するステップと、
前記取得されたデータを解析するステップと、
前記取得されたテーブル情報によって示されるテーブルの構造及び前記解析結果に基づいて、当該テーブル情報に含まれるデータの種類及び当該テーブルに保持されるデータの範囲を含むテーブル構造定義情報を生成するステップと、
前記生成されたテーブル構造定義情報を前記テーブル構造定義情報格納手段に格納するステップと、
前記テーブル構造定義情報格納手段に格納されたテーブル構造定義情報に含まれるデータの範囲を、当該テーブル構造定義情報に含まれるデータの種類に対応付けて前記テンプレート格納手段に格納されているテンプレートに当てはめることによって入力チェックルールプログラムを生成するステップ
を実行させるためのプログラム生成用プログラム。
Data stored in the table that is used to generate an input assistance program for assisting the user to input data using a program for processing a table that stores data stored in the database In a program generation device comprising an external storage device having a template storage means and a table structure definition information storage means stored in advance in association with the type of data, and a computer using the external storage device, the program generation device is executed by the computer. A program generation program,
In the computer,
Table information indicating the structure of the table stored in the database, the table information including the type of data held in the table and the data held in the table are stored in the database Steps to get from the table;
Analyzing the acquired data;
Based on the structure and the analysis results of the table indicated by the obtained table information, the step of generating a table structure definition information including range of data held on the type and the table of data included in the table information When,
Storing the generated table structure definition information in the table structure definition information storage means;
The range of data included in the table structure definition information stored in the table structure definition information storage unit is applied to the template stored in the template storage unit in association with the type of data included in the table structure definition information. the method comprising the steps of: generating an input check rule program by
Program generation program for executing
前記生成されたテーブル構造定義情報は、前記解析結果を更に含み、  The generated table structure definition information further includes the analysis result,
前記コンピュータに、前記利用者のデータ入力の際に当該利用者にデータを選択入力させる画面を表示させるための画面選択肢表示プログラムを、前記テーブル構造定義情報格納手段に格納されたテーブル構造定義情報に含まれる解析結果に基づいて生成するステップを更に実行させることを特徴とする請求項1記載のプログラム生成用プログラム。  In the table structure definition information stored in the table structure definition information storage means, a screen option display program for causing the computer to display a screen for allowing the user to select and input data when the user inputs data is stored in the table structure definition information storage means. The program generation program according to claim 1, further comprising a step of generating based on the included analysis result.
前記コンピュータに、前記テーブル構造定義情報格納手段に格納されたテーブル構造定義情報に基づいて、前記データベースに格納されているテーブルに対して処理を行うプログラムを生成するステップを更に実行させることを特徴とする請求項1記載のプログラム生成用プログラム。   And causing the computer to further execute a step of generating a program for processing the table stored in the database based on the table structure definition information stored in the table structure definition information storage means. The program generation program according to claim 1. 前記生成された入力チェックルールプログラムは、前記テンプレートに当てはめられた前記テーブル構造定義情報に含まれるデータの範囲外のデータ入力がされた場合に、当該データ入力をエラーとする処理を行うためのプログラムであることを特徴とする請求項1記載のプログラム生成用プログラム。 Input validation rules programmed the generated, when the data input outside the data contained in the table structure definition information that has been fit to the template is, up for performing the process of an error the data input The program generation program according to claim 1, wherein the program generation program is a program. データを保持するテーブルを格納するデータベースと接続されているプログラム生成装置において、
前記データベースに格納されているテーブルに対して処理を行うためのプログラムを利用する利用者のデータ入力を補助するための入力補助プログラムの生成に用いられるテンプレートを当該テーブルに保持されるデータの種類に対応付けて予め格納するテンプレート格納手段と、
前記データベースに格納されているテーブルの構造を示すテーブル情報であって、当該テーブルに保持されるデータの種類を含むテーブル情報及び当該テーブルに保持されているデータを、前記データベースに格納されている当該テーブルから取得するテーブル情報取得手段と、
前記取得されたデータを解析する解析手段と、
前記取得されたテーブル情報によって示されるテーブルの構造及び前記解析結果に基づいて、当該テーブル情報に含まれるデータの種類及び当該テーブルに保持されるデータの範囲を含むテーブル構造定義情報を生成するデータ項目仕様生成手段と、
前記生成されたテーブル構造定義情報を格納するテーブル構造定義情報格納手段と、
前記テーブル構造定義情報格納手段に格納されたテーブル構造定義情報に含まれるデータの範囲を、当該テーブル構造定義情報に含まれるデータの種類に対応付けて前記テンプレート格納手段に格納されているテンプレートに当てはめることによって入力チェックルールプログラムを生成する入力チェックルール生成手段と
を具備することを特徴とするプログラム生成装置。
In a program generator connected to a database that stores a table that holds data,
A template used to generate an input assistance program for assisting a user who uses a program for performing processing on a table stored in the database is used as a type of data held in the table. Template storage means for storing in advance in association with each other;
Wherein a table information indicating a structure of a table stored in the database, the the data held in the table information and the table including the type of data held in the table, are stored in the database Table information acquisition means for acquiring from the table;
Analyzing means for analyzing the acquired data;
A data item for generating table structure definition information including the type of data included in the table information and the range of data held in the table based on the structure of the table indicated by the acquired table information and the analysis result Specification generation means;
Table structure definition information storage means for storing the generated table structure definition information;
The range of data included in the table structure definition information stored in the table structure definition information storage unit is applied to the template stored in the template storage unit in association with the type of data included in the table structure definition information. program generating apparatus characterized by comprising an input check rule generation means for generating an input check rule program by.
JP2008276833A 2008-10-28 2008-10-28 Program generating program and program generating apparatus Active JP5023038B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008276833A JP5023038B2 (en) 2008-10-28 2008-10-28 Program generating program and program generating apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008276833A JP5023038B2 (en) 2008-10-28 2008-10-28 Program generating program and program generating apparatus

Publications (2)

Publication Number Publication Date
JP2010108055A JP2010108055A (en) 2010-05-13
JP5023038B2 true JP5023038B2 (en) 2012-09-12

Family

ID=42297479

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008276833A Active JP5023038B2 (en) 2008-10-28 2008-10-28 Program generating program and program generating apparatus

Country Status (1)

Country Link
JP (1) JP5023038B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012038103A (en) * 2010-08-06 2012-02-23 Toshiba Corp Setting information input support program and setting information input support device
JP5074615B1 (en) * 2011-07-13 2012-11-14 株式会社コナミデジタルエンタテインメント Display management apparatus and program
JP5487181B2 (en) * 2011-09-30 2014-05-07 株式会社東芝 Setting information input support apparatus and program
JP2013238976A (en) * 2012-05-14 2013-11-28 Nomura Research Institute Ltd Source code generation system
JP6629157B2 (en) 2016-09-06 2020-01-15 株式会社東芝 system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3516843B2 (en) * 1997-08-08 2004-04-05 三菱電機株式会社 Database access method
JP2005055951A (en) * 2003-08-04 2005-03-03 Canon Software Inc Program generation device and method, program, and storage medium

Also Published As

Publication number Publication date
JP2010108055A (en) 2010-05-13

Similar Documents

Publication Publication Date Title
US20130132471A1 (en) Application Development Support Device, Program and Storage Medium
US20140136958A1 (en) Relating to distributed access infrastructure for a database
WO2011033644A1 (en) Application development assisting device, program, and recording medium
JP5023038B2 (en) Program generating program and program generating apparatus
JP5267732B2 (en) Web page control method, computer system, and program
KR20130040057A (en) System and method for producing homepage in saas environment, a computer-readable storage medium therefor
JP4783235B2 (en) HMI development support device, HMI development support method and program
JP2007048009A (en) Operation support system, its database server, preparation management device and program
JP6304433B2 (en) Information processing apparatus, server, processing method thereof, and program
JP6231260B2 (en) Screen control system, screen control program, screen creation support program, and screen control method
JP3964259B2 (en) PROGRAM GENERATION DEVICE, PROGRAM GENERATION METHOD, AND PROGRAM GENERATION PROGRAM
JP4386243B2 (en) PROGRAM GENERATION DEVICE, PROGRAM GENERATION METHOD, PROGRAM AND RECORDING MEDIUM
JP2006163855A (en) Web application development support device, and development support method
JPH11288412A (en) Method and system for preparing document, and computer readable recording medium for recording document preparation program
JP7105683B2 (en) Electronic computer, method and program
JP4957043B2 (en) Information processing apparatus, program, and business application introduction method
JP2006276989A (en) Web page contents generating system
JP2013238976A (en) Source code generation system
JP6331307B2 (en) Information processing apparatus, information processing apparatus control method, and program
JP6265030B2 (en) Application development system, development device data processing method, and program
JP7322255B2 (en) Electronic computer, method and program
JP5962116B2 (en) Screen control system, screen control program, screen creation support program, and screen control method
JP4706001B2 (en) Design computer programs
JP2009064347A (en) Work support information display, and work support information display method
JP4630640B2 (en) Design information verification apparatus and design information verification method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110726

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110926

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120522

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120618

R150 Certificate of patent or registration of utility model

Ref document number: 5023038

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150622

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350