Database table naming method, device, equipment and storage medium

By providing database table naming methods, generating a naming interface and obtaining target naming, the problem of irregular database table naming is solved, and an efficient and standardized naming process is realized, reducing development and operation and maintenance costs.

CN114896224BActive Publication Date: 2025-03-11ALIBABA CLOUD COMPUTING CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210476445.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-03-11
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

In the prior art, the irregular naming of database tables leads to high late development and operation and maintenance costs, and it is difficult to ensure the standardization of naming.

Method used

Provides a database table naming method. By generating a naming interface and obtaining target naming, users can name the database table according to the attribute values ​​corresponding to the naming attributes to improve naming efficiency and normativeness.

Benefits of technology

Improve the standardization of database table naming, reduce the cost of later development and operation and maintenance, and achieve efficient naming without reference to specification documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114896224B_ABST
    Figure CN114896224B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method, apparatus, device and storage medium for naming a database table. In response to a first creation operation to create a database table, a naming interface for the database table is generated according to a naming template corresponding to the first creation operation; in response to an interactive operation for at least one naming attribute, a target name corresponding to the interactive operation is obtained; and according to the target name, the name of the database table is determined. During the naming process, the user can name the database table according to the attribute value corresponding to the naming attribute. There is no need to refer to the specification document during this process, and the naming efficiency is higher. In addition, compared with the specification document, since the attribute value of each naming attribute is limited, the user can only name within this range, which makes the naming of the database table more standardized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for naming a database table. Background Art

[0002] In the process of building a data warehouse, improper naming of database tables will bring huge development and operation and maintenance costs in the later stage. Therefore, it is particularly important to improve the naming standardization of database tables.

[0003] In the related art, in order to standardize the naming of database tables, a series of standard documents are usually formulated to constrain the naming specifications of database tables, which requires relevant personnel to refer to the naming specifications when creating database tables. However, naming database tables in this way has the problem of low standardization, which seriously affects the subsequent development and operation. Summary of the invention

[0004] Multiple aspects of the present application provide a database table naming method, apparatus, device and storage medium to improve the naming standardization of database tables and reduce the later development and operation costs of data warehouses.

[0005] In a first aspect, an embodiment of the present application provides a method for naming a database table, comprising: in response to a first creation operation for creating a database table, generating a naming interface for the database table according to a naming template corresponding to the first creation operation, wherein the naming interface includes at least one naming attribute; in response to an interactive operation directed to at least one naming attribute, obtaining a target name corresponding to the interactive operation; and determining a name of the database table according to the target name.

[0006] In a second aspect, an embodiment of the present application further provides a database table naming device, including:

[0007] A generating module, configured to generate a naming interface of the database table in response to a first creating operation of creating a database table according to a naming template corresponding to the first creating operation, wherein the naming interface includes at least one naming attribute;

[0008] An acquisition module, configured to, in response to an interaction operation directed to at least one named attribute, acquire a target name corresponding to the interaction operation;

[0009] The determination module is used to determine the name of the database table according to the target naming.

[0010] In a third aspect, an embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executed by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to execute the database table naming method as in the first aspect.

[0011] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the database table naming method of the first aspect.

[0012] In an embodiment of the present application, when creating a database table, in response to a first creation operation of creating a database table, a naming interface of the database table is generated according to a naming template corresponding to the first creation operation; in response to an interactive operation for at least one naming attribute, a target name corresponding to the interactive operation is obtained; and according to the target name, the name of the database table is determined. During the naming process, the user can name the database table according to the attribute value corresponding to the naming attribute. In this process, naming can be achieved without referring to the specification document, and the naming efficiency is higher. In addition, compared with the specification document, since the attribute value of each naming attribute is limited, the user can only name within this range, which makes the naming of the database table more standardized. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0014] Figure 1 A schematic diagram of a scenario of a database table naming method provided for an exemplary embodiment of the present application;

[0015] Figure 2 Schematic diagram of the process of naming a database table provided for the exemplary embodiment of the present application Figure 1 ;

[0016] Figure 3 Interface diagram of a database table naming method provided for an exemplary embodiment of the present application Figure 1 ;

[0017] Figure 4 Schematic diagram of the process of naming a database table provided for the exemplary embodiment of the present application Figure 2 ;

[0018] Figure 5 Interface diagram of a database table naming method provided for an exemplary embodiment of the present application Figure 2 ;

[0019] Figure 6 Schematic diagram of the process of naming a database table provided for the exemplary embodiment of the present application Figure 3 ;

[0020] Figure 7 Interface diagram of a database table naming method provided for an exemplary embodiment of the present application Figure 3 ;

[0021] Figure 8 A schematic diagram of the structure of a database table naming device provided for an exemplary embodiment of the present application;

[0022] Fig. 9 A schematic diagram of the structure of an electronic device provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0024] During the construction of a data warehouse, improper naming of database tables will bring high costs to later development and operation and maintenance. For example, improper naming of database tables may cause problems such as high understanding costs, low development efficiency, difficulty in maintenance, and duplicate construction.

[0025] Therefore, in related technologies, many companies and data development platforms will develop a series of specification documents to constrain the table naming standards, but the specification document itself is a weak constraint tool, and it is difficult to constrain users to name according to the specification document, so it is difficult to ensure the implementation effect of standardized naming of database tables.

[0026] In view of this, the embodiments of the present application provide a method, device, equipment and storage medium for naming a database table. When a user creates a database table, a naming template corresponding to the database table is provided, so that the user can name it according to the naming attributes in the naming template. In this process, naming can be achieved without referring to the specification document, and its naming efficiency is higher. In addition, compared with the specification document, since the attribute value of each naming attribute is limited, the user can only name within this range, making the database table naming more standardized.

[0027] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0028] Figure 1 A schematic diagram of a scenario of a method for naming a database table provided by an exemplary embodiment of the present application. Figure 1 As shown, the scenario includes: terminal equipment and users.

[0029] The naming device in the embodiment of the present application may be a terminal device, wherein the terminal device may be a personal digital assistant (PDA) device, a handheld device with wireless communication function (such as a smart phone, a tablet computer), a computing device (such as a personal computer (PC)), a vehicle-mounted device, a wearable device (such as a smart watch, a smart bracelet), a smart home device (such as a smart display device), etc. It should be noted that Figure 1 The naming device in the figure is shown by taking a personal computer as an example, but is not limited to this.

[0030] In an embodiment of the present application, in actual application, a user can create a database table on a terminal device, and display a naming interface of the database table on the interface of the terminal device, and the user can name the database table on the naming interface.

[0031] Specifically, when the user triggers the first creation operation, the terminal device will display a naming interface in the interface according to the naming template corresponding to the first creation operation.

[0032] Furthermore, the user may trigger an interactive operation for naming a database table in the naming interface. Accordingly, the terminal device may obtain a target name according to the interactive operation and determine the name of the database table according to the target name.

[0033] In some optional embodiments, the scenario may also include a server ( Figure 1 The server is a business point that provides data processing, database and other functions. The server can be an integrated server or a distributed server across multiple computers or computer data centers. The server can include hardware, software, or embedded logic components or a combination of two or more such components for executing appropriate functions supported or implemented by the server. The server is, for example, a blade server, a cloud server, etc., or can be a server group consisting of multiple servers.

[0034] Among them, the terminal device and the server can communicate through a wired network or a wireless network. In the embodiment of the present application, the server can perform some functions of the above-mentioned terminal device.

[0035] Exemplarily, when the user triggers the first creation operation, the terminal device may generate an instruction according to the first creation operation and send the instruction to the server. Accordingly, the server may generate a naming interface according to the naming template corresponding to the first creation operation and display it on the terminal device.

[0036] Furthermore, the user can trigger an interactive operation for naming a database table in the terminal's naming interface. Accordingly, the terminal device will generate instructions based on the interactive operation and send the instructions corresponding to the interactive operation to the server. The server will obtain the target name based on the interactive operation and determine the name of the database table based on the target name.

[0037] It should be understood that the embodiments of the present application are not Figure 1 The types and number of devices included in the Figure 1 The application scenario shown may also include a business database, which may be an external memory relative to the server or an internal memory integrated in the server.

[0038] Next, combined with the above Figure 1 The application scenarios shown are used to explain the technical solutions of the present application in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0039] It should be noted that the execution entity in the embodiments of the present application may be a terminal device or a server in the above scenario.

[0040] Figure 2 Schematic diagram of the process of naming a database table provided for the exemplary embodiment of the present application Figure 1 .like Figure 2 As shown, the naming method of the database table includes the following steps:

[0041] S201. In response to a first creation operation of creating a database table, generate a naming interface for the database table according to a naming template corresponding to the first creation operation.

[0042] The embodiment of the present application does not specifically limit the type of the first creation operation. In one example, when creating a database table, it is necessary to determine the directory to which the database table belongs. Accordingly, the first creation operation can be an operation to select the directory to which the database table belongs. It should be understood that the embodiment of the present application does not specifically limit the type of the directory and the naming templates corresponding to the directories of each type. For example, the directory may include but is not limited to at least one of the following: data warehouse detail (DWD), data operation layer (ODS), data base layer (DWB), data service layer (DWS), etc., and examples are not given one by one here.

[0043] In another example, when creating a database table, it is also necessary to determine the type of the database table library. Accordingly, the first creation operation can be a type selection operation for the database table. The embodiment of the present application does not specifically limit the type of database table and the naming templates corresponding to each type of database table. For example, in the field of transportation, the type of database table may include but is not limited to: traffic road congestion index, etc., or, in the field of meteorology, the type of database table may include but is not limited to: air pollution index, etc.

[0044] Of course, the first creation operation may also be a combination of the data table library type and the directory to which it belongs. For example, the first creation operation may be to create a DWS table of the traffic road congestion index.

[0045] It should be noted that different first creation operations correspond to different naming templates, and each naming template includes at least one naming attribute. The embodiment of the present application does not specifically limit the type of naming attributes. For example, the naming attributes include but are not limited to the following:

[0046] Business domain, that is, the business domain to which the database table belongs, such as transportation, water conservancy, aviation, meteorology, etc.;

[0047] Data domain, i.e. the data domain to which the database table belongs, such as roads, vehicles, equipment, time, etc.;

[0048] Incremental full volume, that is, the storage method used by the database table, such as daily incremental, daily full volume, etc.

[0049] The statistical period is the time granularity of data aggregation in the database table, for example, the past day, the past month, the past year, etc.

[0050] Refresh cycle, that is, the update cycle of data in the database table, for example, updating data every day, updating data every week, etc.;

[0051] Business application, that is, the business application to which the table belongs.

[0052] The at least one naming attribute corresponding to each naming template may be any combination of the above naming attributes.

[0053] For example, Figure 3 Example of a naming interface for a database table provided for an exemplary embodiment of the present application Figure 1 .like Figure 3 As shown, the user can select or input the directory to which the database table belongs in the input box corresponding to "belonging directory", thereby completing the first creation operation.

[0054] Taking the creation of the "DWS table of traffic road congestion index" as an example, the corresponding naming template when creating the database table can be "dws_{business domain}_{data domain}_{statistical period}", where "business domain, data domain and statistical period are the naming attributes corresponding to the naming template". Accordingly, at least one naming attribute of the naming template corresponding to the first creation operation is displayed in the area corresponding to the "table name".

[0055] It should be noted that, in the above naming template, each naming attribute is connected by a preset connector. The preset connector in the above example is shown as “_”, but it is not limited to this in actual application.

[0056] S202: In response to an interactive operation directed to at least one named attribute, obtain a target name corresponding to the interactive operation.

[0057] Furthermore, each naming attribute corresponds to a different attribute value, and the user can set the attribute value corresponding to each naming attribute through interactive operations, thereby obtaining the target name.

[0058] The embodiment of the present application does not specifically limit the attribute values ​​corresponding to each named attribute. By way of example, still taking the field of transportation as an example, for the business domain, the corresponding attribute values ​​may include but are not limited to: tfc, airline, nature, gov, etc.; for the data domain, the corresponding attribute values ​​may include but are not limited to: road, vehicle, devc, event, etc.; for the statistical period, the corresponding attribute values ​​may include but are not limited to: hour (h), day (d), week (w), month (m), year (y). It should be noted that the named attributes in other fields are similar and will not be given examples one by one here.

[0059] It should be noted that the embodiment of the present application does not specifically limit the type of interactive operation. In some embodiments, the interactive operation may be an input operation, that is, the user may input the attribute value corresponding to each named attribute in the input box corresponding to each named attribute.

[0060] For example, after determining the naming template, the attribute values ​​corresponding to the naming attributes of the naming template can be displayed in the following manner: Figure 3 In the naming interface shown, the user can input the attribute value corresponding to each naming attribute in the input box corresponding to each naming attribute according to the attribute value corresponding to these naming attributes, so as to fill the position of the naming attribute with the attribute value.

[0061] In some optional implementations, the preview name corresponding to the current interactive operation can also be displayed in the naming interface according to the user's interactive operation, and the preview name can be displayed in the area corresponding to "Table Name Preview". In this way, the user can intuitively view the current naming situation, so that the user can check in real time whether the current naming is accurate and compliant, and make timely adjustments to the naming.

[0062] Furthermore, the attribute values ​​filled in each naming attribute are arranged according to the naming template to obtain the target naming.

[0063] For example, taking the naming template as "dws_{business domain}_{data domain}_{statistical period}", the target attribute value selected for the business domain as "tfc", the target attribute value selected for the data domain as "road", and the target attribute value selected for the data domain as "d", the target is named "dws_tfc_road_d".

[0064] S203: Determine the name of the database table according to the target naming.

[0065] It should be noted that the above target name is the name of the database table.

[0066] In the embodiment of the present application, during the naming process, the user can name the database table according to the attribute value corresponding to the naming attribute. In this process, the naming can be realized without referring to the specification document, and the naming efficiency is higher. In addition, compared with the specification document, since the attribute value of each naming attribute is limited, the user can only name within this range, making the database table naming more standardized.

[0067] Figure 4 Schematic diagram of the process of naming a database table provided for the exemplary embodiment of the present application Figure 2 .like Figure 4 As shown, the naming method of the database table includes the following steps:

[0068] S401, in response to the first creation operation of creating a database table, generating a naming interface for the database table according to the naming template corresponding to the first creation operation.

[0069] The naming interface includes at least one naming attribute.

[0070] S402: In response to an interactive operation oriented to at least one naming attribute, generate a first target name corresponding to the interactive operation.

[0071] S4021. In response to an interactive operation directed to at least one named attribute, display at least one attribute value corresponding to the named attribute on a naming interface.

[0072] S4022. In response to a selection operation on a target attribute value among at least one attribute value, generate a first target name according to the target attribute value.

[0073] In some embodiments, the interaction operation for the naming attribute may be an input operation. For a solution for obtaining the first target name through the input operation, please refer to Figure 2 In the illustrated embodiment, step S202 obtains a target naming scheme, which will not be described in detail here.

[0074] In some other embodiments, the interaction operation may also be a selection operation. Specifically, the above S4022 includes: (1) in response to the selection operation of the target attribute value in the at least one attribute value, replacing the named attribute with the target attribute value to obtain a replacement result of the named attribute.

[0075] (2) Obtain the first target name through the replacement result corresponding to at least one naming attribute.

[0076] For example, Figure 5 Interface diagram of a database table naming method provided for an exemplary embodiment of the present application Figure 2 .like Figure 5 As shown, you can set an "expand button" in the input box corresponding to each naming attribute. When the user selects the expansion button corresponding to a naming attribute, the attribute value corresponding to the naming attribute can be displayed in the naming interface by "pull up, pull down" and other methods (i.e. Figure 5 Attribute 1, Attribute 2, ... Attribute n) shown in , correspondingly, the user can select the attribute value in the named attribute by sliding up and down. For example, if the user selects "attribute value 1", the name corresponding to the business domain position is "attribute value 1". It should be noted that the attribute value determination method corresponding to other named attributes is similar to that of the business domain, which will not be repeated here.

[0077] Furthermore, the attribute values ​​corresponding to the various business attributes are arranged according to the naming template, and the attribute values ​​are connected with a preset connector, so that the target name corresponding to the database table can be obtained.

[0078] For example, taking the naming template as "dws_{business domain}_{data domain}_{statistical period}", the target attribute value selected for the business domain as "tfc", the target attribute value selected for the data domain as "road", and the target attribute value selected for the data domain as "d", the target is named "dws_tfc_road_d".

[0079] Compared with the solution in which the user inputs the attribute value corresponding to each naming attribute, in this embodiment, by setting the attribute value for the user to choose, the user can only select the attribute value within the optional range, thus avoiding errors caused by manual input, bringing great convenience to the user, and further improving the standardization of naming.

[0080] S403: In response to the custom input operation, obtain a custom name corresponding to the custom input operation.

[0081] S404: Generate a target name based on the custom name and the first target name.

[0082] In some embodiments, customized naming can also be performed in the naming interface, and the embodiment of the present application does not specifically limit the method of customized naming.

[0083] Exemplarily, a "custom" naming attribute may be set in the naming template, so that the user may enter a custom name in the "custom" naming attribute, thereby generating a target name according to the custom name and target attribute values ​​corresponding to other naming attributes.

[0084] Please refer to Figure 5 ,like Figure 5 As shown, taking the naming template "dws_{business domain}_{data domain}_{custom}_{statistical period}" as an example, the user can enter the custom name in the input box corresponding to the "custom" naming attribute, and enter the target attribute values ​​corresponding to the "business domain", "data domain" and "statistical period" by selection or input, so as to obtain the first target name.

[0085] Furthermore, the target attribute values ​​corresponding to each naming attribute and the custom name are arranged according to the naming template and connected through a preset connector to obtain the target name.

[0086] For example, taking the custom name "jamindex", the target attribute value selected by the business domain as "tfc", the target attribute value selected by the data domain as "road", and the target attribute value selected by the data domain as "d", the target is named "dws_tfc_road_jamindex_d".

[0087] In some optional implementations, the user can also perform any of the following operations on the naming interface:

[0088] (1) Adjust the position of each naming attribute. For example, after the naming attribute "custom" is adjusted to "statistical period", the obtained naming template is "dws_{business domain}_{data domain}_{statistical period}_{custom}".

[0089] (2) Delete any one or more naming attributes in the naming template. For example, the naming attribute "{statistical period}" can be deleted, and the resulting naming template is "dws_{business domain}_{data domain_{custom}"

[0090] (3) Add one or more new named attributes. For example, the named attribute "refresh cycle" may be added (the location of the newly added named attribute is not particularly limited), and the obtained naming template is "dws_{business domain}_{data domain_{custom}_{statistical cycle}_{refresh cycle}".

[0091] It should be noted that the above operations are exemplary and are not intended to limit the scope of the embodiments of the present application.

[0092] In some optional implementations, a "custom mode" may be provided in the naming interface, and the user may customize the naming through the custom mode. Figure 5 As shown, when the user selects "custom mode", a custom naming interface can be displayed in the interface, and the user can enter a custom name in the custom naming interface.

[0093] Correspondingly, the currently entered name can also be displayed in the table name preview area, so that users can intuitively view the current naming situation, thereby facilitating users to check in real time whether the current naming is accurate and compliant, and make timely adjustments to the naming.

[0094] In this embodiment, by providing a "custom" naming attribute and a custom naming pattern, the flexibility of database table naming can be improved to meet the personalized naming needs of users.

[0095] Figure 6 Schematic diagram of the process of naming a database table provided for the exemplary embodiment of the present application Figure 3 .like Figure 6 As shown, the naming method of the database table includes the following steps:

[0096] S601: In response to a first creation operation of creating a database table, generate a naming interface for the database table according to a naming template corresponding to the first creation operation.

[0097] The naming interface includes at least one naming attribute.

[0098] S602: In response to an interactive operation directed to at least one named attribute, obtain a target name corresponding to the interactive operation.

[0099] It should be noted that if you do not implement S601 to S602, please refer to Figure 2 or Figure 4 The embodiments shown will not be described in detail here.

[0100] S603: In response to the interactive operation, obtain a target attribute value determined by the interactive operation.

[0101] S604: Replace the placeholders in the regular expression with the target attribute value to obtain the target regular expression corresponding to the interactive operation.

[0102] In some embodiments, the named attribute corresponds to a regular expression, the regular expression includes at least one placeholder, wherein the regular expression includes attribute values ​​corresponding to the named attribute, and the attribute values ​​are connected by connectors. The embodiment of the present application does not specifically limit the type of connector.

[0103] For example, taking the connector "|" as an example, the regular expression corresponding to the naming attribute "business domain" may be "(tfc|airline|nature|gov){1,}", where "(tfc|airline|nature|gov){1,}" is the placeholder corresponding to the naming attribute "business domain";

[0104] The regular expression corresponding to the named attribute "data domain" can be "(road|veicle|devc|event){1,}", where "road|veicle|devc|event){1,}" is the placeholder corresponding to the named attribute "data domain";

[0105] The regular expression corresponding to the named attribute "statistical period" can be "(h|d|w|m|y){1,}", where "(h|d|w|m|y){1,}" is the placeholder corresponding to the named attribute "statistical period";

[0106] The regular expression corresponding to the named attribute "custom" may be "(.*){1,}", where "(.*){1,}" is the placeholder corresponding to the named attribute "custom".

[0107] Furthermore, when the user determines a target attribute value of a certain named attribute through an interactive operation, the placeholder corresponding to the named attribute is replaced by the target attribute value, thereby obtaining a target regular expression corresponding to the named attribute.

[0108] For example, still taking the naming template "dws_{business domain}_{data domain}_{custom}_{statistical period}" as an example, when the target attribute values ​​selected by the user are "tfc", "road", and "d" respectively, and the custom name entered for the naming attribute "custom" is "jamindx", the target regular expression combination corresponding to each naming attribute is "dws_tfc_road_jamindx_d";

[0109] It should be noted that when a user obtains the target attribute value of a named attribute through input operation, this target attribute value may be the content randomly input by the user, that is, the target attribute value is not the content specified in the named attribute. For example, when the target attribute values ​​input by the user are "traffic", "road", and "day", and the custom name entered in the "custom" naming attribute is "jamindx", then the target regular expression combination corresponding to each named attribute is "dws_traffic_road_jamindx_day".

[0110] S605: Verify the target name through the target regular expression.

[0111] Correspondingly, since the naming attribute "custom" allows users to enter any content, and when the interactive operation is an input operation, the naming attributes such as "business domain" and "data domain" also allow users to enter any content, therefore, to a certain extent, it may also destroy the standardization of the naming template, resulting in non-standard target naming.

[0112] In view of this, the target naming can be verified based on the target regular expressions corresponding to the naming attributes. Specifically, after obtaining the target regular expressions corresponding to the naming attributes, the target regular expressions are verified by the regular expressions corresponding to the naming attributes, thereby completing the verification of the target naming.

[0113] Exemplarily, still taking the above as an example, when the target regular expression combination corresponding to each naming attribute is "dws_traffic_road_jamindx_day", since "traffic" is not the preset attribute value in the regular expression corresponding to the "business domain"; "day" is not the preset attribute value in the regular expression corresponding to the "statistical period", the target regular expression corresponding to the target naming does not meet the requirements, that is, the target naming fails the verification.

[0114] Correspondingly, when the target regular expression combination corresponding to each naming attribute is "dws_tfc_road_jamindx_d", each target attribute value is the regular expression in the corresponding naming attribute. Therefore, the target regular expression corresponding to the target naming meets the requirements, that is, the target naming passes the verification.

[0115] In some embodiments, there may be a situation where a location corresponding to a naming attribute is missing a name, causing the target regular expression to fail to meet the requirements. For example, taking the naming template "dws_{business domain}_{data domain}_{custom}_{statistical period}" as an example, if the target regular expression combination corresponding to each naming attribute is "dws_road_jamindx_day", the target naming is missing the naming attribute "business domain", so the target regular expression corresponding to the target naming does not meet the requirements, that is, the target naming fails to pass the verification.

[0116] S606: In response to the target naming verification being successful, determining that the name of the database table is the target naming.

[0117] S607: In response to the target naming failing to pass verification, a prompt message is generated according to the naming attribute and the target naming, the prompt message including at least one of a verification failure reason, a verification failure location, and a modification suggestion for the target naming.

[0118] In an embodiment of the present application, a custom naming template is used, and the naming attributes are expressed through corresponding regular expressions and placeholders. During the naming process, the placeholders in the regular expressions of each naming attribute are replaced by the content entered by the user, and then the target regular expression obtained is used to verify the target name entered by the user, thereby ensuring the standardization of the database table to the greatest extent.

[0119] In some embodiments, before creating a database table, a naming template may be created according to requirements. Specifically, the steps include:

[0120] (1) In response to a second creation operation of creating a naming template, obtaining at least one naming attribute corresponding to the second creation operation.

[0121] Specifically, a naming attribute configuration area may be provided on the naming template creation page to implement the configuration of the naming attribute (ie, to create a naming template). For example, Figure 7 Interface diagram of a database table naming method provided for an exemplary embodiment of the present application Figure 3 .like Figure 7 As shown, in some optional implementations, a "belonging directory" selection area may be provided in the naming template creation page. On the one hand, the user can use the "expand button" to display the range of the provided belonging directories, and then select the belonging directory of the currently created naming template from them. On the other hand, the user can also manually enter the belonging directory of the currently created naming template.

[0122] It should be noted that the embodiment of the present application does not specifically limit the type of the directory, and illustratively may include but is not limited to: DWD, ODS, DWB, DWS, etc., which are not exemplified one by one here.

[0123] In some optional implementations, a "naming attribute" selection area may be provided in the naming attribute configuration area provided on the naming template creation page. Similarly, the user may also use the "expansion button" to display the various business attributes provided, and then select the business attributes of the currently created naming template from them. Alternatively, the user may also manually enter the naming attributes of the currently created naming template.

[0124] like Figure 7 As shown, in the naming template creation page, the user can add new naming attributes through the "add" operation, or can delete the currently set naming attributes through the "delete" operation.

[0125] (2) In response to a third creation operation of creating an attribute value, determining at least one attribute value corresponding to each named attribute.

[0126] The third creation operation is not particularly limited in the present embodiment. For example, Figure 7 As shown, taking the attribute value corresponding to the named attribute "statistical period" as an example, the user can enter the attribute value setting page of the statistical period by triggering the "statistical period" area.

[0127] In some optional implementations, the attribute value setting page includes but is not limited to at least one of the following items: "name, ID, description, modification time, operation", etc., wherein "name" is used to indicate the type of each attribute value; "ID" is the attribute value corresponding to the named attribute, and "description" can be a specific description of each attribute value; "modification time" can be the time when the current attribute value was last edited; "operation" includes but is not limited to viewing, editing, deleting and other operations.

[0128] like Figure 7 As shown, the user can set the attribute value in each attribute value setting area. For example, when the user triggers the "view" operation, the detailed information of the attribute value can be viewed. When the user triggers the "edit" operation, the current attribute value information can be re-edited. When the user triggers the "delete" operation, the relevant information of the current attribute value can be deleted.

[0129] It should be noted that for the attribute value setting methods corresponding to other named attributes, please refer to the above description, which will not be shown one by one here.

[0130] (3) Convert at least one naming attribute into a regular expression to obtain a naming template, wherein the regular expression includes at least one placeholder.

[0131] Furthermore, after the attribute value setting of the naming attribute is completed, a regular expression can be generated according to the attribute value corresponding to each naming attribute, thereby obtaining a naming template, wherein each attribute value is connected with a preset connector.

[0132] For example, still taking the connector “|” as an example, for the naming attribute of statistical period, the corresponding regular expression is (h|d|w|m|y){1,}.

[0133] Furthermore, the combination of regular expressions corresponding to the naming attributes is the naming template.

[0134] In the embodiment of the present application, the user can customize the naming attributes and set the attribute values ​​corresponding to each naming attribute, thereby improving the flexibility of the naming template and meeting the user's personalized needs.

[0135] refer to Figure 8 , Figure 8 The following is a schematic diagram of the structure of a naming device for a database table provided by an exemplary embodiment of the present application. Figure 8 As shown, the naming device 800 includes:

[0136] A generation module 801 is used to generate a naming interface for the database table in response to a first creation operation for creating a database table according to a naming template corresponding to the first creation operation, wherein the naming interface includes at least one naming attribute; an acquisition module 802 is used to obtain a target name corresponding to the interaction operation in response to an interaction operation oriented to at least one naming attribute; a determination module 803 is used to determine the name of the database table according to the target name.

[0137] In some optional implementations, the determination module 803 is also used to: in response to the target naming failing verification, generate prompt information based on the naming attributes and the naming template, the prompt information including at least one of the reason for the verification failure of the target naming, the verification failure location, and modification suggestions.

[0138] In some optional implementations, the naming attribute corresponds to a regular expression, which includes at least one placeholder. The acquisition module 802 is also used to: in response to an interactive operation, obtain a target attribute value determined by the interactive operation; replace the placeholder in the regular expression with the target attribute value to obtain a target regular expression corresponding to the interactive operation; the determination module 803 is specifically used to: verify the target naming through the target regular expression; in response to successful target naming verification, determine that the name of the database table is the target naming.

[0139] In some optional implementations, the acquisition module 802 is specifically used to: in response to an interactive operation directed to at least one naming attribute, display at least one attribute value corresponding to the naming attribute on the naming interface; in response to a selection operation on a target attribute value in at least one attribute value, generate a target name according to the target attribute value.

[0140] In some optional implementations, the acquisition module 802 is specifically used to: in response to a selection operation of a target attribute value in at least one attribute value, replace the named attribute with the target attribute value to obtain a replacement result of the named attribute; and obtain the target name through the replacement result corresponding to at least one named attribute.

[0141] In some optional implementations, the acquisition module 802 is specifically used to: generate a first target name corresponding to the interaction operation in response to an interaction operation oriented to at least one naming attribute; obtain a custom name corresponding to the custom input operation in response to a custom input operation; and generate a target name based on the custom name and the first target name.

[0142] In some optional embodiments, the acquisition module 802 is also used to: in response to a second creation operation of creating a naming template, acquire at least one naming attribute corresponding to the second creation operation; in response to a third creation operation of creating an attribute value, determine at least one attribute value corresponding to each naming attribute; convert at least one naming attribute into a regular expression to obtain a naming template, wherein the regular expression includes at least one placeholder.

[0143] It should be noted that the naming device 800 provided in the embodiment of the present application is used to execute the corresponding technical solution in the aforementioned corresponding method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0144] Fig. 9 The schematic diagram of the structure of the electronic device provided by the exemplary embodiment of the present application. Fig. 9 As shown, the electronic device 900 of the embodiment of the present application may include: at least one processor 901 ( Fig. 9 Only one processor is shown); and a memory 902 in communication with at least one processor. The memory 902 stores instructions that can be executed by at least one processor 901, and the instructions are executed by at least one processor 901 so that the electronic device 900 can execute the technical solution in any of the aforementioned method embodiments.

[0145] Optionally, the memory 902 may be independent or integrated with the processor 901 .

[0146] When the memory 902 is a device independent of the processor 901 , the electronic device 900 further includes: a bus 903 for connecting the memory 902 and the processor 901 .

[0147] Optionally, the electronic device 900 is a mobile terminal.

[0148] The electronic device 900 provided in the embodiment of the present application can execute the technical solution of any of the aforementioned method embodiments, and its implementation principles and technical effects are similar, which will not be repeated here.

[0149] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the technical solution in any of the aforementioned method embodiments.

[0150] An embodiment of the present application provides a computer program product, including a computer program, which implements the technical solution in any of the aforementioned method embodiments when executed by a processor.

[0151] The embodiment of the present application also provides a chip, including: a processing module and a communication interface, and the processing module can execute the technical solution in the aforementioned method embodiment.

[0152] Furthermore, the chip also includes a storage module (such as a memory), the storage module is used to store instructions, the processing module is used to execute the instructions stored in the storage module, and the execution of the instructions stored in the storage module enables the processing module to execute the technical solution in the aforementioned method embodiment.

[0153] It should be understood that the processor 901 can be a processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor or a combination of hardware and software modules in the processor.

[0154] The memory 902 may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disk.

[0155] The bus 903 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0156] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0157] In an exemplary embodiment, a storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the storage medium can also be present in an electronic device as discrete components. It should be understood by those skilled in the art that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0158] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0159] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0161] It should be noted that in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as S201, S202, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0162] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps S201 to S203 can be device A; for another example, the execution subject of steps S201 and S202 can be device A, and the execution subject of step S203 can be device B; and so on.

[0163] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0164] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for naming a database table, characterized in that: include: In response to a first creation operation of creating a database table, generating a naming interface of the database table according to a naming template corresponding to the first creation operation, wherein the naming interface includes at least one naming attribute; In response to the interactive operation oriented to the at least one named attribute, generating a first target name corresponding to the interactive operation; In response to a custom input operation, obtaining a custom name corresponding to the custom input operation; Generate a target name based on the custom name and the first target name; According to the target naming, the name of the database table is determined.

2. The naming method according to claim 1, characterized in that: The naming attribute corresponds to a regular expression, the regular expression includes at least one placeholder, and the naming method further includes: In response to the interactive operation, obtaining a target attribute value determined by the interactive operation; The placeholder in the regular expression is replaced with the target attribute value to obtain a target regular expression corresponding to the interactive operation; The step of determining the name of the database table according to the target naming includes: Verify the target name by using the target regular expression; In response to the target naming verification being successful, determining the name of the database table to be the target naming.

3. The naming method according to claim 2, characterized in that: Also includes: In response to the target naming failing to pass verification, prompt information is generated according to the naming attribute and the naming template, the prompt information including at least one of a verification failure reason, a verification failure location, and a modification suggestion for the target naming.

4. The naming method according to any one of claims 1 to 3, characterized in that: The step of obtaining, in response to the interactive operation directed to the at least one named attribute, a target name corresponding to the interactive operation includes: In response to the interactive operation oriented to the at least one named attribute, displaying at least one attribute value corresponding to the named attribute on the naming interface; In response to a selection operation on a target attribute value among at least one attribute value, the target name is generated according to the target attribute value.

5. The naming method according to claim 4, characterized in that: In response to the selection operation of the target attribute value in the at least one attribute value, generating the target name according to the target attribute value includes: In response to a selection operation on a target attribute value in at least one attribute value, replacing the named attribute with the target attribute value to obtain a replacement result of the named attribute; The target name is obtained through the replacement result corresponding to at least one naming attribute.

6. The naming method according to any one of claims 1 to 3, characterized in that: Also includes: In response to a second creation operation of creating a naming template, obtaining at least one naming attribute corresponding to the second creation operation; In response to a third creation operation of creating an attribute value, determining at least one attribute value corresponding to each of the named attributes; At least one of the naming attributes is converted into a regular expression to obtain the naming template, wherein the regular expression includes at least one placeholder.

7. A database table naming device, characterized in that: include: A generating module, configured to generate, in response to a first creating operation of creating a database table, a naming interface of the database table according to a naming template corresponding to the first creating operation, wherein the naming interface includes at least one naming attribute; An acquisition module, configured to generate, in response to an interaction operation directed to the at least one naming attribute, a first target name corresponding to the interaction operation; In response to a custom input operation, obtaining a custom name corresponding to the custom input operation; Generate a target name based on the custom name and the first target name; A determination module is used to determine the name of the database table according to the target naming.

8. An electronic device, characterized in that: include: at least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executed by the at least one processor, and the instructions are executed by the at least one processor so that the electronic device can execute the database table naming method described in any one of claims 1 to 6.

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 method for naming a database table according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for naming a database table according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Menu element naming method and system

    CN101430777A