Database table definition statement generation method and device, equipment and storage medium
By performing a single system table join query in the PostgreSQL database, batch retrieving metadata and performing topological sorting, the efficiency and advanced feature support issues of existing tools in multi-table DDL generation are resolved, achieving efficient and standardized table structure management.
Patent Information
- Application Number
- CN202511766309.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-03-03
AI Technical Summary
Existing tools struggle to efficiently generate multi-table DDL statements for PostgreSQL database migration and version control, especially due to insufficient support for advanced features. This results in high resource consumption and long processing times, failing to meet the timeliness requirements of enterprise applications.
Metadata is preloaded through a single system table join query, and metadata of specified tables is obtained in batches. Then, topological sorting is performed based on dependencies to generate efficient multi-table DDL statements.
It achieves efficient processing of multi-table DDL generation, covering 99% of PG table object types, improving generation efficiency by 50%, and ensuring DDL consistency through pg_dump verification, providing a standardized table structure management solution.
Smart Images

Figure CN121597709A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of database management technology, specifically to a method, apparatus, device, and storage medium for generating database table definition statements. Background Technology
[0002] PostgreSQL (PG) is an open-source object-relational database management system. In PG database applications such as migration, version control, and document generation, accurately and efficiently obtaining DDL (Data Definition Language) statements for database objects is a fundamental and critical requirement.
[0003] Currently, the industry primarily relies on built-in database tools and third-party graphical management tools to achieve this functionality, such as the PostgreSQL database tool pg_dump and graphical interface tools like pgAdmin. While pg_dump supports exporting the entire database structure or a single table, it lacks the ability to flexibly and selectively export multiple tables in batches. Furthermore, pg_dump typically uses a table-by-table metadata retrieval mechanism, which consumes significant system resources (I / O and CPU) during full database DDL export, resulting in lengthy processing times and hindering efficient operation, thus failing to meet the timeliness requirements of enterprise applications. The graphical tool pgAdmin also requires manual table-by-table operations, which is also very labor-intensive.
[0004] Furthermore, with each iteration of PostgreSQL, numerous advanced features have been introduced, such as Generated Columns and Partitioned Tables, placing higher demands on the completeness of DDL generation. Traditional tools have shortcomings in extracting metadata for these features and lack sufficient support for new advanced database features. For example, for Generated Columns, conventional information schema views often fail to fully capture their generation expression logic; for Partitioned Tables, existing tools frequently suffer from incomplete restoration or loss of dependencies when reconstructing in-depth information such as partitioning strategies, sub-table appendages, and key value ranges. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for generating database table definition statements, which achieves efficient processing of batch DDL generation of multiple tables by preloading metadata through a single system table join query.
[0006] In a first aspect, embodiments of this application provide a method for generating database table definition statements, the method comprising: Based on the input list of table names, construct a single SQL query statement to query the PostgreSQL system tables in batches to retrieve the metadata of all specified tables; Based on the aforementioned metadata, the content is populated in the order of table structure, column definition, constraints, indexes, triggers, and partitioning rules to generate table definition statements (DDL) in batches. The DDL is output after topological sorting according to the dependencies of the specified table.
[0007] In conjunction with the first aspect, in one implementation, it further includes: The single SQL query statement is used to perform a joint query on the partitioned table-specific tables to process the partitioned tables in the specified table. The partitioned table-specific tables include pg_partitioned_table and pg_inherits.
[0008] In conjunction with the first aspect, in one implementation, the step of using the single SQL query statement to jointly query a partition table-specific table to process the partition table in the specified table includes: The pg_partitioned_table.partstrategy field identifies RANGE / LIST / HASH partitions to obtain the partitioning strategy. The actual column names can be obtained by associating pg_attribute with pg_partitioned_table.partattrs; The inheritance relationship of sub-partitions is obtained by recursively querying pg_inherits, and a PARTITIONOF clause is generated for each sub-partition.
[0009] In conjunction with the first aspect, in one implementation, the PostgreSQL system table includes pg_class, pg_attribute, pg_type, and pg_constraint.
[0010] In conjunction with the first aspect, in one implementation, the step of performing topological sorting according to the dependencies of the specified table and then outputting the DDL includes: The dependency relationship of the specified table is obtained based on the pg_constraint; Construct a dependency graph based on the dependencies of the specified table; The Kahn algorithm is applied to perform topological sorting based on the dependency graph to output the DDL.
[0011] In conjunction with the first aspect, in one embodiment, the method further includes a processing step for the virtual column, which includes: The PostgreSQL system table also includes pg_attrdef; By querying pg_attribute and pg_attrdef together, the storage type is identified using the attgenerated field, and pg_get_expr() is called to parse and generate a virtual column expression.
[0012] In conjunction with the first aspect, in one implementation, the method further includes a step of processing the auto-increment field, which includes: The PostgreSQL system tables also include pg_depend and pg_sequence; Check if the default value of the column matches the pattern nextval('seq_name'::regclass) based on pg_attrdef; Verify the dependency relationship between columns and sequences using pg_depend; The sequence parameters are obtained based on pg_sequence, and the sequence parameters include step size and maximum value. Secondly, embodiments of this application provide a database table definition statement generation apparatus, the database table definition statement generation apparatus comprising: The data acquisition module, based on the input list of table names, constructs a single SQL query statement to jointly query the PostgreSQL system tables in order to obtain the metadata of all specified tables in batches. The generation module, based on the metadata, fills in the content in the order of table structure, column definition, constraint, index, trigger and partitioning rules to generate table definition statements (DDL) in batches. The output module is used to output the DDL after performing topological sorting according to the dependencies of the specified table.
[0013] Thirdly, embodiments of this application provide a database table definition statement generation device, which includes a processor, a memory, and a database table definition statement generation program stored in the memory and executable by the processor. When the database table definition statement generation program is executed by the processor, it implements the steps of the database table definition statement generation method described above.
[0014] Fourthly, a computer-readable storage medium storing a database table definition statement generation program, wherein when the database table definition statement generation program is executed by a processor, it implements the steps of the above-described database table definition statement generation method.
[0015] The beneficial effects of the technical solutions provided in this application include at least the following: The database table definition statement generation method in this application constructs a single SQL query statement based on the input list of table names to query the PostgreSQL system tables in batches, thereby obtaining the metadata of all specified tables; based on the metadata, it fills in the content in the order of table structure, column definition, constraints, indexes, triggers, and partitioning rules to generate table definition statements (DDL) in batches; and outputs the DDL after topological sorting according to the dependencies of the specified tables.
[0016] This application, by making deep use of PG system table metadata and combining dynamic syntax concatenation and batch optimization technology, solves the shortcomings of traditional tools in terms of multi-table export, advanced feature support and performance, and provides a standardized, industrial-grade table structure management solution for PG database operation and maintenance. Attached Figure Description
[0017] Figure 1 A flowchart illustrating an embodiment of the database table definition statement generation method of this application; Figure 2 This is a structural block diagram of an embodiment of the database table definition statement generation apparatus of this application; Figure 3 This is a schematic diagram of the hardware structure of the database table definition statement generation device involved in the embodiments of this application. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0020] In a first aspect, embodiments of this application provide a method for generating database table definition statements.
[0021] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the method for generating database table definition statements in this application. Figure 1 As shown, the methods for generating database table definition statements include: S1. Based on the input list of table names, construct a single SQL query statement to query the PostgreSQL system tables in batches to obtain the metadata of all specified tables; In this embodiment, table structure information can be quickly extracted from PostgreSQL system tables, and all necessary metadata can be obtained through a single efficient query. Specifically, by connecting to the target PostgreSQL database, system tables and views are queried using specific SQL queries, and metadata such as basic table information, column attributes, constraints, indexes, and triggers are collected in stages. A version-aware mechanism is used to automatically adapt to the differences in system table structures across different PostgreSQL versions.
[0022] The PostgreSQL system tables include pg_class, pg_attribute, pg_type, and pg_constraint.
[0023] The `pg_class` table stores metadata for all database objects; the `pg_attribute` table stores column (field) definitions, including column name, data type, nullability, and default value; the `pg_type` table stores all data type definitions, including built-in types and user-defined types; and the `pg_constraint` table stores table constraint definitions, including primary keys (`contype='p'`), foreign keys (`contype='f'`), unique keys (`contype='u'`), and check constraints (`contype='c'`).
[0024] Preferably, step S1 further includes: The single SQL query statement is used to perform a joint query on the partitioned table-specific tables to process the partitioned tables in the specified table. The partitioned table-specific tables include pg_partitioned_table and pg_inherits.
[0025] The pg_partitioned_table is a partition table that stores the metadata of the partition table (such as partition key, partition method, and subpartition structure); the pg_inherits is an inheritance table that stores the inheritance relationship of the tables (such as the parent-child relationship of the partition table and the hierarchical structure of the inheritance table).
[0026] Specifically, the method of using a single SQL query to jointly query a dedicated table for partitioned tables to process the partitioned tables in the specified table includes: The pg_partitioned_table.partstrategy field identifies RANGE / LIST / HASH partitions to obtain the partitioning strategy. The actual column names can be obtained by associating pg_attribute with pg_partitioned_table.partattrs; The inheritance relationship of sub-partitions is obtained by recursively querying pg_inherits, and a PARTITIONOF clause is generated for each sub-partition.
[0027] Preferably, the method further includes a processing step for the virtual column, which includes: The PostgreSQL system table also includes pg_attrdef; by querying pg_attribute and pg_attrdef together, the storage type ('s'=STORED) is identified using the attgenerated field, and pg_get_expr() is called to parse and generate a virtual column expression.
[0028] The pg_attrdef attribute default value table is used to store the default value expressions of columns and construct the GENERATEDALWAYS AS (expression) STORED clause.
[0029] Preferably, the method further includes a step of processing the auto-increment field, which includes: The PostgreSQL system tables also include pg_depend and pg_sequence; Check if the default value of the column matches the pattern nextval('seq_name'::regclass) based on pg_attrdef; Verify the dependency relationship between columns and sequences using pg_depend; The sequence parameters are obtained based on pg_sequence, and the sequence parameters include step size and maximum value.
[0030] The `pg_depend` table stores dependencies between database objects (e.g., columns depend on sequences) and verifies whether a sequence actually exists. The `pg_sequence` table stores sequence parameters (e.g., step size, maximum value) and retrieves the complete sequence definition.
[0031] S2. Based on the metadata, populate the content in the order of table structure, column definition, constraint, index, trigger and partitioning rules to generate table definition statement DDL in batches; In step S2, the DDL framework is mainly built based on the PG table definition syntax specification. That is, the content is filled in in the order of table structure, column definition, constraint, index, trigger and partition rules. For the above special components (virtual columns, auto-increment fields, etc.), a special processor is used to generate the corresponding syntax fragments.
[0032] Specifically, it mainly includes three parts: (1) Batch preloading of metadata: A single query retrieves basic pg_class information for all tables; Use the WHERE relname IN (...) condition to retrieve column metadata in batches; (2) Multi-level caching mechanism: Type caching: Preloading pg_type reduces duplicate lookups; Dependency caching: Stores table-sequence / function mapping relationships; Result Cache: LRU cache has generated DDL (TTL=10 minutes); (3) Parallel control strategy: Dynamic thread pool: Number of threads = Number of CPU cores × 2; Load balancing: Large tables are processed in a separate thread, while small tables are processed in batches. Flow control: Limit maximum memory usage per thread (1GB).
[0033] S3. After performing topological sorting according to the dependencies of the specified table, output the DDL.
[0034] Specifically, step S3 includes: S31. Obtain the dependency relationship of the specified table based on the pg_constraint; S32. Construct a dependency graph based on the dependencies of the specified table; S33. Apply the Kahn algorithm to perform topological sorting based on the dependency graph to output the DDL.
[0035] It is worth noting that this embodiment supports three modes: single-table output, multi-table batch output, and whole-database output; it adopts a producer-consumer model to achieve parallel generation, and the results can be returned via SQL files, console printing, or API interface.
[0036] Specifically, in single-table mode: complete DDL (including tables / indexes / triggers) is generated instantly. Batch mode: Output sorted by topology (avoiding dependency errors); File classification: Generate a separate .sql file for every 1000 tables. In addition, it includes an exception handling mechanism, and error classification mainly includes: 1. Missing metadata: Records system tables that were not found; 2. Syntax conflict: Saves the original expression for manual verification; 3. Version restriction: Marks DDL fragments that need to be manually downgraded.
[0037] This application achieves efficient batch generation of DDL for multiple tables by preloading metadata through a single system table join query of PostgreSQL system tables. This solves the problem of low I / O efficiency caused by table-by-table queries in traditional tools, improving the generation efficiency of tens of thousands of tables by more than 50% (actual test shows that it only takes 3.2 seconds to generate 1000 tables). At the same time, it covers 99% of PG table object types (including advanced features such as TOAST tables, external tables, virtual columns, partitioned tables, and auto-incrementing fields), and ensures 100% DDL consistency through pg_dump comparison and verification. It provides a lightweight, accurate solution that supports advanced features for exporting large-scale database objects.
[0038] In summary, the database table definition statement generation method in this application constructs a single SQL query statement based on the input list of table names to query the PostgreSQL system tables in batches, thereby obtaining the metadata of all specified tables; based on the metadata, it fills in the content in the order of table structure, column definition, constraints, indexes, triggers, and partitioning rules to generate table definition statements (DDL) in batches; and outputs the DDL after topological sorting according to the dependencies of the specified tables.
[0039] This application, by making deep use of PG system table metadata and combining dynamic syntax concatenation and batch optimization technology, solves the shortcomings of traditional tools in terms of multi-table export, advanced feature support and performance, and provides a standardized, industrial-grade table structure management solution for PG database operation and maintenance. Secondly, embodiments of this application also provide a database table definition statement generation device.
[0040] In one embodiment, reference is made to Figure 2 , Figure 2 This is a schematic diagram of the functional modules of an embodiment of the database table definition statement generation device of this application. Figure 2 As shown, the database table definition statement generation device includes: a collection module, a generation module, and an output module.
[0041] The acquisition module, based on the input list of table names, constructs a single SQL query statement to jointly query the PostgreSQL system tables in order to obtain the metadata of all specified tables in batches. The generation module, based on the metadata, fills in the content in the order of table structure, column definition, constraint, index, trigger and partitioning rules to generate table definition statements (DDL) in batches. The output module is used to output the DDL after performing topological sorting according to the dependencies of the specified table.
[0042] Furthermore, in one embodiment, the acquisition module is also used for: The single SQL query statement is used to perform a joint query on the partitioned table-specific tables to process the partitioned tables in the specified table. The partitioned table-specific tables include pg_partitioned_table and pg_inherits.
[0043] Furthermore, in one embodiment, the acquisition module uses the single SQL query statement to jointly query the partition table-specific table to process the partition table in the specified table, including: The pg_partitioned_table.partstrategy field identifies RANGE / LIST / HASH partitions to obtain the partitioning strategy. The actual column names can be obtained by associating pg_attribute with pg_partitioned_table.partattrs; The inheritance relationship of sub-partitions is obtained by recursively querying pg_inherits, and a PARTITIONOF clause is generated for each sub-partition.
[0044] Furthermore, in one embodiment, the PostgreSQL system table includes pg_class, pg_attribute, pg_type, and pg_constraint.
[0045] Further, in one embodiment, the generation module performs topological sorting according to the dependencies of the specified table and then outputs the DDL, including: The dependency relationship of the specified table is obtained based on the pg_constraint; Construct a dependency graph based on the dependencies of the specified table; The Kahn algorithm is applied to perform topological sorting based on the dependency graph to output the DDL.
[0046] Furthermore, in one embodiment, the PostgreSQL system table further includes pg_attrdef; By querying pg_attribute and pg_attrdef together, the generation module uses the attgenerated field to identify the storage type and calls pg_get_expr() to parse and generate a virtual column expression.
[0047] Furthermore, in one embodiment, the PostgreSQL system table further includes pg_depend and pg_sequence; The generation module is also used for: Check if the default value of the column matches the pattern nextval('seq_name'::regclass) based on pg_attrdef; Verify the dependency relationship between columns and sequences using pg_depend; The sequence parameters are obtained based on pg_sequence, and the sequence parameters include step size and maximum value.
[0048] The functions of each module in the above-mentioned database table definition statement generation device correspond to the steps in the above-mentioned database table definition statement generation method embodiment, and their functions and implementation processes will not be described in detail here.
[0049] Thirdly, embodiments of this application provide a database table definition statement generation device, which can be a personal computer (PC), laptop computer, server, or other device with data processing capabilities.
[0050] Reference Figure 3 , Figure 3 This is a schematic diagram of the hardware structure of the database table definition statement generation device involved in the embodiments of this application. In the embodiments of this application, the database table definition statement generation device may include a processor, a memory, a communication interface, and a communication bus.
[0051] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0052] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting internal components of the database table definition statement generation device, as well as interfaces used for interconnecting the database table definition statement generation device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0053] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0054] The processor can be a general-purpose processor, which can call a database table definition statement generation program stored in memory and execute the database table definition statement generation method provided in this application embodiment. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the database table definition statement generation program is called can be referred to in various embodiments of the database table definition statement generation method of this application, and will not be repeated here.
[0055] Those skilled in the art will understand that Figure 3 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0056] Fourthly, embodiments of this application also provide a readable storage medium.
[0057] The present application has a readable storage medium storing a database table definition statement generation program, wherein when the database table definition statement generation program is executed by a processor, it implements the steps of the database table definition statement generation method described above.
[0058] The method implemented when the database table definition statement generation program is executed can be referred to in various embodiments of the database table definition statement generation method of this application, and will not be repeated here.
[0059] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0060] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0061] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0062] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0063] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0064] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0065] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for generating database table definition statements, characterized in that, The method for generating database table definition statements includes: Based on the input list of table names, construct a single SQL query statement to query the PostgreSQL system tables in batches to retrieve the metadata of all specified tables; Based on the aforementioned metadata, the content is populated in the order of table structure, column definition, constraints, indexes, triggers, and partitioning rules to generate table definition statements (DDL) in batches. The DDL is output after topological sorting according to the dependencies of the specified table.
2. The database table definition statement generation method as described in claim 1, characterized in that, Also includes: The single SQL query statement is used to perform a joint query on the partitioned table-specific tables to process the partitioned tables in the specified table. The partitioned table-specific tables include pg_partitioned_table and pg_inherits.
3. The database table definition statement generation method as described in claim 2, characterized in that, The step of using the single SQL query statement to jointly query the partition table-specific table to process the partition table in the specified table includes: The pg_partitioned_table.partstrategy field identifies RANGE / LIST / HASH partitions to obtain the partitioning strategy. The actual column names can be obtained by associating pg_attribute with pg_partitioned_table.partattrs; The inheritance relationship of sub-partitions is obtained by recursively querying pg_inherits, and a PARTITION OF clause is generated for each sub-partition.
4. The database table definition statement generation method as described in claim 1, characterized in that: The PostgreSQL system tables include pg_class, pg_attribute, pg_type, and pg_constraint.
5. The database table definition statement generation method as described in claim 4, characterized in that, The step of performing topological sorting according to the dependencies of the specified table and then outputting the DDL includes: The dependency relationship of the specified table is obtained based on the pg_constraint; Construct a dependency graph based on the dependencies of the specified table; The Kahn algorithm is applied to perform topological sorting based on the dependency graph to output the DDL.
6. The database table definition statement generation method as described in claim 5, characterized in that, It also includes processing steps for virtual columns, which include: The PostgreSQL system table also includes pg_attrdef; By querying pg_attribute and pg_attrdef together, the storage type is identified using the attgenerated field, and pg_get_expr() is called to parse and generate a virtual column expression.
7. The database table definition statement generation method as described in claim 6, characterized in that, It also includes steps for processing auto-increment fields, which include: The PostgreSQL system tables also include pg_depend and pg_sequence; Check if the default value of the column matches the pattern nextval('seq_name'::regclass) based on pg_attrdef; Verify the dependency relationship between columns and sequences using pg_depend; The sequence parameters are obtained based on pg_sequence, and the sequence parameters include step size and maximum value.
8. A database table definition statement generation device, characterized in that, The database table definition statement generation device includes: The data acquisition module, based on the input list of table names, constructs a single SQL query statement to jointly query the PostgreSQL system tables in order to obtain the metadata of all specified tables in batches. The generation module, based on the metadata, fills in the content in the order of table structure, column definition, constraint, index, trigger and partitioning rules to generate table definition statements (DDL) in batches. The output module is used to output the DDL after performing topological sorting according to the dependencies of the specified table.
9. A database table definition statement generation device, characterized in that, The database table definition statement generation device includes a processor, a memory, and a database table definition statement generation program stored in the memory and executable by the processor, wherein when the database table definition statement generation program is executed by the processor, it implements the steps of the database table definition statement generation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a database table definition statement generation program, wherein when the database table definition statement generation program is executed by a processor, it implements the steps of the database table definition statement generation method as described in any one of claims 1 to 7.