WO2014064746A1 - データ操作命令生成装置、データ操作命令生成システム、データ操作命令生成方法およびデータ操作命令生成プログラム - Google Patents

データ操作命令生成装置、データ操作命令生成システム、データ操作命令生成方法およびデータ操作命令生成プログラム Download PDF

Info

Publication number
WO2014064746A1
WO2014064746A1 PCT/JP2012/077199 JP2012077199W WO2014064746A1 WO 2014064746 A1 WO2014064746 A1 WO 2014064746A1 JP 2012077199 W JP2012077199 W JP 2012077199W WO 2014064746 A1 WO2014064746 A1 WO 2014064746A1
Authority
WO
WIPO (PCT)
Prior art keywords
syntax
individual
sql
definition
item
Prior art date
Application number
PCT/JP2012/077199
Other languages
English (en)
French (fr)
Inventor
悠美子 毛利
Original Assignee
三菱電機株式会社
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 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2012/077199 priority Critical patent/WO2014064746A1/ja
Priority to TW101144109A priority patent/TW201416893A/zh
Publication of WO2014064746A1 publication Critical patent/WO2014064746A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/2448Query languages for particular applications; for extensibility, e.g. user defined types
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages

Definitions

  • the present invention relates to a data operation instruction generation device, a data operation instruction generation system, a data operation instruction generation method, and a data operation instruction generation program that generate, for example, a SQL statement (an example of a data operation instruction) having a specific SQL syntax. .
  • a SQL statement an example of a data operation instruction
  • SQL Structured Query Language
  • DBMS Data Base Management System
  • a client device in order to absorb a difference in syntax system between DBMSs, a client device generates a standard SQL, and a server device for language conversion converts a standard SLQ into a dedicated SQL for a specific DBMS by a conversion routine (program) for each DBMS.
  • a conversion routine program
  • Patent Document 1 There is also a technology that eliminates the need for SQL by generalizing the DBMS data structure using a unique description method (for example, XSLT) and providing a mechanism for performing data operations on this general-purpose data structure.
  • Patent Document 2 discloses two embodiments.
  • the data structure is generalized in units of SQL instructions.
  • setting files such as an inquiry conversion file and an inquiry result conversion file every time the SQL instruction to be executed is changed.
  • the information system for FA since the SQL command is changed for each product to be produced, the convenience for the user is lowered and it is difficult for the user who has no knowledge of DB to use.
  • the user tends not to accept that the server device in operation is modified, and it is required to cope without modifying the server device.
  • An object of the present invention is to make it possible to easily generate, for example, an SQL statement according to an SQL syntax used in a specific database.
  • the data operation instruction generation device of the present invention includes: A basic syntax that stores one or more basic syntax items that constitute a basic syntax definition that defines a data manipulation instruction for accessing a database, and stores a basic item definition that defines a basic syntax item for each basic syntax item A storage unit; One or more individual syntax items constituting an individual syntax definition at least partially different from the basic syntax definition are stored, and an individual syntax item is stored for each individual syntax item different from any of the one or more basic syntax items.
  • An individual syntax storage unit for storing individual item definitions to be defined;
  • a basic item definition that selects an individual syntax item in which an individual item definition is not stored among the one or more individual syntax items stored in the individual syntax storage unit and defines the same basic syntax item as the selected individual syntax item
  • a basic item definition acquisition unit for acquiring from the basic syntax storage unit,
  • a data operation instruction generation unit configured to generate the data operation instruction based on each individual item definition stored in the individual syntax storage unit and the basic item definition acquired by the basic item definition acquisition unit;
  • an SQL statement an example of a data operation instruction
  • an SQL syntax used in a specific database for example, it is possible to easily generate an SQL statement (an example of a data operation instruction) according to an SQL syntax used in a specific database.
  • FIG. 1 is a configuration diagram of a DB access system 100 according to Embodiment 1.
  • FIG. FIG. 6 is a diagram illustrating an example of a basic SQL profile 291 according to the first embodiment.
  • FIG. 6 is a diagram illustrating an example of an individual SQL profile 292 according to the first embodiment.
  • FIG. 6 is a diagram illustrating an example of an individual SQL profile 292 according to the first embodiment.
  • FIG. 6 is a diagram showing an example of a generated SQL definition file 293 according to the first embodiment.
  • FIG. 6 is a diagram showing an example of a generated SQL definition file 293 according to the first embodiment.
  • 3 is a flowchart showing a data operation language generation method according to the first embodiment.
  • FIG. 3 is a schematic diagram showing a data operation language generation method in the first embodiment.
  • FIG. 6 is a flowchart showing SQL sentence generation processing (S140) according to the first embodiment. 6 is a flowchart showing tag-related processing (S146) in the first embodiment.
  • FIG. 3 is a diagram illustrating an example of hardware resources of the data manipulation language generation device 200 according to the first embodiment.
  • FIG. 3 is a configuration diagram of a DB access system 100 according to a second embodiment.
  • FIG. 10 is a diagram showing an example of an individual SQL profile creation screen 400 in the second embodiment.
  • FIG. 10 is a diagram showing an example of an individual SQL profile creation screen 400 in the second embodiment.
  • FIG. 10 shows an example of a generated SQL definition file creation screen 410 according to the second embodiment.
  • FIG. 10 shows an example of a generated SQL definition file creation screen 410 according to the second embodiment.
  • Embodiment 1 A mode for easily generating an SQL statement according to the SQL syntax used in a specific database will be described.
  • SQL Structured Query Language
  • DB database
  • SQL types include data manipulation language (DML), data definition language (DDL), and data control language (DCL).
  • DML data manipulation language
  • DDL data definition language
  • DCL data control language
  • SQL is described as an example, but a data operation language other than SQL may be used.
  • FIG. 1 is a configuration diagram of a DB access system 100 according to the first embodiment. The configuration of the DB access system 100 according to the first embodiment will be described with reference to FIG.
  • the DB access system 100 is an information processing system for accessing databases (111A, 111B).
  • the DB access system 100 includes a data manipulation language generation device 200 and one or more DB servers 110.
  • the data operation language generation device 200 (an example of a data operation instruction generation device) and the DB servers 110A and 110B are connected for communication via a network or the like.
  • the DB server 110A includes a database 111A
  • the DB server 110B includes a database 111B.
  • the SQL statement for accessing the database 111A and the SQL statement for accessing the database 111B have different syntax at least in part. Therefore, when accessing the database 111A, the data manipulation language generation device 200 generates an SQL statement with the syntax for the database 111A. Further, when accessing the database 111B, the data manipulation language generation device 200 generates an SQL sentence with a syntax for the database 111B.
  • the data manipulation language generation device 200 is a device that accesses a plurality of databases 111A and 111B having different SQL syntaxes.
  • the data manipulation language generation device 200 is used by being incorporated in an FA device that constitutes an FA (Factory Automation).
  • the data manipulation language generation device 200 includes an SQL generation unit 210, an SQL execution unit 220, and a device storage unit 290. Below, the outline
  • the SQL generation unit 210 accesses the databases (111A, 111B) based on a basic SQL profile 291, an individual SQL profile 292, and a generated SQL definition file 293 described later.
  • An SQL statement for generating For example, when accessing the database 111A, the SQL generation unit 210 generates an SQL sentence using the individual SQL profile 292 for the database 111A. Further, when accessing the database 111B, the SQL generation unit 210 generates an SQL sentence using the individual SQL profile 292 for the database 111B.
  • the SQL sentence generated by the SQL generation unit 210 is referred to as “generated SQL 294”.
  • the SQL generation unit 210 includes a plurality of tag related processing units 211 for generating the generation SQL 294.
  • the SQL execution unit 220 transmits the generated SQL 294 generated by the SQL generation unit 210 to the DB server (110A or 110B), receives the execution result of the generated SQL 294 from the DB server, and outputs the received execution result.
  • the execution result of the generated SQL 294 is referred to as “SQL execution result 295”.
  • the device storage unit 290 (an example of a basic syntax storage unit, an individual syntax storage unit, and a generation instruction definition storage unit) stores data used in the data manipulation language generation device 200.
  • the device storage unit 290 stores the following data.
  • the device storage unit 290 includes a basic SQL profile 291 (an example of a basic syntax storage unit), an individual SQL profile 292 (an example of an individual syntax storage unit), a generated SQL definition file 293 (an example of a generated instruction definition storage unit), and an execution schedule 296. Is stored in advance.
  • the execution schedule 296 is data defining a schedule for generating the generation SQL 294.
  • the device storage unit 290 stores the generated SQL 294 generated by the SQL generation unit 210 and the SQL execution result 295 acquired by the SQL execution unit 220.
  • the device storage unit 290 stores collected data 297 acquired from the FA device in which the data manipulation language generation device 200 is incorporated.
  • the collected data 297 is data for specifying a setting value to be set in the generated SQL 294.
  • the basic SQL profile 291 is data defining a basic form of the SQL syntax.
  • the user defines a standard or general SQL syntax in the basic SQL profile 291 in advance.
  • the SQL syntax defined in the basic SQL profile 291 is referred to as “basic SQL syntax”.
  • the individual SQL profile 292 is data defining the SQL syntax corresponding to the type of database for each type of database (111A or 111B).
  • the individual SQL profile 292 defines an SQL syntax different from the basic SQL syntax among the SQL syntaxes according to the type of the database.
  • the user generates in advance an individual SQL profile 292 for the database 111A and an individual SQL profile 292 for the database 111B.
  • the SQL syntax defined in the individual SQL profile 292 is referred to as “individual SQL syntax” or “differential SQL syntax”.
  • the generated SQL definition file 293 is data that defines an SQL sentence for each SQL sentence generated as the generated SQL 294.
  • the generated SQL definition file 293 specifies an individual SQL profile 292 used to generate the generated SQL 294, and specifies a character string, a value, data, and the like set in the generated SQL 294.
  • the user generates an individual SQL profile 292 in advance for each SQL sentence to be generated by the data manipulation language generation device 200.
  • FIG. 2 is a diagram showing an example of the basic SQL profile 291 in the first embodiment.
  • the basic SQL profile 291 in the first embodiment will be described with reference to FIG.
  • the basic SQL profile 291A defines the basic SQL syntax using BNF (Bacchus Nauer notation). However, the basic SQL syntax may be defined using notation other than BNF. Description of the BNF notation is omitted.
  • the basic SQL profile 291A defines a basic SQL syntax for each SQL instruction such as a SELECT instruction or an UPDATE instruction.
  • the basic SQL profile 291A shows basic SQL syntax defined using tags under the comment line “// basic SQL syntax written”. Tags surrounded by ⁇ > such as ⁇ select> are tags. The basic SQL profile 291A indicates the type of each tag included in the basic SQL syntax under the comment line “// tag type”.
  • each line defining the basic SQL syntax indicates a tag for defining an SQL instruction
  • the right side indicates a syntax for defining a tag on the left side (hereinafter referred to as tag definition).
  • the tag definition includes (1) a character string, (2) a reference tag, and (3) a dynamic tag.
  • the character string is a static character set in the generated SQL 294.
  • “SELECT” and “FROM” included in a line starting with ⁇ select> are (1) examples of character strings.
  • “ALL” and “DISTINCT” included in a line starting from ⁇ select_distinct> are an example of (1) a character string.
  • the reference tag is a tag for referring to another tag. For example, ⁇ select_distinct> ⁇ column_list> ⁇ table_list> included in a line beginning with ⁇ select> is an example of (2) a reference tag.
  • the dynamic tag is a tag representing dynamic information that varies depending on the generated SQL definition file 293.
  • ⁇ table_name> included in a line starting from ⁇ table_list> is an example of (3) a dynamic tag.
  • (1) a character string, (2) a reference tag, and (3) a dynamic tag constituting a tag definition are referred to as “SQL items”.
  • ⁇ Analysis> means an analysis tag that requires character string analysis
  • ⁇ dynamic> means a dynamic tag whose value is dynamically set.
  • ⁇ sql_basic_select> needs to analyze ⁇ select> and the like
  • the type of ⁇ sql_basic_select> is ⁇ analysis>.
  • ⁇ select_distinct> is replaced with one of the character strings “ALL” and “DISTINCT”, the type of ⁇ select_distinct> is ⁇ dynamic>.
  • FIG. 3 and 4 are diagrams illustrating an example of the individual SQL profile 292 according to the first embodiment.
  • the individual SQL profile 292 in the first embodiment will be described with reference to FIG. 3 and FIG.
  • the individual SQL profiles 292A and 292B shown in FIG. 3 and FIG. 4 define the SQL syntax using BNF.
  • the SQL syntax may be defined using a notation method other than BNF.
  • Individual SQL profiles 292A and 292B shown in FIGS. 3 and 4 define the individual SQL syntax of the SELECT instruction. That is, the individual SQL syntax of the SELECT instruction defined by the individual SQL profiles 292A and 292B is at least partially different from the basic SQL syntax of the SELECT instruction defined by the basic SQL profile 291A (see FIG. 2).
  • the individual SQL syntax of the SELECT instruction defined by the individual SQL profile 292B shown in FIG. 4 is SQL items ⁇ dif_select constituting the SQL syntax. > Is different.
  • the last symbol “;” in the line starting from ⁇ sql_select_db2> shown in FIG. 4 is an example of (1) a character string.
  • FIGS. 5 and 6 are diagrams illustrating an example of the generated SQL definition file 293 according to the first embodiment.
  • the generated SQL definition file 293 according to the first embodiment will be described with reference to FIGS.
  • the generated SQL definition file 293A shown in FIG. 5 includes a line starting with “individual SQL profile” and a line starting with “generated SQL instruction” under the comment line “// generated SQL information”.
  • the line beginning with “individual SQL profile” is a line for specifying the individual SQL profile 292 to be used.
  • the line starting with “generation SQL instruction” is a line for specifying a SQL instruction to be generated among a plurality of SQL instructions defined in the individual SQL profile 292.
  • an individual SQL profile 292 identified by the name “db1_profile” and an SQL instruction defined by a tag named “sql_select_db1” are designated.
  • the generated SQL definition file 293B shown in FIG. 6 is an example in which the same SQL sentence as the generated SQL 294 defined in the generated SQL definition file 293A shown in FIG. 5 is defined using tags.
  • FIG. 7 is a flowchart showing a data manipulation language generation method according to the first embodiment.
  • FIG. 8 is a schematic diagram illustrating a data manipulation language generation method according to the first embodiment. A data manipulation language generation method according to the first embodiment will be described with reference to FIGS.
  • the user Before the data manipulation language generation method shown in FIG. 7 is executed, the user generates a basic SQL profile 291, a necessary individual SQL profile 292, a necessary generation SQL definition file 293, and an execution schedule 296.
  • the execution schedule 296 is stored in the device storage unit 290.
  • the SQL generation unit 210 refers to the execution schedule 296 and selects the generation SQL definition file 293 according to the execution schedule 296.
  • the execution schedule 296 is necessary for generating the generation SQL 294 for each execution time for executing the generation SQL 294, the execution time, the file name of the generation SQL definition file 293, the identifier (for example, IP address) of the DB server 110, and so on.
  • the collection information for specifying the collected data 297 is defined in association with each other.
  • the SQL generation unit 210 When the execution schedule 296 associates the execution time “12:00” with the file name “sql_fileA” of the generated SQL definition file 293, the SQL generation unit 210 generates the generated SQL definition file identified by the file name “sql_fileA”.
  • the SQL generation unit 210 acquires the collection data 297 from the FA device according to the specified collection information. However, the SQL generation unit 210 may select the generation SQL definition file 293 at a timing other than the execution time indicated by the execution schedule 296. For example, when the user specifies the generation SQL definition file 293 for the data manipulation language generation device 200, the SQL generation unit 210 may select the generation SQL definition file 293 specified by the user. It progresses to S120 after S110.
  • the SQL generation unit 210 refers to the generated SQL definition file 293 selected in S110, and selects the individual SQL profile 292 specified in the generated SQL definition file 293. For example, it is assumed that the SQL generation unit 210 has selected the generated SQL definition file 293A shown in FIG. 8 in S110. In this case, the SQL generation unit 210 refers to the line starting with “individual SQL profile” in the generated SQL definition file 293A, and identifies the individual identified by the file name “db1_profile” specified in the line starting with “individual SQL profile”. The SQL profile 292 is selected. It progresses to S130 after S120.
  • the SQL generation unit 210 refers to the generated SQL definition file 293 selected in S110, and selects an individual SQL syntax from the individual SQL profile 292 selected in S120. For example, it is assumed that the SQL generation unit 210 selects the generated SQL definition file 293A shown in FIG. 8 in S110, and selects the individual SQL profile 292A shown in FIG. 8 in S120. In this case, the SQL generation unit 210 refers to the line starting with “generation SQL instruction” in the generation SQL definition file 293A, and is defined by a tag named “sql_select_db1” specified in the line starting with “generation SQL instruction”. The individual SQL syntax (SELECT instruction) is selected from the individual SQL profile 292A. It progresses to S140 after S130.
  • the SQL generation unit 210 is defined in the individual SQL syntax of the individual SQL profile 292 selected in S130, the setting options defined in the generated SQL definition file 293 selected in S110, and the basic SQL profile 291.
  • a generation SQL 294 is generated based on the basic SQL syntax. For example, it is assumed that the SQL generation unit 210 selects the generated SQL definition file 293A shown in FIG. 8 at S110, and selects the individual SQL syntax (SELECT instruction) from the individual SQL profile 292A shown in FIG. 8 at S130. In this case, the SQL generation unit 210 generates the generated SQL 294A shown in FIG. 8 based on the basic SQL syntax (SELECT instruction) defined in the basic SQL profile 291A shown in FIG.
  • FIG. 9 is a flowchart showing the SQL sentence generation process (S140) in the first embodiment.
  • the SQL sentence generation process (S140) in the first embodiment will be described with reference to FIG.
  • the SQL statement generation process (S140) includes S141 to S147.
  • the SQL generation unit 210 calls the tag related processing unit 211 that processes the tag that defines the individual SQL syntax selected in S130. For example, it is assumed that the SQL generation unit 210 selects the individual SQL syntax (SELECT instruction) from the individual SQL profile 292A illustrated in FIG. 8 in S130. In this case, the SQL generation unit 210 calls the tag-related processing unit 211 that processes ⁇ sql_select_db1> that defines the individual SQL syntax (SELECT instruction). It progresses to S142 after S141.
  • SELECT instruction the individual SQL syntax
  • the tag related processing unit 211 repeatedly executes the processes from S142 to S147 for each SQL item constituting the individual SQL syntax selected in S130.
  • the tag related processing unit 211 reads one SQL item from the tag definition that defines the individual SQL syntax selected in S130 (see FIG. 7) according to the arrangement order of the SQL items constituting the tag definition. That is, the tag related processing unit 211 reads the first SQL item in the first S142, and reads the second SQL item in the second S142. For example, the tag related processing unit 211 reads the first SQL item ⁇ select> from the tag definition of ⁇ sql_select_db1> shown in FIG. Further, in the second S142, the tag related processing unit 211 reads the second SQL item ⁇ where> from the ⁇ sql_select_db1> tag definition shown in FIG. It progresses to S143 after S142.
  • the tag related processing unit 211 determines whether the SQL item read in S142 is a character string, a dynamic tag, or an analysis tag.
  • the tag related processing unit 211 determines the type of the SQL item as follows. The tag related processing unit 211 determines whether or not the SQL item is a tag. When the SQL item is not a tag, the SQL item is a character string. When the SQL item is a tag, the tag related processing unit 211 determines whether or not the tag is defined in the individual SQL profile 292. When the tag is defined in the individual SQL profile 292, the tag related processing unit 211 refers to the individual SQL profile 292 and determines whether the SQL item is a dynamic tag ⁇ dynamic> or an analysis tag ⁇ analysis>. . If the tag is not defined in the individual SQL profile 292, the tag related processing unit 211 refers to the basic SQL profile 291 and determines whether the SQL item is a dynamic tag ⁇ dynamic> or a reference tag ⁇ analysis>. .
  • the tag related processing unit 211 reads ⁇ select> from the individual SQL profile 292A illustrated in FIG. 8 in S142. This ⁇ select> is not defined in the individual SQL profile 292A. In this case, the tag related processing unit 211 refers to the tag type of ⁇ select> defined in the basic SQL profile 291A shown in FIG. 8 and determines that ⁇ select> is an analysis tag ⁇ analysis>.
  • the process proceeds to S144. If the SQL item is a dynamic tag, the process proceeds to S145. If the SQL item is an analysis tag, the process proceeds to S146.
  • the tag related processing unit 211 writes the character string read in S142 in the generated SQL 294. After S144, the process proceeds to S147.
  • the tag related processing unit 211 acquires setting contents (character string, numerical value, conditional expression, etc.) defined as contents to be set in the dynamic tag read in S142 from the setting options of the generated SQL definition file 293, The acquired setting contents are written in the generation SQL 294.
  • the setting option includes a predetermined variable for specifying the collection data 297
  • the tag related processing unit 211 writes the setting content including the setting value specified in the collection data 297 acquired in S110 to the generation SQL 294.
  • the tag related processing unit 211 performs a character string analysis of the analysis tag read in S142 by executing a tag related process (S146) described later, and writes a character string corresponding to the analysis tag in the generated SQL 294. After S146, the process proceeds to S147.
  • the tag related processing unit 211 determines whether or not there is an SQL item that has not been read from the tag definition of the individual SQL syntax in S142. When the SQL item remains (YES), the process returns to S142. If no SQL item remains (NO), the SQL statement generation process (S140) ends.
  • FIG. 10 is a flowchart showing tag-related processing (S146) in the first embodiment.
  • the tag related process (S146) in Embodiment 1 is demonstrated based on FIG.
  • the tag related process (S146) includes S146-1 to S146-7.
  • the tag related process (S146) is a recursive process and includes a tag related process (S146).
  • the tag related processing unit 211 refers to the individual SQL profile 292, and determines whether or not the analysis tag is defined in the individual SQL profile 292. For example, when the analysis tag is ⁇ select>, the analysis tag ⁇ select> is not defined in the individual SQL profile 292A shown in FIG. When the analysis tag is defined in the individual SQL profile 292 (YES), the process proceeds to S146-2. If the analysis tag is not defined in the individual SQL profile 292 (NO), the process proceeds to S146-3.
  • the tag related processing unit 211 reads the tag definition of the analysis tag from the individual SQL profile 292. After S146-2, the process proceeds to S146-4.
  • the tag related processing unit 211 reads the tag definition of the analysis tag from the basic SQL profile 291. For example, when the analysis tag is ⁇ select>, the tag related processing unit 211 reads the tag definition of the analysis tag ⁇ select> from 291A shown in FIG. The tag definition of the analysis tag ⁇ select> is “SELECT ⁇ select_distinct> ⁇ column_list> FROM ⁇ table_list>”. After S146-3, the process proceeds to S146-4.
  • the tag related processing unit 211 repeatedly executes the processes from S146-4 to S146-8 for each SQL item constituting the tag definition read in S146-2 or S146-3.
  • the tag related processing unit 211 reads one SQL item from the tag definition read in S146-2 or S146-3 according to the arrangement order of the SQL items constituting the tag definition. For example, it is assumed that the tag related processing unit 211 reads the tag definition “SELECT ⁇ select_distinct> ⁇ column_list> FROM ⁇ table_list>” in S146-3. In this case, the tag related processing unit 211 reads the first SQL item “SELECT” of the tag definition in the first S146-4, and reads the second SQL item ⁇ select_distinct> of the tag definition in the second S146-4. . After S146-4, the process proceeds to S146-5.
  • the tag related processing unit 211 determines whether the SQL item read in S146-4 is a character string, a dynamic tag, or an analysis tag.
  • the tag related processing unit 211 determines the type of the SQL item as follows. The tag related processing unit 211 determines whether or not the SQL item is a tag. When the SQL item is not a tag, the SQL item is a character string. If the SQL item is a tag, the tag related processing unit 211 refers to the profile that has read the tag definition, and determines whether the SQL item is a dynamic tag ⁇ dynamic> or an analysis tag ⁇ analysis>.
  • the process proceeds to S146-6. If the SQL item is a dynamic tag, the process proceeds to S146-7.
  • the tag related processing unit 211 executes the tag related processing (S146) for the SQL item (analysis tag) read in S146-4. After the tag related processing (S146), the process proceeds to S146-8.
  • the tag related processing unit 211 writes the character string read in S146-4 to the generated SQL 294. For example, it is assumed that the tag related processing unit 211 has read the first SQL item “SELECT” in S146-4 among the tag definitions of ⁇ select> defined in the basic SQL profile 291A shown in FIG. “SELECT” is a character string. In this case, the tag related processing unit 211 writes the character string “SELECT” in the generated SQL 294A as shown in FIG. After S146-6, the process proceeds to S146-8.
  • the tag related processing unit 211 sets the setting contents defined as the contents to be set in the dynamic tag read in S146-4 from the setting option of the profile read in the tag definition in S146-2 or S146-3. (Character string, numerical value, conditional expression, etc.) are acquired, and the acquired setting contents are written in the generated SQL 294.
  • the setting option includes a predetermined variable that specifies the collection data 297
  • the tag related processing unit 211 generates setting contents including the setting value specified in the collection data 297 acquired in S110 (see FIG. 7). Write to SQL294A.
  • the tag related processing unit 211 reads the second SQL item ⁇ select_distinct> in S146-4 among the tag definitions of ⁇ select> defined in the basic SQL profile 291A shown in FIG. ⁇ Select_distinct> is a dynamic tag that replaces the character string “ALL” or the character string “DISTINCT”.
  • the tag-related processing unit 211 writes the setting content “ALL” of ⁇ select_distinct> to the generated SQL 294A as shown in FIG. After S146-7, the process proceeds to S146-8.
  • the tag related processing unit 211 determines whether or not there remains an SQL item that has not been read from the tag definition in S146-4. When the SQL item remains (YES), the process returns to S146-4. If no SQL item remains (NO), the tag related process (S146) ends.
  • the generated SQL statement 294A shown in FIG. 8 is generated based on the generated SQL definition file 293A, the individual SQL profile 292A, and the basic SQL profile 291A shown in FIG. 8 by the SQL sentence generation processing (S140) described based on FIG. 9 and FIG. Is done.
  • the SQL execution unit 220 transmits the generated SQL 294 generated in S140 to the DB server 110.
  • the DB server 110 receives the generated SQL 294 and inputs the received generated SQL 294 to the database 111.
  • the database 111 executes the input generation SQL 294, generates an SQL execution result 295 (for example, data that satisfies the conditions of the SELECT statement), and outputs the generated SQL execution result 295.
  • the DB server 110 transmits the SQL execution result 295 output from the database 111 to the SQL execution unit 220 of the data manipulation language generation device 200.
  • the SQL execution unit 220 receives the SQL execution result 295 and outputs the received SQL execution result 295. For example, the SQL execution unit 220 outputs the received SQL execution result 295 to the FA device.
  • the processing of the data manipulation language generation method ends by S150.
  • FIG. 11 is a diagram illustrating an example of hardware resources of the data manipulation language generation device 200 according to the first embodiment.
  • the data manipulation language generation device 200 includes a CPU 901 (Central Processing Unit).
  • the CPU 901 is connected to hardware devices such as a ROM 903, a RAM 904, a communication board 905 (communication device), a display 911 (display device), a keyboard 912, a mouse 913, a drive 914, and a magnetic disk device 920 via a bus 902.
  • Control hardware devices is a device that reads and writes storage media such as an FD (Flexible Disk), a CD (Compact Disc), and a DVD (Digital Versatile Disc).
  • FD Flexible Disk
  • CD Compact Disc
  • DVD Digital Versatile Disc
  • the ROM 903, the RAM 904, the magnetic disk device 920, and the drive 914 are examples of storage devices.
  • a keyboard 912, a mouse 913, a communication board 905, and a storage device are examples of input devices.
  • the display 911, the communication board 905, and the storage device are examples of output devices.
  • the communication board 905 is wired or wirelessly connected to a communication network such as a LAN (Local Area Network), the Internet, or a telephone line.
  • a communication network such as a LAN (Local Area Network), the Internet, or a telephone line.
  • the magnetic disk device 920 stores an OS 921 (operating system), a program group 922, and a file group 923.
  • OS 921 operating system
  • program group 922 program group 922
  • file group 923 file group 923
  • the program group 922 includes a program for executing a function described as “unit” in the embodiment.
  • a program for example, a database operation command generation program
  • the program causes the computer to function as “to part” and causes the computer to execute the procedures and methods of “to part”.
  • the file group 923 includes various data (input, output, determination result, calculation result, processing result, etc.) used in “ ⁇ part” described in the embodiment.
  • arrows included in the configuration diagrams and flowcharts mainly indicate input and output of data and signals.
  • the processing of the embodiment described based on the flowchart and the like is executed using hardware such as the CPU 901, a storage device, an input device, and an output device.
  • what is described as “to part” may be “to circuit”, “to apparatus”, and “to device”, and “to step”, “to procedure”, and “to processing”. May be. That is, what is described as “ ⁇ unit” may be implemented by any of firmware, software, hardware, or a combination thereof.
  • the basic SQL profile 291 and the individual SQL profile 292 define SQL in a prescribed format (for example, BNF).
  • the SQL generation unit 210 analyzes information written in a prescribed format and performs associated processing.
  • the basic SQL profile 291 defines a basic “basic SQL”.
  • the individual SQL profile 292 defines different “individual SQL” for each DB type. However, the individual SQL profile 292 defines only a part different from the basic SQL.
  • the SQL generation unit 210 has only generalized processing that does not depend on the DBMS type, and each profile item is associated with this generalized processing. When generating the SQL, the SQL generation unit 210 performs the same process as the basic SQL for the same part as the basic SQL, and performs the process associated individually with the different part.
  • the data manipulation language generation device 200 can generate an SQL sentence for each database 111 having a different SQL syntax by using the individual SQL profile 292.
  • the data manipulation language generation device 200 can absorb not only differences between specific SQL instructions but also differences in the entire system of SQL instructions by the individual SQL profile 292.
  • the data manipulation language generation device 200 can cope with the new database 111 having a different SQL syntax without modifying the program. Since the data manipulation language generation device 200 generates the conventional SQL in accordance with the DBMS, it is not necessary to modify the existing system or add new software (a program, hereinafter the same).
  • the data manipulation language generation device 200 generates a SQL sentence character string according to the externalized profile, so that DBMS and SQL commands can be added and changed without modifying the software inside the embedded device.
  • DBMS and SQL commands can be added and changed without modifying the software inside the embedded device.
  • the data operation instruction generation device includes a basic syntax storage unit, an individual syntax storage unit, a basic item definition acquisition unit, and a data operation instruction generation unit.
  • the basic syntax storage unit (290) includes one or more basic syntax items (tag items) constituting a basic syntax definition (basic SQL syntax) that defines a data manipulation instruction (SQL statement) for accessing the database (111). ) And a basic item definition (tag definition) that defines a basic syntax item for each basic syntax item.
  • the individual syntax storage unit stores one or more individual syntax items (tag definitions) constituting an individual syntax definition (individual SQL syntax) that is at least partially different from the basic syntax definition, and the one or more basic syntax definitions. For each individual syntax item different from any of the syntax items, an individual item definition (tag definition) that defines the individual syntax item is stored.
  • the basic item definition acquisition unit (211) selects an individual syntax item in which an individual item definition is not stored among the one or more individual syntax items stored in the individual syntax storage unit (S146-1), A basic item definition that defines the same basic syntax item as the selected individual syntax item is acquired from the basic syntax storage unit (S146-3).
  • the data operation instruction generation unit (210) is configured to generate the data operation instruction (210) based on each individual item definition stored in the individual syntax storage unit and the basic item definition acquired by the basic item definition acquisition unit. 294) is generated.
  • FIG. A mode for easily creating the individual SQL profile 292 and the generated SQL definition file 293 will be described.
  • items different from the first embodiment will be mainly described. Matters whose description is omitted are the same as those in the first embodiment.
  • FIG. 12 is a configuration diagram of the DB access system 100 according to the second embodiment. The configuration of the DB access system 100 according to the second embodiment will be described with reference to FIG.
  • the DB access system 100 (an example of a data operation instruction generation system) includes a data operation language generation device 200 and a plurality of DB servers 110A and 110B, as in the first embodiment. A part of the configuration of the data manipulation language generation device 200 and the plurality of DB servers 110A and 110B is not shown.
  • the DB access system 100 further includes a profile creation terminal 300.
  • the profile creation terminal 300 is a terminal device (for example, a personal computer) for creating the individual SQL profile 292 and the generated SQL definition file 293.
  • the profile creation terminal 300 (an example of a definition generation device) includes an individual SQL profile creation unit 310, a generation SQL definition file creation unit 320, and a terminal storage unit 390.
  • the individual SQL profile creation unit 310 is configured to create an individual SQL profile 292 in accordance with a user instruction.
  • the generated SQL definition file creation unit 320 is configured to create the generated SQL definition file 293 according to a user instruction.
  • the terminal storage unit 390 is a storage unit that stores data used in the profile creation terminal 300. For example, the terminal storage unit 390 stores setting option information 391 indicating setting option items defined in the generated SQL definition file 293. Further, for example, the terminal storage unit 390 stores a basic SQL profile 291, an individual SQL profile 292, and a generated SQL definition file 293 (not shown).
  • FIG. 13 is a diagram illustrating an example of the individual SQL profile creation screen 400 according to the second embodiment. An example of rearranging the tags constituting the basic SQL syntax and defining the individual SQL syntax of the SELECT instruction will be described with reference to FIG.
  • the profile creation terminal 300 includes a basic SQL profile creation unit that creates the basic SQL profile 291 (not shown).
  • the user inputs information on the basic SQL profile 291 to the profile creation terminal 300.
  • input is performed using an input device such as a keyboard or a mouse (hereinafter, the same applies to input).
  • the basic SQL profile creation unit of the profile creation terminal 300 creates a basic SQL profile 291 according to the input information, and transmits the created basic SQL profile 291 to the data manipulation language generation device 200.
  • the communication unit (not shown) of the data manipulation language generation device 200 receives the basic SQL profile 291 and stores the received basic SQL profile 291 in the device storage unit 290.
  • the user inputs information indicating setting option items to the profile creation terminal 300, and the generation SQL definition file creation unit 320 of the profile creation terminal 300 stores the input information in the terminal storage unit 390 as setting option information 391. .
  • the user inputs the DB type name “db1” to the profile creation terminal 300 using an input device such as a keyboard or a mouse.
  • the individual SQL profile creation unit 310 acquires the basic SQL profile 291 from the data manipulation language generation device 200, and extracts tags that constitute the basic SQL syntax from the acquired basic SQL profile 291.
  • tags constituting the basic SQL syntax are referred to as “basic SQL tags”.
  • a tag constituting the individual SQL syntax is referred to as “individual SQL tag”.
  • the individual SQL profile creation unit 310 displays an individual SQL profile creation screen 400A as shown in FIG. 13 using the basic SQL tag extracted from the basic SQL profile 291 and the DB type “db1” designated by the user. To display.
  • the individual SQL profile creation screen 400A includes a basic SQL tag list 401 that lists basic SQL tags extracted from the basic SQL profile 291 and an individual SQL tag creation field 402 for defining individual SQL tags.
  • the individual SQL tag creation field 402 includes a DB type name 403 designated by the user and a tag name 404 of the individual SQL tag.
  • the tag name 404 is generated based on a predetermined rule.
  • a tag name 404 “db1_select” illustrated in FIG. 13 is a name generated by connecting a DB type name 403 “db1” and a predetermined identifier “select” for identifying a SELECT command with an underscore.
  • the user may input the tag name 404.
  • the user operates the mouse cursor 409 to set the basic SQL tags constituting ⁇ db1_select> from the basic SQL tag list 401 to the tag definition column 405 of the individual SQL tag creation column 402 by drag and drop.
  • the individual SQL profile creation screen 400 includes menus such as “add”, “change”, and “delete”, and the basic SQL tag (or the basic SQL tag whose name has been changed) set by the user in the tag definition field 405 is used as the menu. May be specified.
  • the user may input the tag definition of the individual SQL tag in the tag definition column 405.
  • the user operates the mouse cursor 409 and presses the end button 408.
  • the individual SQL profile creation unit 310 sets the defined contents in the individual SQL profile 292. (6) When all the necessary individual SQL tags are defined, the user requests the individual SQL profile creation unit 310 to transmit the individual SQL profile 292.
  • the individual SQL profile creation unit 310 transmits the individual SQL profile 292 to the data manipulation language generation device 200.
  • the data manipulation language generation device 200 receives the individual SQL profile 292 and stores the received individual SQL profile 292 in the device storage unit 290.
  • FIG. 14 is a diagram showing an example of the individual SQL profile creation screen 400 in the second embodiment.
  • An example of defining a new individual SQL tag ⁇ dif_order_by> having a syntax different from that of the basic SQL tag ⁇ order_by> will be described with reference to FIG. However, a part of the description common to the individual SQL profile creation screen 400A shown in FIG.
  • the individual SQL profile creation unit 310 displays an individual SQL profile creation screen 400B including a basic SQL tag list 401 and an individual SQL tag creation field 402. (3) The user moves the mouse cursor 409 to a portion where the basic SQL tag ⁇ order_by> is indicated in the basic SQL tag list 401, and right-clicks the mouse. (4) The individual SQL profile creation unit 310 displays a predetermined menu list 406.
  • the menu list 406 includes three menus “Paste to individual tag”, “Create individual difference tag”, and “Display basic SQL contents”. “Paste to individual tag” is a menu for setting a basic SQL tag in the tag definition field 405.
  • “Create individual difference tags” is a menu for newly defining individual SQL tags.
  • “Display basic SQL contents” is a menu for displaying the tag definition of the basic SQL tag.
  • the user operates the mouse cursor 409 and selects “Create individual difference tag” from the menu list 406.
  • the individual SQL profile creation unit 310 generates a tag name 404 ⁇ dif_order_by> according to a predetermined rule, and displays the individual SQL tag creation field 402 including the tag name 404 and the tag definition field 405.
  • the tag name 404 ⁇ dif_order_by> is a name obtained by adding the character string “dif_” to the basic SQL tag ⁇ order_by>. However, the user may specify the tag name 404.
  • the user inputs a tag definition in the tag definition field 405, operates the mouse cursor 409, and presses the end button 408.
  • the user may specify available basic SQL tags by drag and drop in the tag definition field 405 as shown in FIG. (8)
  • the individual SQL tag ⁇ dif_order_by> is defined
  • the user operates the mouse cursor 409 and presses the end button 408.
  • the individual SQL profile creation unit 310 sets the defined contents in the individual SQL profile 292.
  • the user requests the individual SQL profile creation unit 310 to transmit the individual SQL profile 292.
  • the individual SQL profile creation unit 310 transmits the individual SQL profile 292 to the data manipulation language generation device 200, and the data manipulation language generation device 200 stores the individual SQL profile 292 in the device storage unit 290.
  • the individual SQL profile creation unit 310 displays the input character string in a predetermined format (for example, a BNF format). It is checked whether it is a valid character string according to). When the input character string is an invalid character string that does not conform to the predetermined format, the individual SQL profile creation unit 310 changes the character string to a red character, or the input character string is an illegal character string. By displaying a message indicating the error, the user is pointed out an error.
  • a predetermined format for example, a BNF format
  • FIG. 15 is a diagram illustrating an example of the generated SQL definition file creation screen 410 according to the second embodiment. An example of generating the generation SQL definition file 293 will be described with reference to FIG.
  • the generated SQL definition file creation unit 320 displays a generated SQL definition file creation screen 410A as shown in FIG.
  • the generated SQL definition file creation screen 410A includes a generated SQL information column 411 and a setting option column 412.
  • the generated SQL information field 411 includes an input field 413 for inputting the name of the individual SQL profile 292 and an input field 413 for inputting the name of the generated SQL instruction.
  • the setting option column 412 includes an input column 413 for each setting option item (use_clause, select_distinct, etc.) indicated by the setting option information 391.
  • the user inputs contents to be set in the generated SQL definition file 293 into each input field 413 of the generated SQL definition file creation screen 410A using an input device such as a keyboard or a mouse.
  • an input device such as a keyboard or a mouse.
  • the generation SQL definition file creation unit 320 sets the setting content input in each input field 413 of the generation SQL definition file creation screen 410A in the generation SQL definition file 293.
  • the user requests the generated SQL definition file creation unit 320 to transmit the generated SQL definition file 293.
  • the generated SQL definition file creation unit 320 transmits the generated SQL definition file 293 to the data manipulation language generation device 200.
  • the data manipulation language generation device 200 receives the generated SQL definition file 293 and stores the received generated SQL definition file 293 in the device storage unit 290.
  • the generated SQL definition file creation unit 320 determines whether or not the character string input in each input field 413 of the generated SQL definition file creation screen 410A is a valid character string according to a predetermined format (for example, BNF format). Inspect. If the input character string is an invalid character string that does not conform to a predetermined format, the generation SQL definition file creation unit 320 changes the character string to a red character, or the input character string is an illegal character string. By displaying a message indicating this, an error is pointed out to the user.
  • a predetermined format for example, BNF format
  • FIG. 16 is a diagram illustrating an example of the generated SQL definition file creation screen 410 according to the second embodiment. An example of generating the generated SQL definition file 293 using the basic SQL tag or the individual SQL tag will be described with reference to FIG.
  • the generated SQL definition file creation unit 320 displays a generated SQL definition file creation screen 410B as shown in FIG. 16 on the display based on the basic SQL profile 291 and the individual SQL profile 292.
  • the generated SQL definition file creation screen 410B includes a basic SQL tag list 414, an individual SQL tag list 415, and a generated SQL command creation field 416.
  • the basic SQL tag list 414 shows a list of basic SQL tags included in the basic SQL profile 291.
  • the individual SQL tag list 415 indicates a list of individual SQL tags included in the individual SQL profile 292.
  • the generation SQL instruction creation field 416 includes a generation SQL instruction definition field 417 for defining a generation SQL instruction.
  • the user operates the mouse cursor 409 to set the basic SQL tag included in the basic SQL tag list 414 or the individual SQL tag included in the individual SQL tag list 415 in the generated SQL command definition field 417 by drag and drop. .
  • (3) When the generated SQL instruction ⁇ user_generate_sql_1> is defined, the user operates the mouse cursor 409 and presses the end button 408. When the end button 408 is pressed, the generation SQL definition file creation unit 320 sets the defined contents in the generation SQL definition file 293.
  • the generation SQL definition file creation unit 320 sets the defined contents in the generation SQL definition file 293.
  • the user requests the generation SQL definition file creation unit 320 to transmit the generation SQL definition file 293.
  • the generated SQL definition file creation unit 320 transmits the generated SQL definition file 293 to the data manipulation language generation device 200.
  • the data manipulation language generation device 200 receives the generated SQL definition file 293 and stores the received generated SQL definition file 293 in the device storage unit 290.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

 装置記憶部290は、基本SQLプロファイル291および個別SQLプロファイル292を記憶する。基本SQLプロファイル291は、データベース111A・111BにアクセスするためのSQL文の基本構文を構成する1つ以上のSQL項目と、各SQL項目を定義するタグ定義とを含む。個別SQLプロファイル292は、SQL文の個別構文を構成する1つ以上のSQL項目と、基本構文と異なるSQL項目を定義するタグ定義とを含む。SQL生成部210は、基本SQLプロファイル291と個別SQLプロファイル292とに基づいてSQL文を生成する。

Description

データ操作命令生成装置、データ操作命令生成システム、データ操作命令生成方法およびデータ操作命令生成プログラム
 本発明は、例えば、特定のSQL構文のSQL文(データ操作命令の一例)を生成するデータ操作命令生成装置、データ操作命令生成システム、データ操作命令生成方法およびデータ操作命令生成プログラムに関するものである。
 DBMS(Data Base Management System)のデータ操作を行うためのデータ操作言語として、一般的に、SQL(Structured Query Language)が使用されている。
 SQLは標準とされる構文体系を有するものの、現実にはDBMSの種別ごとにSQLの構文体系や書式情報は若干異なる。
 従来、DBMS間の構文体系などの差を吸収するため、クライアント機器が標準SQLを生成し、言語変換用のサーバ機器がDBMS別の変換ルーチン(プログラム)によって標準SLQを特定のDBMS用の専用SQLへ変換していた(例えば、特許文献1)。
 また、DBMSのデータ構造を独自の記述法(例えば、XSLT)で汎化して、この汎用のデータ構造に対してデータ操作を行う仕組みを提供することによって、SQLそのものを不要とする技術も存在する(例えば、特許文献2)。
 但し、特許文献1のようにSQLの変換を行う場合、SQLの変換を行うためのサーバ機器を新規で追加する必要があるため、コストがかかってしまう。
 そこで、SQLの変換を行う変換ルーチンを既存のサーバ機器または既存のクライアント機器に追加する方式が考えられる。
 既存のサーバ機器に変換ルーチンを追加する場合、サーバ機器のシステム構成を変更する必要がある。しかし、システム構成を変更する場合、関連するプログラム間のフローおよびサーバ機器のスペックの見直しが発生し、コストがかかってしまう。
 また、FA(Factory Automation)向けの情報システムでは稼働中のサーバ機器のシステム構成に手を加えることをユーザが受け入れない傾向にあり、サーバ機器のシステム構成を変えないで対処することが求められる。
 既存のクライアント機器に変換ルーチンを追加する場合、クライアント機器のプログラムの再コンパイルが必要となる。しかし、FA向けの組み込み機器では、クライアント機器を出荷後に出荷したクライアントのプログラムを再コンパイルすることは困難である。
 特許文献2は二つの実施形態を開示している。
 実施の形態1では、SQL命令の単位でデータ構造を汎化している。この実施の形態の場合、実行するSQL命令が変更されるたびに、問い合わせ変換ファイルおよび問い合わせ結果変換ファイルなどの設定ファイルを修正または追加する必要がある。しかし、FA向けの情報システムでは生産する製品毎にSQL命令が変更となるため、ユーザの利便性が低下し、DBの知識がないユーザによる利用が困難になる。
 実施の形態2では、DBMSの種別ごとに問い合わせ変換ファイルおよび問い合わせ結果変換ファイルがあり、DBMSの種別ごとに変換ルーチンを実装する。この実施の形態の場合、DBMSの追加または変更に対応するため、サーバ機器のプログラムを再コンパイルする必要がある。しかし、FA向けの情報システムでは稼働中のサーバ機器に手を加えることをユーザが受け入れない傾向にあり、サーバ機器に手を加えないで対処することが求められる。
特開平07-065032号公報 特開2001-344147号公報
 本発明は、例えば、特定のデータベースで使用されるSQL構文に従ったSQL文を容易に生成することができるようにすることを目的とする。
 本発明のデータ操作命令生成装置は、
 データベースにアクセスするためのデータ操作命令を定義する基本構文定義を構成する1つ以上の基本構文項目を記憶すると共に、基本構文項目毎に、基本構文項目を定義する基本項目定義を記憶する基本構文記憶部と、
 前記基本構文定義と少なくとも一部が異なる個別構文定義を構成する1つ以上の個別構文項目を記憶すると共に、前記1つ以上の基本構文項目のいずれとも異なる個別構文項目毎に、個別構文項目を定義する個別項目定義を記憶する個別構文記憶部と、
 前記個別構文記憶部に記憶された前記1つ以上の個別構文項目のうち個別項目定義が記憶されていない個別構文項目を選択し、選択した個別構文項目と同じ基本構文項目を定義する基本項目定義を前記基本構文記憶部から取得する基本項目定義取得部と、
 前記個別構文記憶部に記憶された各個別項目定義と、前記基本項目定義取得部によって取得された前記基本項目定義とに基づいて、前記データ操作命令を生成するデータ操作命令生成部とを備える。
 本発明によれば、例えば、特定のデータベースで使用されるSQL構文に従ったSQL文(データ操作命令の一例)を容易に生成することができる。
実施の形態1におけるDBアクセスシステム100の構成図。 実施の形態1における基本SQLプロファイル291の一例を示す図。 実施の形態1における個別SQLプロファイル292の一例を示す図。 実施の形態1における個別SQLプロファイル292の一例を示す図。 実施の形態1における生成SQL定義ファイル293の一例を示す図。 実施の形態1における生成SQL定義ファイル293の一例を示す図。 実施の形態1におけるデータ操作言語生成方法を示すフローチャート。 実施の形態1におけるデータ操作言語生成方法を示す概要図。 実施の形態1におけるSQL文生成処理(S140)を示すフローチャート。 実施の形態1におけるタグ関連処理(S146)を示すフローチャート。 実施の形態1におけるデータ操作言語生成装置200のハードウェア資源の一例を示す図。 実施の形態2におけるDBアクセスシステム100の構成図。 実施の形態2における個別SQLプロファイル作成画面400の一例を示す図。 実施の形態2における個別SQLプロファイル作成画面400の一例を示す図。 実施の形態2における生成SQL定義ファイル作成画面410の一例を示す図。 実施の形態2における生成SQL定義ファイル作成画面410の一例を示す図。
 実施の形態1.
 特定のデータベースで使用されるSQL構文に従ったSQL文を容易に生成するための形態について説明する。
 SQL(Structured Query Language)は、データベースにアクセスするための言語の一例である。以下、データベースを「DB」と記す。
 SQLの種類には、データ操作言語(DML)、データ定義言語(DDL)およびデータ制御言語(DCL)がある。以下、これらを総称してデータ操作言語という。
 実施の形態1ではSQLを例にして説明を行うが、SQL以外のデータ操作言語を用いても構わない。
 図1は、実施の形態1におけるDBアクセスシステム100の構成図である。
 実施の形態1におけるDBアクセスシステム100の構成について、図1に基づいて説明する。
 DBアクセスシステム100は、データベース(111A、111B)にアクセスするための情報処理システムである。
 DBアクセスシステム100は、データ操作言語生成装置200と1つ以上のDBサーバ110とを備える。
 データ操作言語生成装置200(データ操作命令生成装置の一例)と各DBサーバ110A・110Bとは、ネットワーク等を介して通信接続する。
 DBサーバ110Aはデータベース111Aを備え、DBサーバ110Bはデータベース111Bを備える。
 また、データベース111AにアクセスするためのSQL文と、データベース111BにアクセスするためのSQL文とでは、SQL文の少なくとも一部の構文が異なる。
 そのため、データベース111Aにアクセスする場合、データ操作言語生成装置200はデータベース111A用の構文でSQL文を生成する。また、データベース111Bにアクセスする場合、データ操作言語生成装置200はデータベース111B用の構文でSQL文を生成する。
 データ操作言語生成装置200は、SQL構文が異なる複数のデータベース111A・111Bにアクセスする装置である。
 例えば、データ操作言語生成装置200は、FA(Factory Automation)を構成するFA機器に組み込まれて使用される。
 データ操作言語生成装置200は、SQL生成部210、SQL実行部220および装置記憶部290を備える。
 以下に、データ操作言語生成装置200の各構成の概要について説明する。データ操作言語生成装置200の各構成の詳細については別途説明する。
 SQL生成部210(基本項目定義取得部、データ操作命令生成部の一例)は、後述する基本SQLプロファイル291、個別SQLプロファイル292および生成SQL定義ファイル293に基づいて、データベース(111A、111B)にアクセスするためのSQL文を生成する。
 例えば、データベース111Aにアクセスする場合、SQL生成部210はデータベース111A用の個別SQLプロファイル292を用いてSQL文を生成する。また、データベース111Bにアクセスする場合、SQL生成部210はデータベース111B用の個別SQLプロファイル292を用いてSQL文を生成する。
 以下、SQL生成部210によって生成されるSQL文を「生成SQL294」という。
 SQL生成部210は、生成SQL294を生成するための複数のタグ関連処理部211を備える。
 SQL実行部220は、SQL生成部210によって生成された生成SQL294をDBサーバ(110Aまたは110B)へ送信し、生成SQL294の実行結果をDBサーバから受信し、受信した実行結果を出力する。
 以下、生成SQL294の実行結果を「SQL実行結果295」という。
 装置記憶部290(基本構文記憶部、個別構文記憶部、生成命令定義記憶部の一例)は、データ操作言語生成装置200で使用するデータを記憶する。
 例えば、装置記憶部290は以下のようなデータを記憶する。
 装置記憶部290は、基本SQLプロファイル291(基本構文記憶部の一例)、個別SQLプロファイル292(個別構文記憶部の一例)、生成SQL定義ファイル293(生成命令定義記憶部の一例)および実行スケジュール296を予め記憶する。実行スケジュール296は、生成SQL294を生成するスケジュールを定義したデータである。
 装置記憶部290は、SQL生成部210によって生成される生成SQL294と、SQL実行部220によって取得されるSQL実行結果295とを記憶する。
 装置記憶部290は、データ操作言語生成装置200が組み込まれたFA機器から取得される収集データ297を記憶する。収集データ297は、生成SQL294に設定する設定値を指定するデータである。
 基本SQLプロファイル291は、SQL構文の基本形を定義したデータである。
 ユーザは、標準的または一般的なSQL構文を基本SQLプロファイル291に予め定義しておく。
 以下、基本SQLプロファイル291に定義されるSQL構文を「基本SQL構文」という。
 個別SQLプロファイル292は、データベース(111Aまたは111B)の種別毎に、データベースの種別に応じたSQL構文を定義したデータである。
 個別SQLプロファイル292は、データベースの種別に応じたSQL構文のうち、基本SQL構文と異なるSQL構文を定義する。
 ユーザは、データベース111A用の個別SQLプロファイル292とデータベース111B用の個別SQLプロファイル292とを予め生成する。
 以下、個別SQLプロファイル292に定義されるSQL構文を「個別SQL構文」または「差分SQL構文」という。
 生成SQL定義ファイル293は、生成SQL294として生成するSQL文毎に、SQL文を定義するデータである。
 例えば、生成SQL定義ファイル293は、生成SQL294を生成するために使用する個別SQLプロファイル292を指定すると共に、生成SQL294に設定する文字列、値およびデータなどを指定する。
 ユーザは、データ操作言語生成装置200に生成させるSQL文毎に、個別SQLプロファイル292を予め生成する。
 図2は、実施の形態1における基本SQLプロファイル291の一例を示す図である。
 実施の形態1における基本SQLプロファイル291について、図2に基づいて説明する。
 基本SQLプロファイル291Aは、BNF(バッカスナウア記法)を用いて基本SQL構文を定義している。但し、BNF以外の表記法を用いて基本SQL構文を定義しても構わない。BNFの表記法については説明を省略する。
 基本SQLプロファイル291Aは、SELECT命令またはUPDATE命令などのSQL命令毎に、基本SQL構文を定義する。
 基本SQLプロファイル291Aは、コメント行「//基本SQL構文(・・・)」の下に、タグを用いて定義された基本SQL構文を示す。<select>など、<>で囲われているものがタグである。
 基本SQLプロファイル291Aは、コメント行「//タグタイプ」の下に、基本SQL構文に含まれる各タグの種類を示す。
 基本SQL構文を定義する各行の左辺はSQL命令を定義するためのタグを示し、右辺は左辺のタグを定義する構文(以下、タグ定義という)を示す。
 タグ定義は、(1)文字列、(2)参照タグおよび(3)動的タグを含む。
 (1)文字列は、生成SQL294に設定される静的なものである。例えば、<select>で始まる行に含まれる「SELECT」「FROM」は(1)文字列の一例である。また、<select_distinct>から始まる行に含まれる「ALL」「DISTINCT」は(1)文字列の一例である。
 (2)参照タグは、別のタグを参照するためのタグである。例えば、<select>で始まる行に含まれる<select_distinct><column_list><table_list>は(2)参照タグの一例である。
 (3)動的タグは、生成SQL定義ファイル293によって異なる動的な情報を表すタグである。例えば、<table_list>から始まる行に含まれる<table_name>は(3)動的タグの一例である。
 以下、タグ定義を構成する(1)文字列、(2)参照タグおよび(3)動的タグを「SQL項目」という。
 タグの種類には、<analysis>と<dynamic>との2種類が存在する。
 <analysis>は文字列解析が必要な解析タグを意味し、<dynamic>は動的に値が設定される動的タグを意味する。
 例えば、<sql_basic_select>は<select>などを解析する必要があるため、<sql_basic_select>の種類は<analysis>である。
 また、<select_distinct>は「ALL」と「DISTINCT」とのいずれかの文字列に置き換わるため、<select_distinct>の種類は<dynamic>である。
 図3、図4は、実施の形態1における個別SQLプロファイル292の一例を示す図である。
 実施の形態1における個別SQLプロファイル292について、図3および図4に基づいて説明する。
 図3および図4に示す個別SQLプロファイル292A・292Bは、BNFを用いてSQL構文を定義している。但し、BNF以外の表記方法を用いてSQL構文を定義しても構わない。
 図3および図4に示す個別SQLプロファイル292A・292Bは、SELECT命令の個別SQL構文を定義している。
 つまり、個別SQLプロファイル292A・292Bが定義するSELECT命令の個別SQL構文は、基本SQLプロファイル291A(図2参照)が定義するSELECT命令の基本SQL構文と比べて少なくとも一部が異なる。
 図3に示す個別SQLプロファイル292Aが定義するSELECT命令の個別SQL構文は、図2に示した基本SQLプロファイル291Aが定義するSELECT命令の基本SQL構文と比べて、SQL構文を構成するSQL項目<select><where><order_by><group_by>は同じであるが、<order_by>と<group_by>との順番が異なっている。
 図4に示す個別SQLプロファイル292Bが定義するSELECT命令の個別SQL構文は、図2に示した基本SQLプロファイル291Aが定義するSELECT命令の基本SQL構文と比べて、SQL構文を構成するSQL項目<dif_select>が異なっている。
 図4に示す<sql_select_db2>から始まる行の最後の記号「;」は(1)文字列の一例である。
 図5、図6は、実施の形態1における生成SQL定義ファイル293の一例を示す図である。
 実施の形態1における生成SQL定義ファイル293について、図5および図6に基づいて説明する。
 図5に示す生成SQL定義ファイル293Aは、コメント行「//生成SQL情報」の下に、「個別SQLプロファイル」で始まる行と「生成SQL命令」で始まる行とを含む。
 「個別SQLプロファイル」で始まる行は、使用する個別SQLプロファイル292を指定する行である。
 「生成SQL命令」で始まる行は、個別SQLプロファイル292に定義されている複数のSQL命令のうち生成するSQL命令を指定する行である。
 図5では、「db1_profile」という名称で識別される個別SQLプロファイル292、および、「sql_select_db1」という名称のタグで定義されるSQL命令が指定されている。
 図5に示す生成SQL定義ファイル293Aは、コメント行「//設定オプション」の下に、生成SQL294に設定する設定内容を指定する。
 例えば、生成SQL定義ファイル293Aは、個別SQLプロファイル292に含まれる「use_clause」という名称のタグを文字列「where」に置き換えることを指定する。
 また、生成SQL定義ファイル293Aは、個別SQLプロファイル292に含まれる「where_expression」という名称のタグを条件式「test1 >= complete_performance」に置き換えることを指定する。ここで、「complete_performance」は収集データ297に指定される完了実績値を意味している。
 図6に示す生成SQL定義ファイル293Bは、図5に示した生成SQL定義ファイル293Aで定義される生成SQL294と同じSQL文を、タグを用いて定義した例である。
 図7は、実施の形態1におけるデータ操作言語生成方法を示すフローチャートである。
 図8は、実施の形態1におけるデータ操作言語生成方法を示す概要図である。
 実施の形態1におけるデータ操作言語生成方法について、図7および図8に基づいて説明する。
 図7に示すデータ操作言語生成方法が実行される前に、ユーザは、基本SQLプロファイル291、必要な個別SQLプロファイル292、必要な生成SQL定義ファイル293および実行スケジュール296を生成し、生成した各プロファイルおよび実行スケジュール296を装置記憶部290に記憶しておく。
 S110において、SQL生成部210は、実行スケジュール296を参照し、実行スケジュール296に従って生成SQL定義ファイル293を選択する。
 例えば、実行スケジュール296は、生成SQL294を実行する実行時刻毎に、実行時刻と、生成SQL定義ファイル293のファイル名と、DBサーバ110の識別子(例えば、IPアドレス)と、生成SQL294の生成に必要な収集データ297を指定する収集情報とを対応付けて定義している。
 実行スケジュール296が実行時刻「12:00」と生成SQL定義ファイル293のファイル名「sql_fileA」とを対応付けている場合、SQL生成部210は、ファイル名「sql_fileA」で識別される生成SQL定義ファイル293を12時に選択する。
 また、実行スケジュール296に収集情報が指定されている場合、SQL生成部210は、指定されている収集情報に従って収集データ297をFA機器から取得する。
 但し、SQL生成部210は、実行スケジュール296が示す実行時刻以外のタイミングで生成SQL定義ファイル293を選択しても構わない。例えば、ユーザがデータ操作言語生成装置200に対して生成SQL定義ファイル293を指定したときに、SQL生成部210がユーザから指定された生成SQL定義ファイル293を選択しても構わない。
 S110の後、S120に進む。
 S120において、SQL生成部210は、S110で選択した生成SQL定義ファイル293を参照し、生成SQL定義ファイル293に指定された個別SQLプロファイル292を選択する。
 例えば、SQL生成部210は、S110で図8に示す生成SQL定義ファイル293Aを選択したものとする。
 この場合、SQL生成部210は、生成SQL定義ファイル293Aの「個別SQLプロファイル」で始まる行を参照し、「個別SQLプロファイル」で始まる行に指定された「db1_profile」というファイル名で識別される個別SQLプロファイル292を選択する。
 S120の後、S130に進む。
 S130において、SQL生成部210は、S110で選択した生成SQL定義ファイル293を参照し、S120で選択した個別SQLプロファイル292から個別SQL構文を選択する。
 例えば、SQL生成部210は、S110で図8に示す生成SQL定義ファイル293Aを選択し、S120で図8に示す個別SQLプロファイル292Aを選択したものとする。
 この場合、SQL生成部210は、生成SQL定義ファイル293Aの「生成SQL命令」で始まる行を参照し、「生成SQL命令」で始まる行に指定された「sql_select_db1」という名称のタグで定義される個別SQL構文(SELECT命令)を個別SQLプロファイル292Aから選択する。
 S130の後、S140に進む。
 S140において、SQL生成部210は、S130で選択した個別SQLプロファイル292の個別SQL構文と、S110で選択した生成SQL定義ファイル293に定義されている設定オプションと、基本SQLプロファイル291に定義されている基本SQL構文とに基づいて、生成SQL294を生成する。
 例えば、SQL生成部210は、S110で図8に示す生成SQL定義ファイル293Aを選択し、S130で図8に示す個別SQLプロファイル292Aから個別SQL構文(SELECT命令)を選択したものとする。
 この場合、SQL生成部210は、図8に示す基本SQLプロファイル291Aに定義された基本SQL構文(SELECT命令)に基づいて、図8に示す生成SQL294Aを生成する。
 図9は、実施の形態1におけるSQL文生成処理(S140)を示すフローチャートである。
 実施の形態1におけるSQL文生成処理(S140)について、図9に基づいて説明する。
 SQL文生成処理(S140)は、S141からS147で構成される。
 S141において、SQL生成部210は、S130で選択した個別SQL構文を定義するタグを処理するタグ関連処理部211を呼び出す。
 例えば、SQL生成部210は、S130で図8に示す個別SQLプロファイル292Aから個別SQL構文(SELECT命令)を選択したものとする。
 この場合、SQL生成部210は、この個別SQL構文(SELECT命令)を定義する<sql_select_db1>を処理するタグ関連処理部211を呼び出す。
 S141の後、S142に進む。
 以下、タグ関連処理部211は、S130で選択された個別SQL構文を構成するSQL項目毎にS142からS147までの処理を繰り返し実行する。
 S142において、タグ関連処理部211は、S130(図7参照)で選択された個別SQL構文を定義するタグ定義から、タグ定義を構成するSQL項目の並び順に従ってSQL項目を一つ読み込む。
 つまり、タグ関連処理部211は、1回目のS142で先頭のSQL項目を読み込み、2回目のS142で2番目のSQL項目を読み込む。
 例えば、タグ関連処理部211は、1回目のS142で、図8に示す<sql_select_db1>のタグ定義から、先頭のSQL項目<select>を読み込む。
 また、タグ関連処理部211は、2回目のS142で、図8に示す<sql_select_db1>のタグ定義から、2番目のSQL項目<where>を読み込む。
 S142の後、S143に進む。
 S143において、タグ関連処理部211は、S142で読み込んだSQL項目が文字列と、動的タグと、解析タグとのいずれであるか判定する。
 例えば、タグ関連処理部211は、SQL項目の種類を以下のように判定する。
 タグ関連処理部211は、SQL項目がタグであるか否かを判定する。
 SQL項目がタグでない場合、SQL項目は文字列である。
 SQL項目がタグである場合、タグ関連処理部211はタグが個別SQLプロファイル292に定義されているか否かを判定する。
 タグが個別SQLプロファイル292に定義されている場合、タグ関連処理部211は個別SQLプロファイル292を参照し、SQL項目が動的タグ<dynamic>と解析タグ<analysis>とのいずれであるか判定する。
 タグが個別SQLプロファイル292に定義されていない場合、タグ関連処理部211は基本SQLプロファイル291を参照し、SQL項目が動的タグ<dynamic>と参照タグ<analysis>とのいずれであるか判定する。
 例えば、タグ関連処理部211は、S142で図8に示す個別SQLプロファイル292Aから<select>を読み込んだものとする。この<select>は個別SQLプロファイル292Aに定義されていない。
 この場合、タグ関連処理部211は、図8に示す基本SQLプロファイル291Aに定義されている<select>のタグタイプを参照し、<select>が解析タグ<analysis>であると判定する。
 SQL項目が文字列である場合、S144に進む。
 SQL項目が動的タグである場合、S145に進む。
 SQL項目が解析タグである場合、S146に進む。
 S144において、タグ関連処理部211は、S142で読み込んだ文字列を生成SQL294に書き出す。
 S144の後、S147に進む。
 S145において、タグ関連処理部211は、S142で読み込んだ動的タグに設定する内容として定義された設定内容(文字列、数値、条件式など)を生成SQL定義ファイル293の設定オプションから取得し、取得した設定内容を生成SQL294に書き出す。
 設定オプションが収集データ297を指定する所定の変数を含んでいる場合、タグ関連処理部211は、S110で取得した収集データ297に指定されている設定値を含む設定内容を生成SQL294に書き出す。
 S145の後、S147に進む。
 S146において、タグ関連処理部211は、後述するタグ関連処理(S146)を実行することにより、S142で読み込んだ解析タグを文字列解析し、解析タグに相当する文字列を生成SQL294に書き出す。
 S146の後、S147に進む。
 S147において、タグ関連処理部211は、S142で個別SQL構文のタグ定義から読み込んでいないSQL項目が残っているか否かを判定する。
 SQL項目が残っている場合(YES)、S142に戻る。
 SQL項目が残っていない場合(NO)、SQL文生成処理(S140)は終了する。
 図10は、実施の形態1におけるタグ関連処理(S146)を示すフローチャートである。
 実施の形態1におけるタグ関連処理(S146)について、図10に基づいて説明する。
 タグ関連処理(S146)は、S146-1からS146-7を含む。また、タグ関連処理(S146)は再帰的な処理であり、タグ関連処理(S146)を含む。
 S146-1において、タグ関連処理部211は、個別SQLプロファイル292を参照し、解析タグが個別SQLプロファイル292に定義されているか否かを判定する。
 例えば、解析タグが<select>である場合、解析タグ<select>は図8に示す個別SQLプロファイル292Aに定義されていない。
 解析タグが個別SQLプロファイル292に定義されている場合(YES)、S146-2に進む。
 解析タグが個別SQLプロファイル292に定義されていない場合(NO)、S146-3に進む。
 S146-2において、タグ関連処理部211は、個別SQLプロファイル292から解析タグのタグ定義を読み込む。
 S146-2の後、S146-4に進む。
 S146-3において、タグ関連処理部211は、基本SQLプロファイル291から解析タグのタグ定義を読み込む。
 例えば、解析タグが<select>である場合、タグ関連処理部211は図8に示す291Aから解析タグ<select>のタグ定義を読み込む。解析タグ<select>のタグ定義は、「SELECT <select_distinct> <column_list> FROM <table_list>」である。
 S146-3の後、S146-4に進む。
 以下、タグ関連処理部211は、S146-2またはS146-3で読み込んだタグ定義を構成するSQL項目毎にS146-4からS146-8までの処理を繰り返し実行する。
 S146-4において、タグ関連処理部211は、S146-2またはS146-3で読み込んだタグ定義から、タグ定義を構成するSQL項目の並び順に従ってSQL項目を一つ読み込む。
 例えば、タグ関連処理部211は、S146-3でタグ定義「SELECT <select_distinct> <column_list> FROM <table_list>」を読み込んだものとする。
 この場合、タグ関連処理部211は、1回目のS146-4でタグ定義の先頭のSQL項目「SELECT」を読み込み、2回目のS146-4でタグ定義の2番目のSQL項目<select_distinct>を読み込む。
 S146-4の後、S146-5に進む。
 S146-5において、タグ関連処理部211は、S146-4で読み込んだSQL項目が文字列と、動的タグと、解析タグとのいずれであるか判定する。
 例えば、タグ関連処理部211は、SQL項目の種類を以下のように判定する。
 タグ関連処理部211は、SQL項目がタグであるか否かを判定する。
 SQL項目がタグでない場合、SQL項目は文字列である。
 SQL項目がタグである場合、タグ関連処理部211は、タグ定義を読み込んだプロファイルを参照し、SQL項目が動的タグ<dynamic>と解析タグ<analysis>とのいずれであるか判定する。
 SQL項目が文字列である場合、S146-6に進む。
 SQL項目が動的タグである場合、S146-7に進む。
 SQL項目が解析タグである場合、タグ関連処理部211はS146-4で読み込んだSQL項目(解析タグ)を対象にしてタグ関連処理(S146)を実行する。タグ関連処理(S146)の後、S146-8に進む。
 S146-6において、タグ関連処理部211は、S146-4で読み込んだ文字列を生成SQL294に書き出す。
 例えば、タグ関連処理部211は、図8に示す基本SQLプロファイル291Aに定義されている<select>のタグ定義のうち先頭のSQL項目「SELECT」をS146-4で読み込んだものとする。「SELECT」は文字列である。
 この場合、タグ関連処理部211は、文字列「SELECT」を図8に示すように生成SQL294Aに書き出す。
 S146-6の後、S146-8に進む。
 S146-7において、タグ関連処理部211は、S146-2またはS146-3でタグ定義を読み込んだプロファイルの設定オプションから、S146-4で読み込んだ動的タグに設定する内容として定義された設定内容(文字列、数値、条件式など)を取得し、取得した設定内容を生成SQL294に書き出す。
 設定オプションが収集データ297を指定する所定の変数を含んでいる場合、タグ関連処理部211は、S110(図7参照)で取得した収集データ297に指定されている設定値を含む設定内容を生成SQL294Aに書き出す。
 例えば、タグ関連処理部211は、図8に示す基本SQLプロファイル291Aに定義されている<select>のタグ定義のうち2番目のSQL項目<select_distinct>をS146-4で読み込んだものとする。<select_distinct>は文字列「ALL」または文字列「DISTINCT」に置き換わる動的タグである。
 この場合、タグ関連処理部211は、<select_distinct>の設定内容「ALL」を図8に示すように生成SQL294Aに書き出す。
 S146-7の後、S146-8に進む。
 S146-8において、タグ関連処理部211は、S146-4でタグ定義から読み込んでいないSQL項目が残っているか否かを判定する。
 SQL項目が残っている場合(YES)、S146-4に戻る。
 SQL項目が残っていない場合(NO)、タグ関連処理(S146)は終了する。
 図9および図10に基づいて説明したSQL文生成処理(S140)により、図8に示す生成SQL定義ファイル293A、個別SQLプロファイル292Aおよび基本SQLプロファイル291Aに基づいて、図8に示す生成SQL294Aが生成される。
 図7に戻り、データ操作言語生成方法の説明をS150から続ける。
 S150において、SQL実行部220は、S140で生成された生成SQL294をDBサーバ110へ送信する。
 DBサーバ110は、生成SQL294を受信し、受信した生成SQL294をデータベース111に入力する。
 データベース111は、入力された生成SQL294を実行し、SQL実行結果295(例えば、SELECT文の条件を満たすデータ)を生成し、生成したSQL実行結果295を出力する。
 DBサーバ110は、データベース111から出力されたSQL実行結果295をデータ操作言語生成装置200のSQL実行部220へ送信する。
 SQL実行部220は、SQL実行結果295を受信し、受信したSQL実行結果295を出力する。例えば、SQL実行部220は、受信したSQL実行結果295をFA機器に出力する。
 S150により、データ操作言語生成方法の処理は終了する。
 図11は、実施の形態1におけるデータ操作言語生成装置200のハードウェア資源の一例を示す図である。
 図11において、データ操作言語生成装置200(コンピュータの一例)は、CPU901(Central Processing Unit)を備えている。CPU901は、バス902を介してROM903、RAM904、通信ボード905(通信装置)、ディスプレイ911(表示装置)、キーボード912、マウス913、ドライブ914、磁気ディスク装置920などのハードウェアデバイスと接続され、これらのハードウェアデバイスを制御する。ドライブ914は、FD(Flexible Disk)、CD(Compact Disc)、DVD(Digital Versatile Disc)などの記憶媒体を読み書きする装置である。
 ROM903、RAM904、磁気ディスク装置920およびドライブ914は記憶装置の一例である。キーボード912、マウス913、通信ボード905および記憶装置は入力装置の一例である。ディスプレイ911、通信ボード905および記憶装置は出力装置の一例である。
 通信ボード905は、有線または無線で、LAN(Local Area Network)、インターネット、電話回線などの通信網に接続している。
 磁気ディスク装置920には、OS921(オペレーティングシステム)、プログラム群922、ファイル群923が記憶されている。
 プログラム群922には、実施の形態において「~部」として説明する機能を実行するプログラムが含まれる。プログラム(例えば、データベース操作命令生成プログラム)は、CPU901により読み出され実行される。すなわち、プログラムは、「~部」としてコンピュータを機能させるものであり、また「~部」の手順や方法をコンピュータに実行させるものである。
 ファイル群923には、実施の形態において説明する「~部」で使用される各種データ(入力、出力、判定結果、計算結果、処理結果など)が含まれる。
 実施の形態において構成図およびフローチャートに含まれている矢印は主としてデータや信号の入出力を示す。
 フローチャートなどに基づいて説明する実施の形態の処理はCPU901、記憶装置、入力装置、出力装置などのハードウェアを用いて実行される。
 実施の形態において「~部」として説明するものは「~回路」、「~装置」、「~機器」であってもよく、また「~ステップ」、「~手順」、「~処理」であってもよい。すなわち、「~部」として説明するものは、ファームウェア、ソフトウェア、ハードウェアまたはこれらの組み合わせのいずれで実装されても構わない。
 実施の形態1において、例えば、以下のようなデータ操作言語生成装置200について説明した。
 基本SQLプロファイル291および個別SQLプロファイル292は、SQLを規定の書式(例えばBNFなど)で定義する。
 SQL生成部210は、規定の書式で書かれた情報を解析し、関連付けられた処理を実施する。
 基本SQLプロファイル291は、基本となる「基本SQL」を定義する。
 個別SQLプロファイル292は、DB種別ごとに異なる「個別SQL」を定義する。但し、個別SQLプロファイル292は、基本SQLと異なる部分のみを定義する。
 SQL生成部210はDBMS種別によらない汎化された処理のみを持ち、各プロファイルの項目はこの汎化された処理と関連付けられる。
 SQL生成部210は、SQLの生成時、基本SQLと同じ部分は基本SQLと同じ処理を行い、異なる部分では個別に関連付けられた処理を行う。
 実施の形態1により、例えば、以下のような効果を奏することができる。
 データ操作言語生成装置200は、個別SQLプロファイル292により、SQL構文が異なるデータベース111別にSQL文を生成することができる。
 データ操作言語生成装置200は、個別SQLプロファイル292により、特定のSQL命令の差だけではなく、SQL命令の体系全体の差を吸収することができる。
 データ操作言語生成装置200は、個別SQLプロファイル292を追加することにより、プログラムを改修することなく、SQL構文が異なる新たなデータベース111に対応することができる。
 データ操作言語生成装置200がDBMSに沿った従来通りのSQLを生成することで、既存システムの改修や新たなソフトウェア(プロググラムのこと。以下同様)の追加が不要になる。
 外部化されたプロファイルに従ってデータ操作言語生成装置200がSQL文の文字列を生成することで、組み込み機器内部のソフトウェアを改修することなく、DBMSやSQL命令を追加および変更することができる。
 基本となる処理をプロファイルに規定し、DBMS毎に基本と異なる部分のみプロファイルを作成することで、組み込み機器内部のソフトウェアの軽量化を図ることができる。
 実施の形態1において、例えば、以下のようなデータ操作命令生成装置(200)について説明した。括弧内に実施の形態1で説明した構成の符号または名称を記す。
 データ操作命令生成装置は、基本構文記憶部と、個別構文記憶部と、基本項目定義取得部と、データ操作命令生成部とを備える。
 前記基本構文記憶部(290)は、データベース(111)にアクセスするためのデータ操作命令(SQL文)を定義する基本構文定義(基本SQL構文)を構成する1つ以上の基本構文項目(タグ項目)を記憶すると共に、基本構文項目毎に、基本構文項目を定義する基本項目定義(タグ定義)を記憶する。
 前記個別構文記憶部は、前記基本構文定義と少なくとも一部が異なる個別構文定義(個別SQL構文)を構成する1つ以上の個別構文項目(タグ定義)を記憶すると共に、前記1つ以上の基本構文項目のいずれとも異なる個別構文項目毎に、個別構文項目を定義する個別項目定義(タグ定義)を記憶する。
 前記基本項目定義取得部(211)は、前記個別構文記憶部に記憶された前記1つ以上の個別構文項目のうち個別項目定義が記憶されていない個別構文項目を選択し(S146-1)、選択した個別構文項目と同じ基本構文項目を定義する基本項目定義を前記基本構文記憶部から取得する(S146-3)。
 前記データ操作命令生成部(210)は、前記個別構文記憶部に記憶された各個別項目定義と、前記基本項目定義取得部によって取得された前記基本項目定義とに基づいて、前記データ操作命令(294)を生成する。
 実施の形態2.
 個別SQLプロファイル292および生成SQL定義ファイル293を容易に作成するための形態について説明する。
 以下、実施の形態1と異なる事項について主に説明する。説明を省略する事項については実施の形態1と同様である。
 図12は、実施の形態2におけるDBアクセスシステム100の構成図である。
 実施の形態2におけるDBアクセスシステム100の構成について、図12に基づいて説明する。
 DBアクセスシステム100(データ操作命令生成システムの一例)は、実施の形態1と同様に、データ操作言語生成装置200および複数のDBサーバ110A・110Bを備える。
 データ操作言語生成装置200および複数のDBサーバ110A・110Bの一部の構成については図示を省略している。
 DBアクセスシステム100は、さらに、プロファイル作成端末300を備える。
 プロファイル作成端末300は、個別SQLプロファイル292および生成SQL定義ファイル293を作成するための端末装置(例えば、パーソナルコンピュータ)である。
 プロファイル作成端末300(定義生成装置の一例)は、個別SQLプロファイル作成部310、生成SQL定義ファイル作成部320および端末記憶部390を備える。
 個別SQLプロファイル作成部310は、ユーザの指示に従って個別SQLプロファイル292を作成する構成である。
 生成SQL定義ファイル作成部320は、ユーザの指示に従って生成SQL定義ファイル293を作成する構成である。
 端末記憶部390は、プロファイル作成端末300で使用するデータを記憶する記憶部である。例えば、端末記憶部390は、生成SQL定義ファイル293に定義する設定オプションの項目を示す設定オプション情報391を記憶する。また例えば、端末記憶部390は、基本SQLプロファイル291、個別SQLプロファイル292および生成SQL定義ファイル293を記憶する(図示省略)。
 図13は、実施の形態2における個別SQLプロファイル作成画面400の一例を示す図である。
 基本SQL構文を構成するタグを並べ替えてSELECT命令の個別SQL構文を定義する例について、図13に基づいて説明する。
 ここで、ユーザは、基本SQLプロファイル291および設定オプション情報391を予め作成しているものとする。
 例えば、プロファイル作成端末300が、基本SQLプロファイル291を作成する基本SQLプロファイル作成部を備える(図示省略)。ユーザは、基本SQLプロファイル291の情報をプロファイル作成端末300に入力する。例えば、入力は、キーボードまたはマウスなどの入力装置を用いて行われる(以下、入力について同様)。プロファイル作成端末300の基本SQLプロファイル作成部は入力された情報に従って基本SQLプロファイル291を作成し、作成した基本SQLプロファイル291をデータ操作言語生成装置200へ送信する。データ操作言語生成装置200の通信部(図示省略)は基本SQLプロファイル291を受信し、受信した基本SQLプロファイル291を装置記憶部290に記憶する。
 例えば、ユーザは設定オプションの項目を示す情報をプロファイル作成端末300に入力し、プロファイル作成端末300の生成SQL定義ファイル作成部320は入力された情報を設定オプション情報391として端末記憶部390に記憶する。
 (1)ユーザは、キーボードまたはマウスなどの入力装置を用いてDB種別名「db1」をプロファイル作成端末300に入力する。
 (2)個別SQLプロファイル作成部310は、データ操作言語生成装置200から基本SQLプロファイル291を取得し、取得した基本SQLプロファイル291から基本SQL構文を構成するタグを抽出する。以下、基本SQL構文を構成するタグを「基本SQLタグ」という。また、個別SQL構文を構成するタグを「個別SQLタグ」という。
 (3)個別SQLプロファイル作成部310は、基本SQLプロファイル291から抽出した基本SQLタグとユーザから指定されたDB種別「db1」とを用いて図13に示すような個別SQLプロファイル作成画面400Aをディスプレイに表示する。
 個別SQLプロファイル作成画面400Aは、基本SQLプロファイル291から抽出された基本SQLタグを一覧にした基本SQLタグ一覧401と、個別SQLタグを定義するための個別SQLタグ作成欄402とを含んでいる。
 個別SQLタグ作成欄402は、ユーザから指定されたDB種別名403と、個別SQLタグのタグ名404とを含んでいる。例えば、タグ名404は所定の規則に基づいて生成される。図13に示すタグ名404「db1_select」は、DB種別名403「db1」とSELECT命令を識別する所定の識別子「select」とをアンダーバーで繋いで生成した名称である。但し、ユーザがタグ名404を入力しても構わない。
 (4)ユーザは、マウスカーソル409を操作し、<db1_select>を構成する基本SQLタグを基本SQLタグ一覧401から個別SQLタグ作成欄402のタグ定義欄405へドラッグアンドドロップで設定する。
 但し、個別SQLプロファイル作成画面400が「追加」「変更」「削除」などのメニューを備え、ユーザがタグ定義欄405に設定する基本SQLタグ(または名称を変更した基本SQLタグ)をメニューを用いて指定しても構わない。また、ユーザが個別SQLタグのタグ定義をタグ定義欄405に入力しても構わない。
 (5)個別SQLタグ<db1_select>を定義した場合、ユーザは、マウスカーソル409を操作して終了ボタン408を押下する。
 終了ボタン408が押下された場合、個別SQLプロファイル作成部310は、定義された内容を個別SQLプロファイル292に設定する。
 (6)必要な個別SQLタグを全て定義した場合、ユーザは個別SQLプロファイル292の送信を個別SQLプロファイル作成部310に対して要求する。
 個別SQLプロファイル作成部310は個別SQLプロファイル292をデータ操作言語生成装置200へ送信する。
 データ操作言語生成装置200は、個別SQLプロファイル292を受信し、受信した個別SQLプロファイル292を装置記憶部290に記憶する。
 図14は、実施の形態2における個別SQLプロファイル作成画面400の一例を示す図である。
 基本SQLタグ<order_by>とは構文が異なる新たな個別SQLタグ<dif_order_by>を定義する例について、図14に基づいて説明する。
 但し、図13に示した個別SQLプロファイル作成画面400Aと共通する部分について説明を一部省略する。
 (1)ユーザは、DB種別名「db1」をプロファイル作成端末300に入力する。
 (2)個別SQLプロファイル作成部310は、基本SQLタグ一覧401と個別SQLタグ作成欄402とを含んだ個別SQLプロファイル作成画面400Bを表示する。
 (3)ユーザは、基本SQLタグ一覧401のうち基本SQLタグ<order_by>が示されている部分にマウスカーソル409を移動し、マウスを右クリックする。
 (4)個別SQLプロファイル作成部310は、所定のメニュー一覧406を表示する。例えば、メニュー一覧406は、3つのメニュー「個別タグにペースト」「差分個別タグを作成」「基本SQL内容を表示」を含む。「個別タグにペースト」は、基本SQLタグをタグ定義欄405に設定するためのメニューである。「差分個別タグを作成」は、個別SQLタグを新たに定義するためのメニューである。「基本SQL内容を表示」は、基本SQLタグのタグ定義を表示するためのメニューである。
 (5)ユーザは、マウスカーソル409を操作し、メニュー一覧406から「差分個別タグを作成」を選択する。
 (6)個別SQLプロファイル作成部310は、所定の規則に従ってタグ名404<dif_order_by>を生成し、タグ名404とタグ定義欄405とを含んだ個別SQLタグ作成欄402を表示する。タグ名404<dif_order_by>は、基本SQLタグ<order_by>に文字列「dif_」を追加した名称である。但し、ユーザがタグ名404を指定しても構わない。
 (7)ユーザは、タグ定義欄405にタグ定義を入力し、マウスカーソル409を操作して終了ボタン408を押下する。但し、ユーザは、利用可能な基本SQLタグを図13に示したようにタグ定義欄405にドラッグアンドドロップで指定してもよい。
 (8)個別SQLタグ<dif_order_by>を定義した場合、ユーザは、マウスカーソル409を操作して終了ボタン408を押下する。
 終了ボタン408が押下された場合、個別SQLプロファイル作成部310は、定義された内容を個別SQLプロファイル292に設定する。
 (9)必要な個別SQLタグを定義した場合、ユーザは個別SQLプロファイル292の送信を個別SQLプロファイル作成部310に対して要求する。
 そして、個別SQLプロファイル作成部310は個別SQLプロファイル292をデータ操作言語生成装置200へ送信し、データ操作言語生成装置200は個別SQLプロファイル292を装置記憶部290に記憶する。
 図13または図14の個別SQLプロファイル作成画面400のタグ定義欄405にユーザが文字列を入力した場合、個別SQLプロファイル作成部310は、入力された文字列が所定の書式(例えば、BNFの書式)に従った正当な文字列であるか否かを検査する。入力された文字列が所定の書式に従っていない不正な文字列である場合、個別SQLプロファイル作成部310は、文字列を赤文字にしたり、または、入力された文字列が不正な文字列であることを示すメッセージを表示したりすることにより、ユーザに誤りを指摘する。
 図15は、実施の形態2における生成SQL定義ファイル作成画面410の一例を示す図である。
 生成SQL定義ファイル293を生成する例について、図15に基づいて説明する。
 (1)生成SQL定義ファイル作成部320は、設定オプション情報391に基づいて、図15に示すような生成SQL定義ファイル作成画面410Aをディスプレイに表示する。
 生成SQL定義ファイル作成画面410Aは、生成SQL情報欄411と設定オプション欄412とを備えている。
 生成SQL情報欄411は、個別SQLプロファイル292の名称を入力するための入力欄413と、生成SQL命令の名称を入力するための入力欄413とを備える。
 設定オプション欄412は、設定オプション情報391が示す設定オプションの項目(use_clause、select_distinctなど)毎に入力欄413を備える。
 (2)ユーザは、キーボードまたはマウスなどの入力装置を用いて、生成SQL定義ファイル293に設定する内容を生成SQL定義ファイル作成画面410Aの各入力欄413に入力する。
 (3)生成SQL定義ファイル作成画面410Aの各入力欄413に設定内容を入力した場合、ユーザは、マウスカーソル409を操作して終了ボタン408を押下する。
 終了ボタン408が押下された場合、生成SQL定義ファイル作成部320は、生成SQL定義ファイル作成画面410Aの各入力欄413に入力された設定内容を生成SQL定義ファイル293に設定する。
 (4)ユーザは生成SQL定義ファイル293の送信を生成SQL定義ファイル作成部320に対して要求する。
 生成SQL定義ファイル作成部320は生成SQL定義ファイル293をデータ操作言語生成装置200へ送信する。
 データ操作言語生成装置200は生成SQL定義ファイル293を受信し、受信した生成SQL定義ファイル293を装置記憶部290に記憶する。
 生成SQL定義ファイル作成部320は、生成SQL定義ファイル作成画面410Aの各入力欄413に入力された文字列が所定の書式(例えば、BNFの書式)に従った正当な文字列であるか否かを検査する。入力された文字列が所定の書式に従っていない不正な文字列である場合、生成SQL定義ファイル作成部320は、文字列を赤文字にしたり、または、入力された文字列が不正な文字列であることを示すメッセージを表示したりすることにより、ユーザに誤りを指摘する。
 図16は、実施の形態2における生成SQL定義ファイル作成画面410の一例を示す図である。
 基本SQLタグまたは個別SQLタグを利用して生成SQL定義ファイル293を生成する例について、図16に基づいて説明する。
 (1)生成SQL定義ファイル作成部320は、基本SQLプロファイル291および個別SQLプロファイル292に基づいて、図16に示すような生成SQL定義ファイル作成画面410Bをディスプレイに表示する。
 生成SQL定義ファイル作成画面410Bは、基本SQLタグ一覧414と個別SQLタグ一覧415と生成SQL命令作成欄416とを備える。
 基本SQLタグ一覧414は、基本SQLプロファイル291に含まれる基本SQLタグの一覧を示す。
 個別SQLタグ一覧415は、個別SQLプロファイル292に含まれる個別SQLタグの一覧を示す。
 生成SQL命令作成欄416は、生成SQL命令を定義するための生成SQL命令定義欄417を備える。
 (2)ユーザは、マウスカーソル409を操作し、基本SQLタグ一覧414に含まれる基本SQLタグまたは個別SQLタグ一覧415に含まれる個別SQLタグをドラッグアンドドロップで生成SQL命令定義欄417に設定する。
 (3)生成SQL命令<user_generate_sql_1>を定義した場合、ユーザは、マウスカーソル409を操作して終了ボタン408を押下する。
 終了ボタン408が押下された場合、生成SQL定義ファイル作成部320は、定義された内容を生成SQL定義ファイル293に設定する。
 (4)必要な生成SQL命令を全て定義した場合、ユーザは生成SQL定義ファイル293の送信を生成SQL定義ファイル作成部320に対して要求する。
 生成SQL定義ファイル作成部320は生成SQL定義ファイル293をデータ操作言語生成装置200へ送信する。
 データ操作言語生成装置200は生成SQL定義ファイル293を受信し、受信した生成SQL定義ファイル293を装置記憶部290に記憶する。
 100 DBアクセスシステム、110 DBサーバ、119 データベース、200 データ操作言語生成装置、210 SQL生成部、211 タグ関連処理部、220 SQL実行部、290 装置記憶部、291 基本SQLプロファイル、292 個別SQLプロファイル、293 生成SQL定義ファイル、294 生成SQL、295 SQL実行結果、296 実行スケジュール、297 収集データ、300 プロファイル作成端末、310 個別SQLプロファイル作成部、320 生成SQL定義ファイル作成部、390 端末記憶部、391 設定オプション情報、400 個別SQLプロファイル作成画面、401 基本SQLタグ一覧、402 個別SQLタグ作成欄、403 DB種別名、404 タグ名、405 タグ定義欄、406 メニュー一覧、408 終了ボタン、409 マウスカーソル、410 生成SQL定義ファイル作成画面、411 生成SQL情報欄、412 設定オプション欄、413 入力欄、414 基本SQLタグ一覧、415 個別SQLタグ一覧、416 生成SQL命令作成欄、417 生成SQL命令定義欄、901 CPU、902 バス、903 ROM、904 RAM、905 通信ボード、911 ディスプレイ、912 キーボード、913 マウス、914 ドライブ、920 磁気ディスク装置、921 OS、922 プログラム群、923 ファイル群。

Claims (7)

  1.  データベースにアクセスするためのデータ操作命令を定義する基本構文定義を構成する1つ以上の基本構文項目を記憶すると共に、基本構文項目毎に、基本構文項目を定義する基本項目定義を記憶する基本構文記憶部と、
     前記基本構文定義と少なくとも一部が異なる個別構文定義を構成する1つ以上の個別構文項目を記憶すると共に、前記1つ以上の基本構文項目のいずれとも異なる個別構文項目毎に、個別構文項目を定義する個別項目定義を記憶する個別構文記憶部と、
     前記個別構文記憶部に記憶された前記1つ以上の個別構文項目のうち個別項目定義が記憶されていない個別構文項目を選択し、選択した個別構文項目と同じ基本構文項目を定義する基本項目定義を前記基本構文記憶部から取得する基本項目定義取得部と、
     前記個別構文記憶部に記憶された各個別項目定義と、前記基本項目定義取得部によって取得された前記基本項目定義とに基づいて、前記データ操作命令を生成するデータ操作命令生成部と
    を備えることを特徴とするデータ操作命令生成装置。
  2.  前記個別構文記憶部に記憶された前記各個別項目定義と、前記基本項目定義取得部によって取得される前記基本項目定義と、のいずれかの項目定義は値を設定する設定欄を含み、
     前記データ操作命令生成装置は、
     前記設定欄に設定する値を指定する指定値を記憶する生成命令定義記憶部を備え、
     前記データ操作命令生成部は、前記個別構文記憶部に記憶された各個別項目定義と、前記基本項目定義取得部によって取得された前記基本項目定義と、の少なくともいずれかの項目定義に含まれる前記設定欄に、前記生成命令定義記憶部に記憶された前記指定値を設定する
    ことを特徴とする請求項1記載のデータ操作命令生成装置。
  3.  前記個別構文記憶部は、定義が異なる複数の個別構文定義の個別構文定義毎に1つ以上の個別構文項目を記憶すると共に、いずれの基本構文項目とも異なる個別構文項目毎に個別項目定義を記憶し、
     前記生成命令定義記憶部は、前記複数の個別構文定義のうちいずれかの個別構文定義を識別する個別構文識別子を記憶し、
     前記基本項目定義取得部は、前記生成命令定義記憶部に記憶された前記個別構文識別子によって識別される個別構文定義を対象にして、前記基本項目定義を取得し、
     前記データ操作命令生成部は、前記生成命令定義記憶部に記憶された前記個別構文識別子によって識別される個別構文定義を対象にして、前記個別構文記憶部から前記各個別項目定義を取得し、
     前記データ操作命令生成部は、取得した前記各個別項目定義と、前記前記基本項目定義取得部によって取得された前記基本項目定義とに基づいて、前記データ操作命令を生成する
    ことを特徴とする請求項2記載のデータ操作命令生成装置。
  4.  前記基本構文記憶部は、1つ以上のデータ操作命令毎に1つ以上の基本構文項目を含むと共に基本構文項目毎に基本項目定義を含むデータ操作命令定義を記憶し、
     前記個別構文記憶部は、個別構文定義毎に、1つ以上のデータ操作命令毎に1つ以上の個別構文項目を含むと共にいずれの基本構文項目とも異なる個別構文項目毎に個別項目定義を含むデータ操作命令定義を記憶し、
     前記生成命令定義記憶部は、いずれかのデータ操作命令を識別する命令識別子を記憶し、
     前記基本項目定義取得部は、前記複数の個別構文定義のうち、前記個別構文識別子によって識別される個別構文定義を選択し、
     前記基本項目定義取得部は、選択した前記個別構文定義のデータ操作命令定義のうち、前記命令識別子によって識別されるデータ操作命令定義を選択し、
     前記基本項目定義取得部は、選択した前記データ操作命令定義を対象にして、前記基本項目定義を取得し、
     前記データ操作命令生成部は、前記複数の個別構文定義のうち、前記個別構文識別子によって識別される個別構文定義を選択し、
     前記データ操作命令生成部は、選択した前記個別構文定義のデータ操作命令定義のうち、前記命令識別子によって識別されるデータ操作命令定義を選択し、
     前記データ操作命令生成部は、選択した前記データ操作命令定義を対象にして、前記各個別項目定義を取得し、
     前記データ操作命令生成部は、取得した前記各個別項目定義と、前記前記基本項目定義取得部によって取得された前記基本項目定義とに基づいて、前記データ操作命令を生成する
    ことを特徴とする請求項3記載のデータ操作命令生成装置。
  5.  請求項1から請求項4いずれかに記載のデータ操作命令生成装置と、
     前記個別構文定義を生成するための構文定義生成画面を表示し、前記構文定義生成画面に対して入力された情報に基づいて前記個別構文定義を生成し、生成した前記個別構文定義を前記データ操作命令生成装置の前記個別構文記憶部に記憶させる定義生成装置と
    を備えることを特徴とするデータ操作命令生成システム。
  6.  基本構文記憶部が、データベースにアクセスするためのデータ操作命令を定義する基本構文定義を構成する1つ以上の基本構文項目を記憶すると共に、基本構文項目毎に、基本構文項目を定義する基本項目定義を記憶し、
     個別構文記憶部が、前記基本構文定義と少なくとも一部が異なる個別構文定義を構成する1つ以上の個別構文項目を記憶すると共に、前記1つ以上の基本構文項目のいずれとも異なる個別構文項目毎に、個別構文項目を定義する個別項目定義を記憶し、
     基本項目定義取得部が、前記個別構文記憶部に記憶された前記1つ以上の個別構文項目のうち個別項目定義が記憶されていない個別構文項目を選択し、選択した個別構文項目と同じ基本構文項目を定義する基本項目定義を前記基本構文記憶部から取得し、
     データ操作命令生成部が、前記個別構文記憶部に記憶された各個別項目定義と、前記基本項目定義取得部によって取得された前記基本項目定義とに基づいて、前記データ操作命令を生成する
    ことを特徴とするデータ操作命令生成方法。
  7.  請求項6記載のデータ操作命令生成方法をコンピュータに実行させるためのデータ操作命令生成プログラム。
PCT/JP2012/077199 2012-10-22 2012-10-22 データ操作命令生成装置、データ操作命令生成システム、データ操作命令生成方法およびデータ操作命令生成プログラム WO2014064746A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2012/077199 WO2014064746A1 (ja) 2012-10-22 2012-10-22 データ操作命令生成装置、データ操作命令生成システム、データ操作命令生成方法およびデータ操作命令生成プログラム
TW101144109A TW201416893A (zh) 2012-10-22 2012-11-26 資料操作指令產生裝置、資料操作指令產生系統、資料操作指令產生方法以及儲存資料操作指令產生程式的儲存媒體

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/077199 WO2014064746A1 (ja) 2012-10-22 2012-10-22 データ操作命令生成装置、データ操作命令生成システム、データ操作命令生成方法およびデータ操作命令生成プログラム

Publications (1)

Publication Number Publication Date
WO2014064746A1 true WO2014064746A1 (ja) 2014-05-01

Family

ID=50544147

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/077199 WO2014064746A1 (ja) 2012-10-22 2012-10-22 データ操作命令生成装置、データ操作命令生成システム、データ操作命令生成方法およびデータ操作命令生成プログラム

Country Status (2)

Country Link
TW (1) TW201416893A (ja)
WO (1) WO2014064746A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI742568B (zh) * 2020-03-17 2021-10-11 昕力資訊股份有限公司 通用型資料庫模糊搜索的電腦程式產品及裝置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000163446A (ja) * 1998-11-30 2000-06-16 Nec Corp 拡張可能問い合わせ処理器
JP2002366411A (ja) * 2001-06-05 2002-12-20 Adk Fuji System Kk 分散データベース共有方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000163446A (ja) * 1998-11-30 2000-06-16 Nec Corp 拡張可能問い合わせ処理器
JP2002366411A (ja) * 2001-06-05 2002-12-20 Adk Fuji System Kk 分散データベース共有方法

Also Published As

Publication number Publication date
TW201416893A (zh) 2014-05-01

Similar Documents

Publication Publication Date Title
US11138220B2 (en) Generating data transformation workflows
US20210173696A1 (en) Design-time information based on run-time artifacts in a distributed computing cluster
JP5756386B2 (ja) 動的なウェブ・アプリケーションの問題を修正するメタデータの生成・管理の支援方法、装置、およびプログラム
US9817811B2 (en) Web server system, dictionary system, dictionary call method, screen control display method, and demonstration application generation method
JP2016099741A (ja) 情報抽出支援装置、方法およびプログラム
JP5949222B2 (ja) 運用管理支援装置、方法及びプログラム
US8326902B2 (en) Online database modeling
CN109284469B (zh) 网页开发框架
CN108694172B (zh) 信息输出方法和装置
JP2008217534A (ja) アプリケーション画面作成システム、方法及びアプリケーションプログラム
WO2014064746A1 (ja) データ操作命令生成装置、データ操作命令生成システム、データ操作命令生成方法およびデータ操作命令生成プログラム
JP2014089646A (ja) 電子データ処理装置、及び電子データ処理方法
JP6866270B2 (ja) Sql文抽出装置、sql文抽出方法及びプログラム
JP6231260B2 (ja) 画面制御システム、画面制御プログラム、画面作成支援プログラム及び画面制御方法
US20060048094A1 (en) Systems and methods for decoupling inputs and outputs in a workflow process
JP7331384B2 (ja) 情報処理装置及びプログラム
JP5877488B1 (ja) Rdbシステム
CN113934748A (zh) 混合型sql脚本文件生成方法、执行方法及装置
JP2018514843A (ja) スタイルのための宣言型カスケード再順序付け
JP2009053767A (ja) プログラム解析装置、および、プログラム解析方法
JP6677809B2 (ja) アダプタ生成装置及び方法
JP2008243075A (ja) 構造化文書管理装置及び方法
JP5359446B2 (ja) 情報処理システム、アクセスパス決定方法及びアクセスパス決定プログラム
JP7269244B2 (ja) サービス管理アプリケーションインターフェースにおいてグローバリゼーション機能を提供するためのシステムおよび方法
JP5962116B2 (ja) 画面制御システム、画面制御プログラム、画面作成支援プログラム及び画面制御方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12886948

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12886948

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP