CN114896244A - Method, device and equipment for configuring database table and computer readable medium - Google Patents

Method, device and equipment for configuring database table and computer readable medium Download PDF

Info

Publication number
CN114896244A
CN114896244A CN202210414906.2A CN202210414906A CN114896244A CN 114896244 A CN114896244 A CN 114896244A CN 202210414906 A CN202210414906 A CN 202210414906A CN 114896244 A CN114896244 A CN 114896244A
Authority
CN
China
Prior art keywords
database
data
configuring
json
database table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210414906.2A
Other languages
Chinese (zh)
Inventor
张占磊
高翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202210414906.2A priority Critical patent/CN114896244A/en
Publication of CN114896244A publication Critical patent/CN114896244A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range

Landscapes

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

Abstract

The invention discloses a method, a device and equipment for configuring a database table and a computer readable medium, and relates to the technical field of computers. One embodiment of the method comprises: responding to an instruction for configuring a database table, and setting the structure of the database table through an operation interface; after the structure of the database table is converted into a JSON virtual table structure, inserting a database insertion statement of the JSON virtual table structure into a table structure information table in a database according to a virtual table identifier; setting data items in the database table through the operation interface, converting the data items into JSON data, and inserting the JSON data into a data information table in a database insertion statement mode according to the virtual table identification; and configuring the database table with the structure and the data items according to the table structure information table and the data information table. The embodiment can improve the efficiency of configuring the database table.

Description

Method, device, equipment and computer readable medium for configuring database table
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer readable medium for configuring a database table.
Background
In the internet service development process, along with the refinement of operation, the operation requirements are more and more. Meanwhile, the diversity of the requirements and the diversity of the scenes are more and more abundant, and the scenes have the same requirement point, namely, the scenes can be manually configured so as to meet the requirement of fine operation.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the database table is configured according to the operation requirement, each table needs to develop a management function in a targeted mode, the workload is huge, and therefore the efficiency of configuring the database table is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a computer readable medium for configuring a database table, which can improve efficiency of configuring the database table.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of configuring a database table, including:
responding to an instruction for configuring a database table, and setting the structure of the database table through an operation interface;
after the structure of the database table is converted into a JSON virtual table structure, inserting a database insertion statement of the JSON virtual table structure into a table structure information table in a database according to a virtual table identifier;
setting data items in the database table through the operation interface, converting the data items into JSON data, and inserting the JSON data into a data information table in a database inserting statement mode according to the virtual table identification;
and configuring the database table with the structure and the data items according to the table structure information table and the data information table.
The responding to the instruction for configuring the database table, and setting the structure of the database table through the operation interface comprises the following steps:
responding to an instruction for configuring the database table, and setting one or more items in the structure of the database table through an operation interface: field name, field type, and field description.
The structure of the database table is converted into a JSON virtual table structure, and the method comprises the following steps:
acquiring fields in a structure of the database table;
and calling a processing interface to splice the fields so as to convert the structure of the database table into a JSON virtual table structure.
The converting the data item into JSON data comprises:
generating a class by a data structure of the data item in a reflection mode;
calling a processing interface to instantiate the data item according to the class to obtain a java object;
and taking the serialized java objects as JSON data.
The processing interface is used for receiving the instruction of the operation interface so as to convert the instruction into a JSON format.
Configuring the database table with the structure and the data items according to the table structure information table and the data information table, including:
acquiring the structure of the database table from the table structure information table based on the virtual table identifier;
extracting the data item from the data information table according to the virtual table identifier;
filling out the data items based on the structure of the database table to configure the database table.
The configuring includes one or more of: add, delete, modify, and query.
According to a second aspect of the embodiments of the present invention, there is provided an apparatus for configuring a database table, including:
the setting module is used for responding to an instruction for configuring the database table and setting the structure of the database table through an operation interface;
the structure module is used for inserting the database of the JSON virtual table structure into a statement and a table structure information table in the database according to the virtual table identification after the structure of the database table is converted into the JSON virtual table structure;
the data module is used for setting data items in the database table through the operation interface, converting the data items into JSON data and inserting the JSON data into a data information table in a database insertion statement mode according to the virtual table identification;
and the configuration module is used for configuring the database table by the structure and the data items according to the table structure information table and the data information table.
According to a third aspect of the embodiments of the present invention, there is provided an electronic device for configuring a database table, including:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method as described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method as described above.
One embodiment of the above invention has the following advantages or benefits: responding to an instruction for configuring a database table, and setting the structure of the database table through an operation interface; after the structure of the database table is converted into a JSON virtual table structure, inserting a database insertion statement of the JSON virtual table structure into a table structure information table in a database according to a virtual table identifier; setting data items in the database table through the operation interface, converting the data items into JSON data, and inserting the JSON data into a data information table in a database inserting statement mode according to the virtual table identification; and configuring the database table with the structure and the data items according to the table structure information table and the data information table. Aiming at different database tables, starting from the two aspects of structure and data items, the structure and the data items are respectively inserted into the database, so that the database tables are configured, and the efficiency of configuring the database tables can be improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow diagram of the main process of a method of configuring database tables according to an embodiment of the invention;
FIG. 2 is a diagram illustrating the structure of database tables set up through an operator interface according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of converting the structure of a database table into a JSON virtual table structure according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of converting a data item into JSON data according to an embodiment of the invention;
FIG. 5 is a schematic flow diagram for configuring database tables with structures and data items according to an embodiment of the invention;
FIG. 6 is a schematic diagram of the main structure of an apparatus for configuring database tables according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Manually configuring the database table may take the following form:
carousel picture: aiming at the operation requirement, a physical table is newly added in an application database, and the fields comprise: a primary key id (id), a picture address (imgUrl), a jump address (jumpUrl), an online time (onlineTime), and an offline time (offlineTime).
Product and document configuration: when different labels and recommended documents are displayed on different pages, a physical table needs to be added to an application database, and the fields include: product id(s), (homepage label (s)), list page label(s), detail page label(s), and order sheet label(s), etc.
And performing business logic processing based on the database table, and performing a management function of increasing, deleting, modifying and checking the database table so as to facilitate operation, configuration and use.
The method for creating different database tables for each requirement has the disadvantages that the database tables expand infinitely, the consumption of database resources is serious, the scalability of a table structure is poor, and the change of the table structure causes large change of codes. Each table needs to develop a management function in a targeted manner, and the workload is huge, so that the efficiency of configuring the database table is low.
In order to solve the problem of low efficiency of configuring the database table, the following technical solution in the embodiment of the present invention may be adopted.
Referring to fig. 1, fig. 1 is a schematic main flow chart of a method for configuring a database table according to an embodiment of the present invention, in which a structure and a data item in the database table are inserted into a database, so as to configure the database table. As shown in fig. 1, the method specifically comprises the following steps:
s101, responding to an instruction for configuring the database table, and setting the structure of the database table through an operation interface.
In an embodiment of the invention, a user sends an instruction to configure a database table. The structure of the database table can be set through the operation interface in response to an instruction to configure the database table. The operation interface is an interface for a user to interact data with the database. The user sets the structure of the database table by selecting or filling in parameters in the operation interface.
In one embodiment of the invention, the structure of the database table includes one or more of the following: field parameters, field type, and field description. That is, in response to an instruction to configure a database table, one or more of the following items in the structure of the database table are set through the operation interface: field name, field type, and field description.
Referring to table 1, table 1 is the field names, field types, and field descriptions involved in the top carousel graph.
TABLE 1
Name of field Type of field Description of the field
sort Number of Carousel graph sequence
imgUrl Character string Carousel map address
jumpUrl Character string Carousel map jump address
position Character string Carousel map position
onlineTime Date Time of line-up
offlineTime Date of day Time to offline
It is understood that the user can set the structure in table 1 in the operation interface.
Referring to fig. 2, fig. 2 is a schematic diagram of a structure of a database table set through an operation interface according to an embodiment of the present invention. The virtual tables are labeled in FIG. 2 with virtual table identifications. In addition, the virtual name and the cache aging time are also included. The user can set the field name, the field type, and the field description through the operation interface.
S102, after the structure of the database table is converted into a JSON virtual table structure, inserting the database of the JSON virtual table structure into a statement according to the virtual table identifier, and inserting the statement into a table structure information table in the database.
After the structure of the database table is set, the structure of the database table can be stored in the database. In the embodiment of the present invention, the structure of the database table may be stored in the table structure information table in the database. The table structure information table stores a plurality of database table structures, and the corresponding database table structures are obtained based on the virtual table identifiers.
It will be appreciated that in the table structure information table, the structure that stores the corresponding database table is identified for each virtual table. The structure of the database table may then be added, uploaded, modified, and queried according to the virtual table identity. As an example, a field name is added and a field description is modified.
In order to add the data items in the database table to the table structure information table, the structure of the database table needs to be converted into a JSON virtual table structure.
Referring to fig. 3, fig. 3 is a schematic flow chart of converting the structure of a database table into a JSON virtual table structure according to an embodiment of the present invention. The method specifically comprises the following steps:
s301, obtaining fields in the structure of the database table.
JSON (JavaScript Object Notification) is a lightweight data exchange format. Easy to read and write by people. And is easy to be analyzed and generated by a machine.
And acquiring fields in the structure of the database table set by the user through the operation interface. As an example, a field name is obtained: sort, imgUrl; the field type: string, number; description of fields: and (5) carousel graph sequence.
And S302, calling a splicing field of the processing interface to convert the structure of the database table into a JSON virtual table structure.
In the embodiment of the invention, the fields are spliced by calling the processing interface, and the structure of the database table is converted into a JSON virtual table structure. The JSON virtual table structure is a virtual table structure in JSON format.
The processing interface is used for receiving an instruction of the operation interface so as to convert the instruction into a JSON format. As one example, virtual method processing logic is called through a processing interface to convert the structure of the database table into a JSON virtual table structure.
As one example, the virtual method processing logic may be implemented in the following manner. To convert the structure of the database table of the carousel map into a JSON virtual table structure.
Input field type: number, and field description: and (5) carousel graph sequence. The following field types and field descriptions are sequentially input. The field type: string; description of fields: carousel map addresses. The field type: string; description of the fields: and (5) jumping addresses of the carousel map. The field type: string; description of the fields: carousel map location. The field type: date; description of fields: and (5) line-up time. The field type: date; description of fields: and (7) offline time.
Specifically, the structure of the database table can be converted into a JSON virtual table structure by splicing fields in the structure of the database table. As an example, the nodes of each row are constructed by means of string concatenation. Such as: "XXX field name": { "type": xxxx "," desc ": xxxx" }. And splicing each row, and splicing { } on the outermost layer to obtain the JSON virtual table structure.
In the embodiment of fig. 3, the structure of the database table is converted into a JSON virtual table structure by calling a processing interface.
After the structure of the database table is converted into the JSON virtual table structure, the JSON virtual table structure needs to be inserted into the table structure information table in the database according to the virtual table identifier. Specifically, the JSON virtual table structure is converted into a database insertion statement and inserted into a table structure information table in the database. And then persistence processing is carried out in the table structure information table.
Referring to table 2, table 2 is a JSON virtual table structure representation table.
TABLE 2
Figure BDA0003605302190000081
S103, setting data items in the database table through an operation interface, converting the data items into JSON data, and inserting the JSON data into the data information table in a database inserting statement mode according to the virtual table identification.
In the embodiment of the invention, the database table is divided into two parts, wherein one part is the structure of the database table; the other part is a data item in a database table.
For data items in a database table, the setting can be performed through an operation interface.
Referring to fig. 4, fig. 4 is a schematic flow chart of converting a data item into JSON data according to an embodiment of the present invention. The method specifically comprises the following steps:
and setting the data items in the database table through the operation interface by the user, and converting the data items into JSON data.
S401, generating a class according to the data structure of the data item in a reflection mode.
And generating a class in a reflection mode in a JAVA language according to the data structure of the data item.
S402, calling the processing interface to instantiate the data item according to the class to obtain the java object.
And calling the processing interface to instantiate the data item according to the class to obtain the java object.
And S403, taking the serialized java objects as JSON data.
The java objects are serialized through the fastjson toolkit. And taking the serialized java objects as JSON data. JSON data refers to data in the JSON format.
In one embodiment of the invention, a processing interface is called to process a data item. The processing interface is used for receiving an instruction of the operation interface so as to convert the instruction into a JSON format. As one example, virtual method processing logic is called through a processing interface to convert data items of a database table into JSON data. That is, the virtual method processing logic is invoked through the processing interface to execute the instantiated data item to obtain a java object, and the serialized java object is taken as JSON data.
As one example, the virtual method processing logic may be implemented in the following manner. To convert the data items of the database table into JSON data.
The following parameters were set: sort, imgURL, jumpURL, position, online Time, and offline Time.
Specifically, sort is set: 1; imgURL: http:// s111. com; jumpURL: http:// www.222.com; position: SHOU YE; online Time: 2020-01-0112: 00:00 and ofline Time: 2020-02-0112:00:00.
In the embodiment of fig. 4, the data item is converted to JSON data by calling a processing interface.
After the data items of the database table are converted into the JSON data, the JSON data needs to be inserted into the data information table in the database according to the virtual table identifier. Specifically, the JSON data is converted into a database insertion statement and inserted into a data information table in the database. And then persistence processing is carried out in the data information table. Namely, the data item is converted into JSON data, and the JSON data is inserted into the data information table in a database insertion statement mode according to the virtual table identifier.
Referring to table 3, table 3 is a JSON data schematic table.
TABLE 3
Figure BDA0003605302190000101
And S104, configuring the database table with the structure and the data items according to the table structure information table and the data information table.
The table structure information table stores a plurality of database table structures, and the data information table stores a plurality of database table data, so that the database tables can be configured by the structures and the data items.
Referring to FIG. 5, FIG. 5 is a flow diagram illustrating the configuration of database tables with structures and data items according to an embodiment of the present invention. The method specifically comprises the following steps:
s501, based on the virtual table identification, the structure of the database table is obtained from the table structure information table.
And based on the virtual table identifier, acquiring the structure of the database table corresponding to the virtual table identifier from the structures in the plurality of database tables in the table structure information table.
And S502, extracting data items from the data information table according to the virtual table identification.
And acquiring the data items corresponding to the virtual table identifications from a plurality of data items in the table structure information table according to the virtual table identifications.
And S503, filling in data items based on the structure of the database table to configure the database table.
And filling the data items according to the structure of the database table, and further configuring the database table.
In the embodiment of FIG. 5, database tables may be configured based on the table structure information tables and data information tables stored by the database.
In one embodiment of the invention, configuring the database table includes one or more of adding a database table, deleting a database table, modifying a database table, and querying a database table. That is, the configuration includes one or more of the following operations: add, delete, modify, and query.
According to the scheme, the data table is added, deleted, modified or inquired only by configuration on the operation interface, and the database does not need to be directly operated. That is, the data of different database tables can be managed without any development effort.
In the embodiment, the structure of the database table is set through the operation interface in response to the instruction for configuring the database table; after the structure of the database table is converted into a JSON virtual table structure, inserting a database insertion statement of the JSON virtual table structure into a table structure information table in a database according to a virtual table identifier; setting data items in the database table through the operation interface, converting the data items into JSON data, and inserting the JSON data into a data information table in a database insertion statement mode according to the virtual table identification; and configuring the database table with the structure and the data items according to the table structure information table and the data information table. Aiming at different database tables, starting from the two aspects of structure and data items, the structure and the data items are respectively inserted into the database, so that the database tables are configured, and the efficiency of configuring the database tables can be improved.
In the embodiment of the invention, the structure and the data items of the database table are respectively converted into the JSON format. And storing the database table by using the table structure information table and the data information table. And unified database table management is performed on the operation interface, so that the efficiency of configuring the database table can be improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an apparatus for configuring a database table according to an embodiment of the present invention, where the apparatus for configuring a database table may implement a method for configuring a database table, and as shown in fig. 6, the apparatus for configuring a database table specifically includes:
the setting module 601 is configured to set a structure of the database table through an operation interface in response to an instruction for configuring the database table;
a structure module 602, configured to insert a database insertion statement of the JSON virtual table structure into a table structure information table in a database according to a virtual table identifier after the structure of the database table is converted into the JSON virtual table structure;
the data module 603 is configured to set a data item in the database table through the operation interface, convert the data item into JSON data, and insert the JSON data into a data information table in a database insert statement manner according to the virtual table identifier;
a configuration module 604, configured to configure the database table with the structure and the data item according to the table structure information table and the data information table.
In an embodiment of the present invention, the setting module 601 is specifically configured to set, through the operation interface, one or more of the following items in the structure of the database table in response to an instruction to configure the database table: field name, field type, and field description.
In an embodiment of the present invention, the structure module 602 is specifically configured to obtain a field in a structure of the database table;
and calling a processing interface to splice the fields so as to convert the structure of the database table into a JSON virtual table structure.
In an embodiment of the present invention, the data module 603 is specifically configured to generate a class from a data structure of the data item in a reflection manner;
calling a processing interface to instantiate the data item according to the class to obtain a java object;
and taking the serialized java objects as JSON data.
In an embodiment of the present invention, the processing interface is configured to receive an instruction of the operation interface to convert into a JSON format.
In an embodiment of the present invention, the configuration module 604 is specifically configured to obtain a structure of the database table from the table structure information table based on the virtual table identifier;
extracting the data item from the data information table according to the virtual table identifier;
filling out the data items based on the structure of the database table to configure the database table.
In one embodiment of the invention, the configuring includes one or more of: add, delete, modify, and query.
FIG. 7 shows an exemplary system architecture 700 of a method of configuring database tables or an apparatus for configuring database tables to which embodiments of the present invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 701, 702, 703. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for configuring the database table provided by the embodiment of the present invention is generally performed by the server 705, and accordingly, the apparatus for configuring the database table is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 are merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use in implementing a terminal device of an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a setup module, a structure module, a data module, and a configuration module. Where the names of these modules do not in some cases constitute a limitation on the modules themselves, for example, a setup module may also be described as "for setting up the structure of a database table through an operator interface in response to an instruction to configure the database table".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
responding to an instruction for configuring a database table, and setting the structure of the database table through an operation interface;
after the structure of the database table is converted into a JSON virtual table structure, inserting a database insertion statement of the JSON virtual table structure into a table structure information table in a database according to a virtual table identifier;
setting data items in the database table through the operation interface, converting the data items into JSON data, and inserting the JSON data into a data information table in a database insertion statement mode according to the virtual table identification;
and configuring the database table with the structure and the data items according to the table structure information table and the data information table.
According to the technical scheme of the embodiment of the invention, the structure of the database table is set through the operation interface in response to the instruction for configuring the database table; after the structure of the database table is converted into a JSON virtual table structure, inserting a database insertion statement of the JSON virtual table structure into a table structure information table in a database according to a virtual table identifier; setting data items in the database table through the operation interface, converting the data items into JSON data, and inserting the JSON data into a data information table in a database insertion statement mode according to the virtual table identification; and configuring the database table with the structure and the data items according to the table structure information table and the data information table. Aiming at different database tables, starting from the two aspects of structure and data items, the structure and the data items are respectively inserted into the database, so that the database tables are configured, and the efficiency of configuring the database tables can be improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of configuring a database table, comprising:
responding to an instruction for configuring the database table, and setting the structure of the database table through an operation interface;
after the structure of the database table is converted into a JSON virtual table structure, inserting a database insertion statement of the JSON virtual table structure into a table structure information table in a database according to a virtual table identifier;
setting data items in the database table through the operation interface, converting the data items into JSON data, and inserting the JSON data into a data information table in a database insertion statement mode according to the virtual table identification;
and configuring the database table with the structure and the data items according to the table structure information table and the data information table.
2. The method of configuring database tables according to claim 1, wherein the setting the structure of the database tables through the operator interface in response to the instruction to configure the database tables comprises:
responding to an instruction for configuring the database table, and setting one or more items in the structure of the database table through an operation interface: a field name, a field type, and a field description.
3. The method of configuring a database table according to claim 1, wherein the structure of the database table is transformed into a JSON virtual table structure comprising:
acquiring fields in a structure of the database table;
and calling a processing interface to splice the fields so as to convert the structure of the database table into a JSON virtual table structure.
4. The method of configuring a database table according to claim 1, wherein said converting the data items into JSON data comprises:
generating a class by a data structure of the data item in a reflection mode;
calling a processing interface to instantiate the data item according to the class to obtain a java object;
and taking the serialized java objects as JSON data.
5. The method of configuring database tables according to claim 3 or 4, wherein said processing interface is configured to receive instructions of said operation interface for conversion into JSON format.
6. The method of configuring a database table according to claim 1, wherein said configuring the database table with the structure and the data items according to the table structure information table and the data information table comprises:
acquiring the structure of the database table from the table structure information table based on the virtual table identifier;
extracting the data item from the data information table according to the virtual table identifier;
filling out the data items based on the structure of the database table to configure the database table.
7. The method of configuring a database table as recited in claim 1, wherein the configuring comprises one or more of: add, delete, modify, and query.
8. An apparatus to configure a database table, comprising:
the setting module is used for responding to an instruction for configuring the database table and setting the structure of the database table through an operation interface;
the structure module is used for inserting the database of the JSON virtual table structure into a statement and a table structure information table in the database according to the virtual table identification after the structure of the database table is converted into the JSON virtual table structure;
the data module is used for setting data items in the database table through the operation interface, converting the data items into JSON data and inserting the JSON data into a data information table in a database insertion statement mode according to the virtual table identification;
and the configuration module is used for configuring the database table according to the table structure information table and the data information table by using the structure and the data items.
9. An electronic device for configuring a database table, comprising:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202210414906.2A 2022-04-20 2022-04-20 Method, device and equipment for configuring database table and computer readable medium Pending CN114896244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210414906.2A CN114896244A (en) 2022-04-20 2022-04-20 Method, device and equipment for configuring database table and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210414906.2A CN114896244A (en) 2022-04-20 2022-04-20 Method, device and equipment for configuring database table and computer readable medium

Publications (1)

Publication Number Publication Date
CN114896244A true CN114896244A (en) 2022-08-12

Family

ID=82718510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210414906.2A Pending CN114896244A (en) 2022-04-20 2022-04-20 Method, device and equipment for configuring database table and computer readable medium

Country Status (1)

Country Link
CN (1) CN114896244A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115438050A (en) * 2022-11-07 2022-12-06 杭州兆林科技有限公司 Hierarchical low-code development platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115438050A (en) * 2022-11-07 2022-12-06 杭州兆林科技有限公司 Hierarchical low-code development platform

Similar Documents

Publication Publication Date Title
US11762697B2 (en) Method and apparatus for scheduling resource for deep learning framework
US10635735B2 (en) Method and apparatus for displaying information
CN110471848B (en) Method and device for dynamically returning message
CN107302597B (en) Message file pushing method and device
CN109446442B (en) Method and apparatus for processing information
CN110851468A (en) Method and device for making simulation response to test request of client
CN113076153B (en) Interface calling method and device
CN111478781B (en) Message broadcasting method and device
CN112507005A (en) Method and device for processing message
CN110321252B (en) Skill service resource scheduling method and device
CN111984234A (en) Method and device for processing work order
CN110705271A (en) System and method for providing natural language processing service
CN114896244A (en) Method, device and equipment for configuring database table and computer readable medium
CN110109912A (en) A kind of identifier generation method and device
CN112948138A (en) Method and device for processing message
CN112818026A (en) Data integration method and device
CN112836201A (en) Method, device, equipment and computer readable medium for multi-platform information intercommunication
CN113779122A (en) Method and apparatus for exporting data
CN111183422B (en) Information processing method and related product
CN113448652A (en) Request processing method and device
CN110858240A (en) Front-end module loading method and device
CN112306984A (en) Data source routing method and device
CN115577200B (en) Page loading method, device, equipment and storage medium
CN110874302A (en) Method and device for determining buried point configuration information
CN116932023A (en) Code processing method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination