CN113987048A - Database interface generation method and device - Google Patents

Database interface generation method and device Download PDF

Info

Publication number
CN113987048A
CN113987048A CN202111367194.5A CN202111367194A CN113987048A CN 113987048 A CN113987048 A CN 113987048A CN 202111367194 A CN202111367194 A CN 202111367194A CN 113987048 A CN113987048 A CN 113987048A
Authority
CN
China
Prior art keywords
data table
generating
table node
database interface
module
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
CN202111367194.5A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111367194.5A priority Critical patent/CN113987048A/en
Publication of CN113987048A publication Critical patent/CN113987048A/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/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/2435Active constructs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Landscapes

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

Abstract

The embodiment of the application provides a method and a device for generating a database interface, which relate to the field of finance, and the method comprises the following steps: selecting all data table node modules required for generating a database interface; setting an incidence relation between the data table node modules; and generating the database interface according to the data table node module and the incidence relation. The invention effectively reduces the threshold of compiling the database interface, so that business personnel mastering primary database knowledge can also finish the database interface arrangement work by themselves, thereby not only improving the overall flexibility of the data platform, but also improving the business response speed.

Description

Database interface generation method and device
Technical Field
The application relates to the field of finance, in particular to a method and a device for generating a database interface.
Background
In the past, the editing of a database interface needs to be realized by developers in a coding mode, and a large number of forms are also depended on in a scheme of a configuration tool of a web end, so that the problems of low arrangement efficiency and incapability of intuitively knowing the structure of the database interface are caused. And sending the serialized interface content of the database to a server by customizing the grammar of the database interface and realizing a visualization means based on a node dragging mode, and generating a corresponding database interface after the server checks.
Disclosure of Invention
To solve the problems in the prior art, the present application provides a method and an apparatus for generating a database interface, where the method includes: selecting all data table node modules required for generating a database interface; setting an incidence relation between the data table node modules; and generating the database interface according to the data table node module and the incidence relation. The invention effectively reduces the threshold of compiling the database interface, so that business personnel mastering primary database knowledge can also finish the database interface arrangement work by themselves, thereby not only improving the overall flexibility of the data platform, but also improving the business response speed.
In one aspect of the present invention, a method for generating a database interface is provided, including:
selecting all data table node modules required for generating a database interface;
setting an incidence relation between the data table node modules;
and generating the database interface according to the data table node module and the incidence relation.
In a preferred embodiment, further comprising:
and generating the data table node module.
In a preferred embodiment, the module for generating the data table node includes:
creating an initialized data table node module;
and adding the attribute information of the data table nodes into the data table node module to generate the data table node module.
In a preferred embodiment, the attribute information of the data table node includes:
table information, field list, field decoration, query condition, packet field, sort field.
In a preferred embodiment, the setting of the association relationship between the data table node modules includes:
and setting the association relation between the data table node modules in a directional connection mode.
In a preferred embodiment, the setting of the association relationship between the data table node modules in a directed connection manner includes:
if the connection line points to a second data table node from a first data table node, determining the incidence relation between the first data table node and the second data table node as left incidence;
if the connection line points to a first data table node from a second data table node, determining the incidence relation between the first data table node and the second data table node as right incidence;
and if the connection line is a bidirectional direction between the first data table node and the second data table node, determining the incidence relation between the first data table node and the second data table node as internal incidence.
In a preferred embodiment, the generating the database interface according to the data table node module and the association relationship includes:
generating a preset format sequence file according to the attributes of the data table nodes and the incidence relation;
generating a database statement according to the preset format sequence file;
and packaging the database statement into a database interface.
In a preferred embodiment, the preset format includes:
the method comprises the following steps of field information, table information, query conditions, grouping information, sequencing information, visual description information and database interface information.
In another aspect of the present invention, an apparatus for generating a database interface is provided, including:
the node module selection module is used for selecting all data table node modules required by generating the database interface;
the incidence relation setting module is used for setting the incidence relation between the data table node modules;
and the interface generation module generates the database interface according to the data table node module and the incidence relation.
In a preferred embodiment, further comprising:
and the node module generating module is used for generating the data table node module.
In a preferred embodiment, the node module generating module includes:
the module initialization unit is used for creating an initialized data table node module;
and the information adding unit is used for adding the attribute information of the data table nodes into the data table node module and generating the data table node module.
In a preferred embodiment, the interface generation module includes:
the sequence file generating unit is used for generating a sequence file with a preset format according to the attributes of the data table nodes and the incidence relation;
the database statement generating unit generates database statements according to the preset format sequence file;
and the interface packaging unit is used for packaging the database statement into a database interface.
In another aspect of the present invention, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the database interface generation method when executing the computer program.
In still another aspect of the present invention, the present application provides a computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements the method for generating a database interface.
According to the technical scheme, the generation method of the database interface comprises the following steps: selecting all data table node modules required for generating a database interface; setting an incidence relation between the data table node modules; and generating the database interface according to the data table node module and the incidence relation. The invention effectively reduces the threshold of compiling the database interface, so that business personnel mastering primary database knowledge can also finish the database interface arrangement work by themselves, thereby not only improving the overall flexibility of the data platform, but also improving the business response speed.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a generation method of a database interface.
FIG. 2 is a schematic diagram of a data table node module generation flow.
FIG. 3 is a schematic flow diagram of the generation of a spreadsheet interface by a spreadsheet node module.
Fig. 4 is a schematic structural diagram of a database interface generation apparatus.
Fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the method and apparatus for generating a database interface disclosed in the present application may be used in the field of computer technology, and may also be used in any field other than the field of computer technology.
In the past, the editing of a database interface needs to be realized by developers in a coding mode, and a large number of forms are also depended on in a scheme of a configuration tool of a web end, so that the problems of low arrangement efficiency and incapability of intuitively knowing the structure of the database interface are caused. And sending the serialized interface content of the database to a server by customizing the grammar of the database interface and realizing a visualization means based on a node dragging mode, and generating a corresponding database interface after the server checks.
Aiming at the problems in the prior art, the application provides a method and a device for generating a database interface, which select all data table node modules required by the generation of the database interface; setting an incidence relation between the data table node modules; and generating the database interface according to the data table node module and the incidence relation. The invention effectively reduces the threshold of compiling the database interface, so that business personnel mastering primary database knowledge can also finish the database interface arrangement work by themselves, thereby not only improving the overall flexibility of the data platform, but also improving the business response speed.
The following describes a method and an apparatus for generating a database interface according to the present invention in detail with reference to the accompanying drawings.
In a specific embodiment, the present application provides a method for generating a database interface, as shown in fig. 1, including:
s1, selecting all data table node modules needed by generating the database interface;
specifically, each data table node module stores description information related to the data table, including table information, a field list, a query condition, a grouping field and a sorting field, wherein the table information and the field list are exclusive to the current data table, and the query condition, the grouping field and the sorting field belong to a general part, one part is stored globally, and for modularization, references of the data are also stored in each data table node module. The field information part is formed into an array by field elements to be inquired, and each field element comprises a table name, a field name, a corresponding expression and an alias. The table information is an array formed by all related data tables, each data table element contains a table name, a table association relation, an associated table name and an association condition, and the inquired main table does not contain the table association relation, the associated table name and the association condition fields. The query condition is a nestable object AND is composed of three attributes of a condition relation, a condition element AND a sub-condition, wherein the condition relation is AND OR OR, the condition element is an expression, for example, ti.Ref1 is 1, the sub-condition has the same structure as the query condition AND represents the nested query condition, the sub-condition can also have its own sub-condition, AND so on, AND can be nested in multiple layers. The grouping information comprises grouping items and grouping conditions, and is used for subsequently generating a GROUP BY field and a HAVING field, and the grouping conditions have the same structure as the query conditions and are nestable objects. The sorting information is an array, and each array element comprises two attributes of a sorting expression and a sorting sequence.
In a specific embodiment, the data table node module is generated in advance, and the step of generating the data table node module, as shown in fig. 2, includes:
s11, creating an initialized data table node module;
specifically, a data table node module is established, which comprises table information, a field list, query conditions, grouping fields and sorting fields. The established data table node module is initialized, the content of the module can be initialized to be a null value, and each content of the module can be initialized according to a specific template.
And S12, adding the attribute information of the data table node into the data table node module to generate the data table node module.
Specifically, the relevant attribute information is added to the data table node module according to the requirement of the data table node generated as required. For example, field information is added as column _ name, table information is added as table _ name, query conditions are added as column _ name operator value, grouping information is added as column _ name, sorting information is null, visual description information is null, and database interface information is null.
S2, setting the incidence relation between the data table node modules;
specifically, the association between the data tables includes left association, right association and inner association, wherein the left association refers to returning records including all records in the left table and the records in the right table with equal associated fields; the right association refers to returning all records in the right table and the records with the same associated fields in the left table; intra-association refers to returning only rows in both tables where the association fields are equal. In a specific embodiment, the setting of the association relationship between the data table node modules in a directed connection manner specifically includes:
if the connection line points to a second data table node from a first data table node, determining the incidence relation between the first data table node and the second data table node as left incidence;
if the connection line points to a first data table node from a second data table node, determining the incidence relation between the first data table node and the second data table node as right incidence;
and if the connection line is a bidirectional direction between the first data table node and the second data table node, determining the incidence relation between the first data table node and the second data table node as internal incidence.
And S3, generating the database interface according to the data table node module and the incidence relation.
Specifically, the generating the database interface according to the data table node module and the association relationship, as shown in fig. 3, includes:
s31, generating a sequence file with a preset format according to the attributes of the data table nodes and the incidence relation;
specifically, the node attribute information related in the data table node module and the associated information between the data tables are sorted according to a preset format, and the sequence of the preset format is as follows: the method comprises the following steps of field information, table information, query conditions, grouping information, sequencing information, visual description information and database interface information. For example, according to the requirement of generating a database interface, three data table node modules are selected: the attributes in the first node module are respectively: the field information is column _ name, the table information is table _ name, the query condition is column _ name operator value, the grouping information is column _ name, the sequencing information is null, the visual description information is null, and the database interface information is null; the attributes in the second node module are respectively: the field information is column _ name2, the table information is table _ name2, the query condition is column _ name2 operator value, the grouping information is column _ name2, the ordering information is null, the visual description information is null, and the database interface information is null; the attributes in the third node module are respectively: the field information is column _ name3, the table information is table _ name3, the query condition is column _ name3 operator value, the grouping information is column _ name3, the ordering information is null, the visual description information is null, and the database interface information is null. The association relationship between the three data table nodes is that table _ name2 is left associated with table _ name, and table _ name3 is right associated with table _ name. The generated preset format sequence file is:
column_name,table_name,column_name operator value,column_name,,,;
column_name2,table_name2 left table_name,column_name2 operator value,column_name2,,,;
column_name3,table_name3 right table_name,column_name3 operator value,column_name3,,,。
s32, generating database statements according to the preset format sequence file;
specifically, each item in the preset format sequence file corresponds to a certain statement format in the database statement, for example, select is added before field information, from is added before table information, where is added before query conditions, and group by is added before grouping information, and finally, the database statement is generated. For example, if the field information is column _ name, the table information is table _ name, the query condition is column _ name operator value, and the grouping information is column _ name, then the correspondingly generated database statement is selected column _ name from table _ name where column _ name is located.
And S33, packaging the database statement into a database interface.
Specifically, the sql statements are put in the sql property file, so that all the sql statements are put in the same file to operate. For example, the following statements are found in the sql properties document:
insertUser=insert into user(name,password)values(?,?)
queryUserInfo=select name,password,age from user
queryUserPassword=select password from user where name=?
queryUserName=select count(*)from user where name=?
the encapsulation database interface program is
Figure BDA0003361090980000071
As can be seen from the above description, the method for generating a database interface according to the present invention selects all data table node modules required for generating the database interface; setting an incidence relation between the data table node modules; and generating the database interface according to the data table node module and the incidence relation. The invention effectively reduces the threshold of compiling the database interface, so that business personnel mastering primary database knowledge can also finish the database interface arrangement work by themselves, thereby not only improving the overall flexibility of the data platform, but also improving the business response speed.
From a software aspect, the present application provides an embodiment of a device for generating a database interface for executing all or part of the contents in the method for generating a database interface, and referring to fig. 4, the device for generating a database interface specifically includes the following contents:
the node module selection module 1 selects all data table node modules required by generating a database interface;
the incidence relation setting module 2 is used for setting the incidence relation among the data table node modules;
and the interface generation module 3 is used for generating the database interface according to the data table node module and the incidence relation.
As can be seen from the above description, the present invention provides a database interface generation apparatus, which is configured to perform the following steps: selecting all data table node modules required for generating a database interface; setting an incidence relation between the data table node modules; and generating the database interface according to the data table node module and the incidence relation. The invention effectively reduces the threshold of compiling the database interface, so that business personnel mastering primary database knowledge can also finish the database interface arrangement work by themselves, thereby not only improving the overall flexibility of the data platform, but also improving the business response speed.
In a specific embodiment, the present application provides a database interface generation apparatus, including:
the node module selection module 1 selects all data table node modules required by generating a database interface;
specifically, each data table node module stores description information related to the data table, including table information, a field list, a query condition, a grouping field and a sorting field, wherein the table information and the field list are exclusive to the current data table, and the query condition, the grouping field and the sorting field belong to a general part, one part is stored globally, and for modularization, references of the data are also stored in each data table node module. The field information part is formed into an array by field elements to be inquired, and each field element comprises a table name, a field name, a corresponding expression and an alias. The table information is an array formed by all related data tables, each data table element contains a table name, a table association relation, an associated table name and an association condition, and the inquired main table does not contain the table association relation, the associated table name and the association condition fields. The query condition is a nestable object AND is composed of three attributes of a condition relation, a condition element AND a sub-condition, wherein the condition relation is AND OR OR, the condition element is an expression, for example, ti.Ref1 is 1, the sub-condition has the same structure as the query condition AND represents the nested query condition, the sub-condition can also have its own sub-condition, AND so on, AND can be nested in multiple layers. The grouping information comprises grouping items and grouping conditions, and is used for subsequently generating a GROUP BY field and a HAVING field, and the grouping conditions have the same structure as the query conditions and are nestable objects. The sorting information is an array, and each array element comprises two attributes of a sorting expression and a sorting sequence.
In a specific embodiment, the data table node module is generated in advance, and the apparatus further includes a node module generating module, which specifically includes:
the module initialization unit is used for creating an initialized data table node module;
specifically, a data table node module is established, which comprises table information, a field list, query conditions, grouping fields and sorting fields. The established data table node module is initialized, the content of the module can be initialized to be a null value, and each content of the module can be initialized according to a specific template.
And the information adding unit is used for adding the attribute information of the data table nodes into the data table node module and generating the data table node module.
Specifically, the relevant attribute information is added to the data table node module according to the requirement of the data table node generated as required. For example, field information is added as column _ name, table information is added as table _ name, query conditions are added as column _ name operator value, grouping information is added as column _ name, sorting information is null, visual description information is null, and database interface information is null.
The incidence relation setting module 2 is used for setting the incidence relation among the data table node modules;
specifically, the association between the data tables includes left association, right association and inner association, wherein the left association refers to returning records including all records in the left table and the records in the right table with equal associated fields; the right association refers to returning all records in the right table and the records with the same associated fields in the left table; intra-association refers to returning only rows in both tables where the association fields are equal. In a specific embodiment, the setting of the association relationship between the data table node modules in a directed connection manner specifically includes:
if the connection line points to a second data table node from a first data table node, determining the incidence relation between the first data table node and the second data table node as left incidence;
if the connection line points to a first data table node from a second data table node, determining the incidence relation between the first data table node and the second data table node as right incidence;
and if the connection line is a bidirectional direction between the first data table node and the second data table node, determining the incidence relation between the first data table node and the second data table node as internal incidence.
And the interface generation module 3 generates the database interface according to the data table node module and the incidence relation.
In a specific embodiment, the interface generation module may be divided into the following units:
the sequence file generating unit is used for generating a sequence file with a preset format according to the attributes of the data table nodes and the incidence relation;
specifically, the node attribute information related in the data table node module and the associated information between the data tables are sorted according to a preset format, and the sequence of the preset format is as follows: the method comprises the following steps of field information, table information, query conditions, grouping information, sequencing information, visual description information and database interface information. For example, according to the requirement of generating a database interface, three data table node modules are selected: the attributes in the first node module are respectively: the field information is column _ name, the table information is table _ name, the query condition is column _ name operator value, the grouping information is column _ name, the sequencing information is null, the visual description information is null, and the database interface information is null; the attributes in the second node module are respectively: the field information is column _ name2, the table information is table _ name2, the query condition is column _ name2 operator value, the grouping information is column _ name2, the ordering information is null, the visual description information is null, and the database interface information is null; the attributes in the third node module are respectively: the field information is column _ name3, the table information is table _ name3, the query condition is column _ name3 operator value, the grouping information is column _ name3, the ordering information is null, the visual description information is null, and the database interface information is null. The association relationship between the three data table nodes is that table _ name2 is left associated with table _ name, and table _ name3 is right associated with table _ name. The generated preset format sequence file is:
column_name,table_name,column_name operator value,column_name,,,;
column_name2,table_name2 left table_name,column_name2 operator value,column_name2,,,;
column_name3,table_name3 right table_name,column_name3 operator value,column_name3,,,。
the database statement generating unit is used for generating database statements according to the preset format sequence file;
specifically, each item in the preset format sequence file corresponds to a certain statement format in the database statement, for example, select is added before field information, from is added before table information, where is added before query conditions, and group by is added before grouping information, and finally, the database statement is generated. For example, if the field information is column _ name, the table information is table _ name, the query condition is column _ name operator value, and the grouping information is column _ name, then the correspondingly generated database statement is selected column _ name from table _ name where column _ name is located.
And the interface packaging unit is used for packaging the database statement into a database interface.
Specifically, the sql statements are put in the sql property file, so that all the sql statements are put in the same file to operate. For example, the following statements are found in the sql properties document:
insertUser=insert into user(name,password)values(?,?)
queryUserInfo=select name,password,age from user
queryUserPassword=select password from user where name=?
queryUserName=select count(*)from user where name=?
the encapsulation database interface program is
Figure BDA0003361090980000101
Figure BDA0003361090980000111
As can be seen from the above description, the apparatus for generating a database interface according to the present invention includes a node module selecting module 1, which selects all data table node modules required for generating a database interface; the incidence relation setting module 2 is used for setting the incidence relation among the data table node modules; and the interface generation module 3 is used for generating the database interface according to the data table node module and the incidence relation. The invention effectively reduces the threshold of compiling the database interface, so that business personnel mastering primary database knowledge can also finish the database interface arrangement work by themselves, thereby not only improving the overall flexibility of the data platform, but also improving the business response speed.
In terms of hardware, the present application provides an embodiment of an electronic device for implementing all or part of contents in a method for generating a database interface, where the electronic device specifically includes the following contents:
fig. 5 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 5, the electronic device 9600 can include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this FIG. 5 is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the generation functionality of the database interface may be integrated into the central processor. Wherein the central processor may be configured to control:
s1, selecting all data table node modules needed by generating the database interface;
s2, setting the incidence relation between the data table node modules;
and S3, generating the database interface according to the data table node module and the incidence relation.
From the above description, the electronic device provided in the embodiment of the present application effectively reduces the threshold for compiling the database interface, so that a business person who grasps the primary database knowledge can also automatically complete the database interface arrangement work, thereby not only improving the overall flexibility of the data platform, but also improving the business response speed.
In another embodiment, the database interface generating device may be configured separately from the central processor 9100, for example, the database interface generating device may be configured as a chip connected to the central processor 9100, and the database interface generating function is realized by the control of the central processor.
As shown in fig. 5, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 also does not necessarily include all of the components shown in fig. 5; further, the electronic device 9600 may further include components not shown in fig. 5, which may be referred to in the art.
As shown in fig. 5, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. Power supply 9170 is used to provide power to electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 9140 could also be some other type of device. Memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 being used for storing application programs and function programs or for executing a flow of operations of the electronic device 9600 by the central processor 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby implementing ordinary telecommunications functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps in the method for generating a database interface in the foregoing embodiment, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, implements all the steps in the method for generating a database interface, where an execution subject of the computer program is a server or a client, for example, the processor implements the following steps when executing the computer program:
s1, selecting all data table node modules needed by generating the database interface;
s2, setting the incidence relation between the data table node modules;
and S3, generating the database interface according to the data table node module and the incidence relation.
From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application effectively reduces the threshold for compiling database interfaces, so that business personnel who master the primary database knowledge can also automatically complete database interface arrangement work, thereby not only improving the overall flexibility of the data platform, but also improving the business response speed.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (14)

1. A method for generating a database interface, comprising:
selecting all data table node modules required for generating a database interface;
setting an incidence relation between the data table node modules;
and generating the database interface according to the data table node module and the incidence relation.
2. The method for generating a database interface according to claim 1, further comprising:
and generating the data table node module.
3. The method for generating the database interface according to claim 2, wherein the generating the data table node module comprises:
creating an initialized data table node module;
and adding the attribute information of the data table nodes into the data table node module to generate the data table node module.
4. The method for generating the database interface according to claim 3, wherein the attribute information of the data table node comprises:
table information, field list, field decoration, query condition, packet field, sort field.
5. The method for generating the database interface according to claim 1, wherein the setting of the association relationship between the data table node modules comprises:
and setting the association relation between the data table node modules in a directional connection mode.
6. The method according to claim 5, wherein the setting of the association relationship between the data table node modules in a directed connection manner includes:
if the connection line points to a second data table node from a first data table node, determining the incidence relation between the first data table node and the second data table node as left incidence;
if the connection line points to a first data table node from a second data table node, determining the incidence relation between the first data table node and the second data table node as right incidence;
and if the connection line is a bidirectional direction between the first data table node and the second data table node, determining the incidence relation between the first data table node and the second data table node as internal incidence.
7. The method according to claim 1, wherein the generating the database interface according to the data table node module and the association relationship comprises:
generating a preset format sequence file according to the attributes of the data table nodes and the incidence relation;
generating a database statement according to the preset format sequence file;
and packaging the database statement into a database interface.
8. The method as claimed in claim 7, wherein the preset format comprises:
the method comprises the following steps of field information, table information, query conditions, grouping information, sequencing information, visual description information and database interface information.
9. An apparatus for generating a database interface, comprising:
the node module selection module is used for selecting all data table node modules required by generating the database interface;
the incidence relation setting module is used for setting the incidence relation between the data table node modules;
and the interface generation module generates the database interface according to the data table node module and the incidence relation.
10. The apparatus for generating a database interface according to claim 9, further comprising:
and the node module generating module is used for generating the data table node module.
11. The apparatus for generating a database interface according to claim 10, wherein the node module generating module comprises:
the module initialization unit is used for creating an initialized data table node module;
and the information adding unit is used for adding the attribute information of the data table nodes into the data table node module and generating the data table node module.
12. The apparatus for generating the database interface according to claim 9, wherein the interface generating module comprises:
the sequence file generating unit is used for generating a sequence file with a preset format according to the attributes of the data table nodes and the incidence relation;
the database statement generating unit generates database statements according to the preset format sequence file;
and the interface packaging unit is used for packaging the database statement into a database interface.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the database interface generation method of any one of claims 1 to 8 when executing the program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of generating a database interface according to any one of claims 1 to 8.
CN202111367194.5A 2021-11-18 2021-11-18 Database interface generation method and device Pending CN113987048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111367194.5A CN113987048A (en) 2021-11-18 2021-11-18 Database interface generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111367194.5A CN113987048A (en) 2021-11-18 2021-11-18 Database interface generation method and device

Publications (1)

Publication Number Publication Date
CN113987048A true CN113987048A (en) 2022-01-28

Family

ID=79749210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111367194.5A Pending CN113987048A (en) 2021-11-18 2021-11-18 Database interface generation method and device

Country Status (1)

Country Link
CN (1) CN113987048A (en)

Similar Documents

Publication Publication Date Title
CN103235685B (en) A kind of method and apparatus that terminal operating system desktop contents is set
US10860790B2 (en) Conversion of data ranges to table objects
CN104202473A (en) Conversion merging method and mobile terminal
CN108353256A (en) Method and system for emoticon and other graphical contents to be created and used in instant communicating system
CN107958365B (en) Material information changing method and device, storage medium and electronic equipment
CN105808057A (en) Method for selecting programs in folder, device and terminal
TWI505205B (en) Feedback system, feedback method and recording media thereof
CN109840201B (en) UI test method, device, electronic equipment and computer readable storage medium
CN105554290A (en) Wallpaper sharing method and device
CN101944017A (en) Method and device for producing Widget
CN105320662A (en) Method and device for webpage generation
CN103902294A (en) Browser image display method and terminal
CN109983488B (en) Automated display status of email items
CN106844467B (en) Data display method and device
CN108140173B (en) Classifying attachments parsed from a communication
CN113987048A (en) Database interface generation method and device
CN104572638A (en) Data reading and writing method and device
JP2023063313A (en) Method and computer program for generating menu model of character user interface
CN102722543B (en) Method for storing files
CN106648338A (en) Method and device for editing data
JP6780392B2 (en) Information processing equipment and information processing programs
CN106202343A (en) The big envelope acquisition methods of a kind of intelligent sound box and device
CN106993090B (en) Message processing method and electronic equipment
CN105302853A (en) Data reconstruction method and apparatus
CN104346413A (en) Method and system for presenting visual search results on mobile terminal

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