Database table structure generation method and device, equipment, medium and program product

By creating a unified field template and parameter configuration content, a unified database table structure is generated, which solves the problem of diversity in design table structures for different R&D teams, reduces the complexity of data interaction between systems and data analysis costs, and improves the efficiency of database table structure generation.

CN119938670APending Publication Date: 2025-05-06INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510003511.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

With the development of digital banking informatization, the diversity of database table structures designed by different R&D teams has increased, resulting in an increase in the complexity of data interaction between systems and high data analysis and governance costs.

Method used

By creating a unified field template, defining unified parameter configuration content, generating a database table structure based on a unified field template, reducing the cost of data interaction between systems and improving the convenience of data analysis and governance.

Benefits of technology

The unified database table structure is realized, the complexity of data interaction between systems is reduced, the cost of data analysis and governance is reduced, and the efficiency of database table structure generation is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938670A_ABST
    Figure CN119938670A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a database table structure generation method and device, equipment, a computer readable storage medium and a computer program product, and can be applied to the field of financial science and technology. The method comprises the steps of obtaining an initial field template of a to-be-configured field in response to a template configuration operation, and displaying the initial field template in a template configuration interface; obtaining parameter configuration content for at least one configuration item in the initial field template, applying the parameter configuration content to the corresponding configuration item, generating a configured field template, and storing the configured field template in a field template library; and in response to a database table structure configuration operation, obtaining a selected target field template from the field template library, and generating a database table structure based on the target field template. According to the method, the data interaction cost between systems is reduced, the database table structure is generated through the reusable field template, repeated work is reduced, and the generation efficiency of the database table structure is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and in particular to a method, apparatus, device, computer-readable storage medium and computer program product for generating a database table structure. Background Art

[0002] With the continuous development of digital banking informatization, it has become an inevitable trend to meet the needs of banking business through the construction of software systems. However, with the increasing number of data tables in the system, fields with the same business meaning in the same business line have presented diverse table structures due to the designs of different R&D teams. This situation not only increases the complexity of data interaction between systems, but also brings a lot of adaptation costs to data analysis and governance. Summary of the invention

[0003] The embodiments of the present application provide a method, apparatus, device, computer-readable storage medium, and computer program product for generating a database table structure, which can reduce the complexity of data interaction between systems and reduce data analysis and management costs.

[0004] In a first aspect, an embodiment of the present application provides a method for generating a database table structure, comprising:

[0005] In response to the template configuration operation, an initial field template of the field to be configured is obtained, and the initial field template is displayed in the template configuration interface; wherein the initial field template includes at least one configuration item of the field to be configured;

[0006] Acquire parameter configuration content for the at least one configuration item, apply the parameter configuration content to the corresponding configuration item, generate a configured field template, and store the configured field template in a field template library;

[0007] In response to the database table structure configuration operation, a selected target field template is obtained from the field template library, and a database table structure is generated based on the target field template.

[0008] In a second aspect, an embodiment of the present application provides a device for generating a database table structure, including:

[0009] A field configuration item acquisition module, used to obtain an initial field template of the field to be configured in response to a template configuration operation, and display the initial field template in a template configuration interface; wherein the initial field template includes at least one configuration item of the field to be configured;

[0010] A field template configuration module, used to obtain parameter configuration content for the at least one configuration item, apply the parameter configuration content to the corresponding configuration item, generate a configured field template, and store the configured field template in a field template library;

[0011] The table structure generation module is used to obtain a selected target field template from the field template library in response to a database table structure configuration operation, and generate a database table structure based on the target field template.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for generating the database table structure provided in the first aspect of the embodiment of the present application are implemented.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for generating the database table structure provided in the first aspect of the embodiment of the present application are implemented.

[0014] In a fifth aspect, an embodiment of the present application provides a computer program product having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for generating the database table structure provided in the first aspect of the embodiment of the present application are implemented.

[0015] The technical solution provided in the embodiment of the present application creates a unified field template, and a unified parameter configuration content (i.e., field information) is defined in the unified field template, so that the database table structure generated based on the unified field template has the same meaning for the same business field, thereby reducing the cost of data interaction between systems and improving the convenience of data analysis and governance; and generating the database table structure through a reusable field template reduces repetitive work and improves the efficiency of generating the database table structure. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of an application environment of a method for generating a database table structure provided in an embodiment of the present application;

[0017] Figure 2 A schematic diagram of a flow chart of a method for generating a database table structure provided in an embodiment of the present application;

[0018] Figure 3 A schematic diagram of a flow chart of a database table structure verification process provided in an embodiment of the present application;

[0019] Figure 4 A flowchart of a field template update process provided in an embodiment of the present application;

[0020] Figure 5 A schematic diagram of a structure of a device for generating a database table structure provided in an embodiment of the present application;

[0021] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application are further described in detail through the following embodiments and in combination with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. Those skilled in the art can make adjustments to them as needed to suit specific application scenarios. It should also be noted that, for ease of description, only the parts related to the present application are shown in the accompanying drawings, rather than all structures.

[0023] Figure 1 A schematic diagram of the application environment of the method for generating a database table structure provided in an embodiment of the present application. Figure 1 , the application environment may include a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless network or a wired network. A template configuration interface is displayed on the terminal 101, and the template configuration interface is used to interact with the user (such as a research and development personnel) to implement the configuration, update and expansion of the field template, as well as the construction function of the database table structure, etc. The terminal 101 sends the configured field template and the database table structure to the server 102 for storage. Among them, the terminal 101 includes but is not limited to a personal computer, a laptop computer, a smart phone, a tablet computer, a portable wearable device and an Internet of Things device. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc., and the Internet of Things device can be a smart TV, a smart car device, etc. The above-mentioned server 102 can be implemented as an independent server or a server cluster composed of multiple servers. It should be noted that the method for generating the database table structure in the embodiment of the present application can be executed independently by the above-mentioned terminal 101 and the server 102, or it can be executed jointly by the above-mentioned terminal 101 and the server 102. The following embodiment is described by taking the execution subject as the above-mentioned terminal 101 as an example.

[0024] Figure 2 A flowchart of a method for generating a database table structure provided in an embodiment of the present application.

[0025] like Figure 2 As shown, the method may include:

[0026] S201. In response to a template configuration operation, an initial field template of a field to be configured is obtained, and the initial field template is displayed in a template configuration interface.

[0027] The initial field template includes at least one configuration item of the field to be configured. Optionally, the at least one configuration item may include at least one of the following: field name, data type, constraint, field length, default value, data format, and field explanation information.

[0028] The above data types define the types of data that a field can store, such as integers, floating point numbers, strings, dates, etc. The above constraints are used to specify the validity and integrity of the data in the field, and may include but are not limited to non-null constraints, unique constraints, primary key constraints, foreign key constraints, etc. The non-null constraint requires that the field must have a value, the unique constraint ensures that the field value is unique in the table, the primary key constraint is used to uniquely identify the data record, and the foreign key constraint is used to maintain the relationship between tables. The above field length specifies the maximum number of characters or numerical range that the field can store data. For a string type field, the length can be in characters; for a numeric type field, the length can be specified as an integer or decimal places. The above default value refers to the value that the system automatically assigns to the field when a new record is inserted if no specific value is provided for the field. The above data format specifies the specific format of the field. The above field explanation information is a description of the purpose and meaning of the field, which helps database developers and maintenance personnel understand the role of the field.

[0029] Specifically, a template configuration interface is displayed on the terminal. In response to the template configuration operation, the terminal obtains the initial field template of the field to be configured, thereby obtaining at least one configuration item of the field to be configured from the initial field template, and displays at least one configuration item of the field to be configured on the template configuration interface, so that the user can configure at least one configuration item of the field to be configured. In one example, the template configuration operation may be generated after the user triggers the template configuration control in the template configuration interface, and the template configuration control may be triggered by voice or touch.

[0030] S202: Obtain parameter configuration content for at least one configuration item, apply the parameter configuration content to the corresponding configuration item, generate a configured field template, and store the configured field template in a field template library.

[0031] Specifically, the user can set the content of at least one configuration item of the configuration field, the terminal obtains the parameter configuration content of the user for at least one configuration item, applies the parameter configuration content to the corresponding configuration item, thereby obtaining the configured field template, and stores the configured field template in the field template library for subsequent calls. The configured field template here can be considered as a customized template obtained by filling in specific parameter configuration content on the basis of the initial field template.

[0032] For example, assuming that the field to be configured is "date", the user can set parameter configuration content (or field information) for each configuration item of the field, and the terminal obtains the parameter configuration content set by the user, and applies the parameter configuration content to the corresponding configuration item, thereby obtaining a field template for "date". Similar to the configuration process of the field template of "date", it is also possible to combine the business application scenarios of the bank to create field templates for data fields related to the bank's business scenarios, such as field templates for "loan account", "loan amount", "borrower", etc.

[0033] S203. In response to the database table structure configuration operation, a selected target field template is obtained from a field template library, and a database table structure is generated based on the target field template.

[0034] The terminal responds to the user's database table structure configuration operation through the table structure configuration interface, obtains the target field template selected by the user from the field template library based on the user's selection operation, and generates a database table structure based on the field information in the selected target field template.

[0035] For example, assuming that a user information table needs to be created, the terminal can obtain the "name" field template, "age" field template and "gender" field template from the field template library based on the user's selection operation, and generate the table structure of the user information table based on the field information in these three field templates (such as field name, data type, constraint conditions, field length, default value, data format and / or field interpretation information). Among them, the table structure of the user information table contains the fields "name", "age" and "gender", and the definition and attribute information of each field are derived from the unified field information in the respective field templates, so that the table structures constructed by different R&D teams have the same meaning for the same business field.

[0036] Optionally, after generating the database table structure, a mapping relationship between the target field template and the database table structure can be established based on the template identifier. When the target field template is subsequently changed, the corresponding database table structure can be obtained using the mapping relationship corresponding to the target field template and the database table structure can be updated.

[0037] Optionally, a description document of the database table structure and the field template may also be generated, and the description document supports version control to manage different versions of the field templates and the database table structure.

[0038] The method for generating a database table structure provided in an embodiment of the present application creates a unified field template, and a unified parameter configuration content (i.e., field information) is defined in the unified field template, so that the database table structure generated based on the unified field template has the same meaning for the same business field, thereby reducing the cost of data interaction between systems and improving the convenience of data analysis and governance; and generating the database table structure through a reusable field template reduces repetitive work and improves the efficiency of generating the database table structure.

[0039] Optionally, after the database table structure is generated, parameter fields in the database table structure may be obtained, and a parameter operation statement carrying the parameter fields may be generated.

[0040] Specifically, the parameter field is used as the operation primary key to generate a parameter operation statement carrying the parameter field. The parameter operation statement performs data operations on the database table structure during the application phase of the database table structure. The parameter operation statement can be an operation statement such as adding, deleting, modifying, and checking. In this way, the parameter operation statement is generated in advance, which facilitates the subsequent operation of the database table, reduces the cost of manually writing statements, and improves the intelligence and convenience of database operations.

[0041] In one embodiment, optionally, Figure 3 As shown, after generating the database table structure, the method may further include:

[0042] S301. Obtain the database type corresponding to the database table structure.

[0043] The classification object of the database type here may be a relational database or a database related to a table structure. For example, a relational database may include database type A, database type B, database type C, and the like.

[0044] In specific implementation, the corresponding database type can be obtained in combination with the definition / description information of the generated database table structure.

[0045] S302: Based on the database type, obtain a database rule corresponding to the database type.

[0046] Different database management systems have different sets of rules. Therefore, after obtaining the database type corresponding to the database table structure, the corresponding database rules can be obtained based on the database type. These database rules specifically define the required data types, constraints, data formats and / or default values, etc.

[0047] S303: Verify the validity of the database table structure based on database rules.

[0048] After obtaining the database rules, the database table structure is validated using the database rules, including but not limited to the data type, data length, whether it is allowed to be empty, whether there is a default value, and data format of the field, to ensure that the constructed database table structure meets the requirements of the database. For example, assuming that the data type defined in the database rules is an integer, but the data type of the field in the constructed database table structure is a floating point number, it can be determined that the validity verification of the database table structure fails.

[0049] S304: Obtain the target field that fails the verification in the database table structure and the reason why the target field fails the verification.

[0050] During the validation process, if it is found that some fields in the database table structure do not meet the requirements of the database rules, these fields and the reasons for the validation failure can be recorded. For example, the reasons for validation failure can be data type mismatch, data format mismatch, length exceeding the limit, etc.

[0051] S305: Send a prompt message, where the prompt message is used to instruct to modify the field template associated with the target field in the field template library, and the prompt message includes the reason why the target field verification fails.

[0052] A prompt message is sent to the user, indicating the target field that failed the verification in the database table structure and the reason for the verification failure, thereby instructing the user to modify the field template associated with the target field in the field template library based on the reason for the verification failure, so that the field template meets the requirements of the database, and then the database table structure subsequently generated based on the field template meets the requirements of the database.

[0053] The prompt information can be sent in a differentiated manner by displaying the target field that failed the verification in the database table structure, and displaying the reason for the verification failure in a preset area where the target field is located, such as highlighting the target field, and displaying the reason for the verification failure in the upper left corner area where the target field is located. Of course, the above prompt information can also be sent to the user through timely communication methods such as emails and text messages, which is not limited in the embodiments of the present application. In this way, the warning effect of the prompt information can be improved.

[0054] In this embodiment, after the database table structure is generated, data verification is performed on the database table structure to ensure that all field parameters in the database table structure meet the requirements of the corresponding database, thereby improving the accuracy and compliance of the database table structure.

[0055] Based on the above embodiment, optionally, Figure 4 As shown, the method also includes:

[0056] S401. In response to a template update operation, a field template to be updated is obtained from a field template library, and the field template to be updated is displayed in a template configuration interface.

[0057] Specifically, the field template to be updated can be understood as the field template of the field to be updated, and the field template to be updated includes at least one configuration item of the field to be updated and parameter configuration content (i.e., field information) under at least one configuration item. A template update control can be provided in the template configuration interface, and the user can trigger the template update control by voice or touch, etc. The terminal responds to the template update operation, obtains the field template to be updated from the field template library based on the field identifier of the field to be updated, and displays the field template to be updated in the template configuration interface, so that the user can update the parameter configuration content in the field template to be updated.

[0058] S402: Obtain first parameter update content for the field template to be updated, and update the field template to be updated based on the first parameter update content to obtain an updated field template.

[0059] Specifically, the user can change the parameter configuration content in the field template to be updated, and the terminal obtains the first parameter update content of the user for the field template to be updated, applies the first parameter update content to the corresponding configuration item, thereby obtaining an updated field template, and stores the updated field template in the field template library. The first parameter update content may include but is not limited to information such as field name, data type, data length, data format, and default value.

[0060] S403: Determine the target database table structure associated with the field template to be updated.

[0061] Among them, the target database table structure refers to the database table structure generated using the field template to be updated. The terminal pre-stores the mapping relationship between the field template and the database table structure. After the field template to be updated is updated, the terminal can determine the target database table structure corresponding to the field template to be updated from the mapping relationship based on the template identifier of the field template to be updated.

[0062] S404: Update the target database table structure based on the updated field template.

[0063] The fields and field attributes in the target database table structure are updated based on the parameter configuration content in the updated field template. For example, for the field template to be updated of the field "date", assuming that the data format of the date defined in the field template to be updated is "year-month-day", when the data format in the field template to be updated is modified to "year-month-day-hour-minute-second", the data format of the date in the target database table structure associated with the field template to be updated can be synchronously modified to "year-month-day-hour-minute-second".

[0064] After completing the target database table structure update, you can verify the validity of the updated target database table structure to ensure that the updated target database table structure meets the database requirements. If the verification fails, you can roll back the updated target database table structure and send a prompt message to check the updated field template.

[0065] In this embodiment, the field template is supported to be updated on demand, and the corresponding database table structure can be automatically and synchronously updated after the field template is updated to ensure the consistency of the data structure. In addition, the field template can be updated on demand when the business changes to meet business needs, thereby improving the flexibility of the system.

[0066] In one embodiment, optionally, the method may also include: in response to a template extension operation, obtaining a configured field template of the field to be extended from a field template library based on the field identifier of the field to be extended, and displaying the configured field template in a template configuration interface; obtaining a second parameter update content for the configured field template, generating an extended field template for the field to be extended based on the second parameter update content and the configured field template, and storing the extended field template in the field template library.

[0067] Specifically, the field to be extended can be understood as a field that needs to generate multiple field templates. For example, multiple field templates can be generated for the field "date", and the data formats in different field templates can be different to meet different business needs. A template extension control can be set in the template configuration interface. The user can trigger the template extension control by voice or touch. The terminal responds to the template extension operation and obtains the configured field template of the field to be extended from the field template library based on the field identifier of the field to be extended. The configured field template contains the definition and properties of the field to be extended, including data type, data length, data format and default value, etc. Furthermore, the configured field template is displayed in the template configuration interface.

[0068] The user can change the parameter configuration content in the configured field template, and the terminal obtains the second parameter update content of the user for the configured field template, generates an extended field template for the field to be extended based on the second parameter update content and the remaining content in the configured field template, and stores the extended field template in the field template library. Continuing to take the field "date" as an example, assuming that the data format defined in the configured field template for the field "date" obtained by the terminal is "year-month-day", and in some business scenarios, the data format of "date" is required to be "year-month-day-hour-minute-second", then the terminal can obtain the configured field template of the field "date" based on the user's template extension operation, and display the configured field template in the template configuration interface, and obtain the second parameter update content for the configured field template "change the data format to "year-month-day-hour-minute-second"", and generate the extended field template for the field "date" based on the second parameter update content and other content in the configured field template (other content remains unchanged). In this way, the field "Date" has two field templates, and the data formats defined in these two field templates are different. Subsequently, according to corresponding business needs, the corresponding "Date" field template can be called to generate a database table structure.

[0069] In this embodiment, it supports creating a new field template based on an existing field template, that is, a new field template can be created by simply modifying part of the content of an existing field template, which simplifies the field template creation process and improves the field template creation efficiency.

[0070] Figure 5 A schematic diagram of a structure of a device for generating a database table structure provided in an embodiment of the present application. Figure 5 As shown, the device may include: a field configuration item acquisition module 501, a field template configuration module 502 and a table structure generation module 503.

[0071] Specifically, the field configuration item acquisition module 501 is used to respond to the template configuration operation, acquire the initial field template of the field to be configured, and display the initial field template in the template configuration interface; wherein the initial field template includes at least one configuration item of the field to be configured;

[0072] The field template configuration module 502 is used to obtain parameter configuration content for at least one configuration item, apply the parameter configuration content to the corresponding configuration item, generate a configured field template, and store the configured field template in a field template library;

[0073] The table structure generation module 503 is used to obtain a selected target field template from a field template library in response to a database table structure configuration operation, and generate a database table structure based on the target field template.

[0074] Based on the above embodiment, optionally, at least one configuration item includes at least one of the following:

[0075] Field name, data type, constraints, field length, default value, data format, and field explanation information.

[0076] Based on the above embodiment, optionally, the device further includes: a table structure verification module.

[0077] Specifically, the table structure verification module is used to obtain the database type corresponding to the database table structure; based on the database type, obtain the database rules corresponding to the database type; verify the validity of the database table structure based on the database rules; obtain the target field that fails the verification in the database table structure and the reason why the target field fails the verification; send a prompt message, the prompt message is used to indicate that the field template associated with the target field in the field template library should be modified, and the prompt message includes the reason why the target field fails the verification.

[0078] Based on the above embodiment, optionally, the device further includes: a field template updating module.

[0079] Specifically, the field template update module is used to respond to the template update operation, obtain the field template to be updated from the field template library, and display the field template to be updated in the template configuration interface; obtain the first parameter update content for the field template to be updated, and update the field template to be updated based on the first parameter update content to obtain an updated field template; determine the target database table structure associated with the field template to be updated; and update the target database table structure based on the updated field template.

[0080] On the basis of the above embodiment, optionally, the device further includes: an operation statement generating module.

[0081] Specifically, the operation voice generation module is used to obtain parameter fields in the database table structure and generate parameter operation statements carrying the parameter fields; wherein the parameter operation statements perform data operations on the database table structure during the application phase of the database table structure.

[0082] On the basis of the above embodiment, optionally, the device further includes: a field template expansion module.

[0083] Specifically, the field template extension module is used to respond to the template extension operation, obtain the configured field template of the field to be extended from the field template library based on the field identifier of the field to be extended, and display the configured field template in the template configuration interface; obtain the second parameter update content for the configured field template, generate the extended field template of the field to be extended based on the second parameter update content and the configured field template, and store the extended field template in the field template library.

[0084] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of the processor 60 in the device can be one or more. Figure 6 A processor 60 is taken as an example; the processor 60, memory 61, input device 62 and output device 63 in the device can be connected by a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0085] The memory 61, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the method for generating a database table structure in the embodiments of the present application (for example, the field configuration item acquisition module 501, the field template configuration module 502 and the table structure generation module 503 in the device for generating a database table structure). The processor 60 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 61, that is, implements the method for generating a database table structure provided in any of the above embodiments.

[0086] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created during the generation of a database table structure, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the device / terminal / server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0087] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 63 may include a display device such as a display screen.

[0088] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0089] In response to the template configuration operation, an initial field template of the field to be configured is obtained, and the initial field template is displayed in the template configuration interface; wherein the initial field template includes at least one configuration item of the field to be configured;

[0090] Acquire parameter configuration content for the at least one configuration item, apply the parameter configuration content to the corresponding configuration item, generate a configured field template, and store the configured field template in a field template library;

[0091] In response to the database table structure configuration operation, a selected target field template is obtained from the field template library, and a database table structure is generated based on the target field template.

[0092] In one embodiment, a computer program product is further provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0093] In response to the template configuration operation, an initial field template of the field to be configured is obtained, and the initial field template is displayed in the template configuration interface; wherein the initial field template includes at least one configuration item of the field to be configured;

[0094] Acquire parameter configuration content for the at least one configuration item, apply the parameter configuration content to the corresponding configuration item, generate a configured field template, and store the configured field template in a field template library;

[0095] In response to the database table structure configuration operation, a selected target field template is obtained from the field template library, and a database table structure is generated based on the target field template.

[0096] The database table structure generation device, electronic device, computer-readable storage medium, and computer program product provided in the above embodiments can execute the database table structure generation method provided in any embodiment of the present application, and have the corresponding functional modules and beneficial effects of executing the method. For technical details not described in detail in the above embodiments, please refer to the database table structure generation method provided in any embodiment of the present application.

[0097] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it 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 the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0098] It is worth noting that the various units and modules included in the above embodiments are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.

[0099] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A method for generating a database table structure, characterized in that: include: In response to the template configuration operation, an initial field template of the field to be configured is obtained, and the initial field template is displayed in the template configuration interface; wherein the initial field template includes at least one configuration item of the field to be configured; Acquire parameter configuration content for the at least one configuration item, apply the parameter configuration content to the corresponding configuration item, generate a configured field template, and store the configured field template in a field template library; In response to the database table structure configuration operation, a selected target field template is obtained from the field template library, and a database table structure is generated based on the target field template.

2. The method according to claim 1, characterized in that The at least one configuration item includes at least one of the following: Field name, data type, constraints, field length, default value, data format, and field explanation information.

3. The method according to claim 1, characterized in that Also includes: Obtaining the database type corresponding to the database table structure; Based on the database type, obtaining a database rule corresponding to the database type; Performing validity verification on the database table structure based on the database rules; Obtain the target field that failed the verification in the database table structure and the reason why the target field failed the verification; A prompt message is sent, where the prompt message is used to instruct to modify the field template associated with the target field in the field template library, and the prompt message includes the reason why the target field verification fails.

4. The method according to claim 1, characterized in that: Also includes: In response to the template update operation, obtaining the field template to be updated from the field template library, and displaying the field template to be updated in the template configuration interface; Acquire a first parameter update content for the field template to be updated, and update the field template to be updated based on the first parameter update content to obtain an updated field template; Determine the target database table structure associated with the field template to be updated; The target database table structure is updated based on the updated field template.

5. The method according to claim 1, characterized in that: Also includes: A parameter field in the database table structure is obtained, and a parameter operation statement carrying the parameter field is generated; wherein the parameter operation statement performs data operation on the database table structure during the application phase of the database table structure.

6. The method according to claim 1, characterized in that Also includes: In response to the template extension operation, acquiring a configured field template of the field to be extended from the field template library based on the field identifier of the field to be extended, and displaying the configured field template in the template configuration interface; Acquire the second parameter update content for the configured field template, generate the extended field template of the field to be extended based on the second parameter update content and the configured field template, and store the extended field template in the field template library.

7. A device for generating a database table structure, characterized in that: include: A field configuration item acquisition module, used to obtain an initial field template of the field to be configured in response to a template configuration operation, and display the initial field template in a template configuration interface; wherein the initial field template includes at least one configuration item of the field to be configured; A field template configuration module, used to obtain parameter configuration content for the at least one configuration item, apply the parameter configuration content to the corresponding configuration item, generate a configured field template, and store the configured field template in a field template library; The table structure generation module is used to obtain a selected target field template from the field template library in response to a database table structure configuration operation, and generate a database table structure based on the target field template.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.