CN114595231A - Database table generation method and device, electronic equipment and storage medium - Google Patents

Database table generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114595231A
CN114595231A CN202210251313.9A CN202210251313A CN114595231A CN 114595231 A CN114595231 A CN 114595231A CN 202210251313 A CN202210251313 A CN 202210251313A CN 114595231 A CN114595231 A CN 114595231A
Authority
CN
China
Prior art keywords
model
database table
component
information
model design
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.)
Granted
Application number
CN202210251313.9A
Other languages
Chinese (zh)
Other versions
CN114595231B (en
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.)
Suzhou Fengzhiding Information Technology Co ltd
Original Assignee
Suzhou Fengzhiding Information Technology 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 Suzhou Fengzhiding Information Technology Co ltd filed Critical Suzhou Fengzhiding Information Technology Co ltd
Priority to CN202210251313.9A priority Critical patent/CN114595231B/en
Publication of CN114595231A publication Critical patent/CN114595231A/en
Application granted granted Critical
Publication of CN114595231B publication Critical patent/CN114595231B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • 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
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

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

Abstract

The invention discloses a database table generation method and device, electronic equipment and a storage medium. The method comprises the following steps: responding to a preset trigger operation, and displaying a model design interface; responding to the model selection operation of a user on the model design interface, and calling a preset model component; responding to information input operation of a user on the model design interface, and collecting model design information of each model assembly, wherein the model design information comprises model attributes and model relations; determining a database table based on the model attributes and the model relationships. According to the technical scheme, the preset model components are called in response to the model selection operation of the user on the model design interface, the database table is generated according to the model attributes and the model relations, the visual design of the database table is achieved, the method is simple, the professional requirement degree is low, and the generation efficiency of the database table can be improved.

Description

Database table generation method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of databases, in particular to a database table generation method and device, electronic equipment and a storage medium.
Background
In the process of project development, the database design of a business system needs to be performed through the steps of business model design, ER Diagram (Entity Relationship Diagram) design, table structure creation and the like.
At present, the inventor finds at least the following problems in the development process: according to the ER diagram Definition database table structure DDL (Data Definition Language), the conversion from the ER diagram to the DDL is required to be familiar, the requirement on the specialty is high, and the types of the databases in the market at present are many, and have respective DDL dialects, so that the learning cost and the workload of database designers are further increased, and the generation efficiency of the database table is low.
Disclosure of Invention
The invention provides a database table generation method, a database table generation device, electronic equipment and a storage medium, and aims to solve the problems of high learning cost and low generation efficiency of database table generation.
According to an aspect of the present invention, there is provided a database table generation method, including:
responding to a preset trigger operation, and displaying a model design interface;
responding to model selection operation of a user on the model design interface, and calling a preset model component;
responding to information input operation of a user on the model design interface, and collecting model design information of each model assembly, wherein the model design information comprises model attributes and model relations;
determining a database table based on the model attributes and the model relationships.
According to another aspect of the present invention, there is provided a database table generation apparatus including:
the interface display module is used for responding to preset trigger operation and displaying a model design interface;
the component calling module is used for calling a preset model component in response to the model selection operation of a user on the model design interface;
the information acquisition module is used for responding to information input operation of a user on the model design interface and acquiring model design information of each model component, wherein the model design information comprises model attributes and model relations;
and the database table module is used for determining a database table based on the model attribute and the model relation.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the database table generation method of any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the database table generation method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, a model design interface is displayed by responding to the preset trigger operation; responding to the model selection operation of a user on a model design interface, and calling a preset model component; responding to information input operation of a user on the model design interface, and collecting model design information of each model component, wherein the model design information comprises model attributes and model relations; a database table is determined based on the model attributes and the model relationships. According to the technical scheme, the visual design of the database table is realized by responding to the model selection operation of a user on the model design interface, calling the preset model components and generating the database table according to the model attributes and the model relations, the method is simple, the professional requirement degree is low, and the generation efficiency of the database table can be improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a database table generation method according to an embodiment of the present invention;
FIG. 2 is a screenshot of a model design interface according to an embodiment of the present invention;
FIG. 3 is a flowchart of a database table generation method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a database table generating apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing the database table generation method according to the embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a database table generation method according to an embodiment of the present invention, where the present embodiment is applicable to a case of visually creating a database, the method may be executed by a database table generation device, the database table generation device may be implemented in a form of hardware and/or software, and the database table generation device may be configured in a terminal and/or a server. As shown in fig. 1, the method includes:
and S110, responding to preset trigger operation, and displaying a model design interface.
The preset trigger operation may be an operation for triggering a display model design interface, such as a mouse click operation, a keyboard input operation, and the like. Illustratively, the terminal device displays a model design interface in a display screen of the terminal device in response to preset trigger operations such as clicking a virtual button with a mouse or pressing a physical button.
In this embodiment, the model design interface refers to an operation interface for designing a database through the design of model components, and is a visual operation interface. Wherein, the model component can be a component packaged with a generation database table, namely the model component comprises a database table component. Further, the model component can add or set model properties and model methods. Model attributes refer to attribute parameters of a model component, such as module component name, component type, and the like. The model method refers to a method parameter of the model component, such as a display method and the like.
Optionally, the model design interface includes a model component display area and a model design area, and the model component display area may display preset component information of a plurality of model components.
The component information refers to display information of the model component in the model design interface, the component information and the model component have a corresponding relation, namely, a user can call the model component corresponding to the component information by selecting the component information in the model component display area, and can drag the model component to the model design area and display the model component in the model design area.
For example, as shown in fig. 2, taking a model design interface of a plant database as an example, the model design interface may include a model component display area and a model design area, the model component display area may include a plurality of model information, such as a system built-in model, a base model, a supplier model, a procurement model, a planning model, and the like, the model design area may display a selected model component, and connections may be made between model components. In addition, the model design interface also has a model import/export function and a model searching function, and user experience is improved. The numerical numbers in fig. 2 are only used for illustrating the model information, the model components and the attribute parameters, and do not limit the number of the model information, the model components and the attribute parameters.
And S120, responding to the model selection operation of the user on the model design interface, and calling a preset model component.
The model selection operation may be generated by a user operating the terminal device and selecting component information of a corresponding model component on the model design interface. The terminal equipment can respond to model selection operation of a user on the model design interface, and call the preset model component according to the model selection operation, so that the model component can be quickly called.
On the basis of the above embodiment, the invoking a preset model component in response to a model selection operation of a user on the model design interface includes: and when the selection operation of any component information in the model component display area is detected, calling the model component corresponding to the component information, and displaying in the model design area.
Illustratively, a user can select component information located in the model component display area through a mouse, when the terminal detects selection operation of any component information in the model component display area, the model component corresponding to the component information is called, and the model component corresponding to the selected component information is dragged to the model design area, so that the model component is displayed in the model design area.
S130, responding to information input operation of a user on the model design interface, and collecting model design information of each model assembly, wherein the model design information comprises model attributes and model relations.
The information input operation may be an operation of inputting information by a user, and may include, but is not limited to, operations of selecting information by a mouse or inputting information by a keyboard, and the terminal device may respond to the information input operation of the user on the model design interface and collect model design information of each model component according to the information input operation. Model design information refers to design information associated with a model component and may include, but is not limited to, model attributes and model relationships. Model relationships refer to relationships between model components and model components. Specifically, by establishing a model relationship between model components, a model design drawing with an association can be obtained, i.e., the design of a database table architecture is realized.
On the basis of the above embodiment, the collecting model design information of each model component in response to an information input operation of a user on the model design interface, where the model design information includes model attributes and model relationships includes: under the condition that the parameter editing operation of the model component is detected, displaying an attribute setting interface of the model component, and acquiring model attribute parameters in the model component based on the attribute setting interface; and obtaining connecting lines arranged among the model components, and determining the model relation among the connected model components based on the connecting lines.
For example, a user may implement a parameter editing operation of a model component through a keyboard or a mouse, and when detecting the parameter editing operation of the model component, the terminal device displays an attribute setting interface of the model component, where the attribute setting interface may appear in the model design interface in a pop-up manner, and the attribute setting interface may be located at a right side, a left side, or a middle position of the model design interface, which is not limited herein. Further, the terminal device may obtain a model attribute parameter input by the user from the attribute setting interface; and the terminal device may obtain a connection line set between each model component, where the connection line may have a direction arrow, the model components connected on the side of the direction arrow are sub-model components, and the model components connected on the side opposite to the direction arrow are main model components. Further, the terminal device may determine a model relationship between the connected model components according to the connection line.
Optionally, the model relationship includes primary and secondary associations and inter-associations. Primary and secondary association refers to a one-to-one model component connection relationship, wherein one model component serves as a primary model component, and the other model component serves as a secondary model component. The inter-association refers to a one-to-many model component connection relationship, wherein one model component serves as a main model component, and the rest of a plurality of model components serve as auxiliary model components.
For example, if the connection line of the primary model component is used to connect to one secondary model component, that is, only one connection line is included, the relationship of the model components is primary-secondary association; if the connection lines of the primary model components are used to connect a plurality of secondary model components, i.e. comprise a plurality of connection lines, the relationship of the model components is interrelated.
And S140, determining a database table based on the model attributes and the model relations.
In the embodiment of the present invention, the database table may be generated by the terminal device according to the model attribute and the model relationship through automatic mapping.
On the basis of the above embodiment, the determining a database table based on the model attribute and the model relationship includes: generating an entity class based on the model attributes and the model relationships; and mapping the entity class according to a preset mapping relation to obtain a corresponding database table, wherein the preset mapping relation comprises the mapping relation between the entity class and the database table.
Where entity classes are conceptual data-intensive classes, the purpose of generating entity classes is to store data and provide access to such data. Entity classes are persistent, indicating that instance classes are persistent and need to be stored in a file or database. The preset mapping relationship may be a mapping relationship set according to a programming language, and may include a mapping relationship between one or more entity classes and a database table, for example, a mapping relationship corresponding to jap in java programming. Through the preset mapping relation, the entity class can be automatically mapped to obtain a corresponding database table.
The embodiment of the invention provides a database table generation method, which is characterized in that a model design interface is displayed by responding to preset trigger operation; responding to the model selection operation of a user on a model design interface, and calling a preset model component; responding to information input operation of a user on the model design interface, and collecting model design information of each model component, wherein the model design information comprises model attributes and model relations; a database table is determined based on the model attributes and the model relationships. According to the technical scheme, the preset model components are called in response to the model selection operation of the user on the model design interface, the database table is generated according to the model attributes and the model relations, the visual design of the database table is achieved, the method is simple, the professional requirement degree is low, and the generation efficiency of the database table can be improved.
Example two
Fig. 3 is a flowchart illustrating a database table generation method according to a second embodiment of the present invention, where the second embodiment of the present invention may be combined with various alternatives in the foregoing embodiments. In an embodiment of the present invention, optionally, after determining a database table based on the model attributes and the model relationships, the method further includes: judging whether the database table exists in a history database table, and if the database table exists in the history database table, updating the parameters of the corresponding database table in the history database table based on the database table; and if the database table does not exist in the historical database table, storing the database table into the historical database table.
As shown in fig. 3, the method of the embodiment of the present invention specifically includes the following steps:
and S210, responding to preset trigger operation, and displaying a model design interface.
And S220, responding to the model selection operation of the user on the model design interface, and calling a preset model component.
And S230, responding to information input operation of a user on the model design interface, and collecting model design information of each model assembly, wherein the model design information comprises model attributes and model relations.
S240, determining a database table based on the model attributes and the model relations.
S250, judging whether the database table exists in a history database table or not, and if the database table exists in the history database table, updating the parameters of the corresponding database table in the history database table based on the database table; and if the database table does not exist in the historical database table, storing the database table into the historical database table.
The historical database table refers to a database table generated in the past database design process, if the currently generated database table exists in the historical database table, the currently generated database table is shown to exist in the historical database table, a new database table does not need to be established, and only parameters in the generated database table need to be compared with the historical database table to update the parameters of the database table. And if the history database table does not have the currently generated database table, indicating that the currently generated database table does not exist in the history database table, and storing the currently generated database table into the history database table. By the scheme, the storage space of the database can be effectively saved.
On the basis of the above embodiment, the method further includes: monitoring the model attributes and/or model relationships; and if the model attribute and/or the model relation are changed, modifying the database table based on the change information.
For example, the terminal may monitor a change of the model design drawing, that is, monitor a change of the model attribute and/or the model relationship, and if it is detected that the model attribute and/or the model relationship change, modify the database table according to change information corresponding to the model attribute and/or the model relationship. The fields corresponding to the comparison model attributes and/or model relationships can be queried, and if the fields are different, the model attributes and/or model relationships are changed.
The embodiment of the invention provides a database table generation method, which comprises the steps of judging whether a database table exists in a historical database table or not, and if the database table exists in the historical database table, updating parameters of the corresponding database table in the historical database table based on the database table; and if the historical database table does not exist, storing the database table into the historical database table. By the scheme, the storage space of the database can be effectively saved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a database table generating device according to a third embodiment of the present invention, where the database table generating device provided in this embodiment may be implemented by software and/or hardware, and may be configured in a terminal and/or a server to implement the database table generating method according to the third embodiment of the present invention. The device may specifically include: an interface display module 310, a component invocation module 320, an information collection module 330, and a database table module 340.
The interface display module 310 is configured to respond to a preset trigger operation and display a model design interface; the component calling module 320 is used for calling preset model components in response to model selection operation of a user on the model design interface; the information acquisition module 330 is configured to acquire model design information of each model component in response to an information input operation of a user on the model design interface, where the model design information includes model attributes and model relationships; a database table module 340 for determining a database table based on the model attributes and the model relationships.
On the basis of any optional technical scheme in the embodiment of the present invention, optionally, the model design interface includes a model component display area and a model design area, and the model component display area displays preset component information of a plurality of model components;
the component invocation module 320 may also be used to:
and when the selection operation of any component information in the model component display area is detected, calling the model component corresponding to the component information, and displaying in the model design area.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the information acquisition module 330 may be further configured to:
under the condition that the parameter editing operation of the model component is detected, displaying an attribute setting interface of the model component, and acquiring model attribute parameters in the model component based on the attribute setting interface;
and obtaining connecting lines arranged among the model components, and determining the model relation among the connected model components based on the connecting lines.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the model component includes a database table component, and the model relationship includes primary and secondary associations and a mutual association.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the database table module 340 is further configured to:
generating an entity class based on the model attributes and the model relationships;
and mapping the entity class according to a preset mapping relation to obtain a corresponding database table, wherein the preset mapping relation comprises the mapping relation between the entity class and the database table.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the apparatus is further configured to:
judging whether the database table exists in a history database table, and if the database table exists in the history database table, updating the parameters of the corresponding database table in the history database table based on the database table; and if the database table does not exist in the historical database table, storing the database table into the historical database table.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, in a case that at least one of the model attribute and the model relationship is changed, the apparatus is further configured to:
monitoring the model attributes and/or model relationships;
and if the model attribute and/or the model relation are changed, modifying the database table based on the change information.
The database table generation device provided by the embodiment of the invention can execute the database table generation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
FIG. 5 illustrates a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the database table generation method.
In some embodiments, the database table generation method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the database table generation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the database table generation method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with 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 generating database tables, comprising:
responding to a preset trigger operation, and displaying a model design interface;
responding to the model selection operation of a user on the model design interface, and calling a preset model component;
responding to information input operation of a user on the model design interface, and collecting model design information of each model assembly, wherein the model design information comprises model attributes and model relations;
determining a database table based on the model attributes and the model relationships.
2. The method according to claim 1, wherein the model design interface comprises a model component display area and a model design area, and the model component display area displays preset component information of a plurality of model components;
responding to the model selection operation of the user on the model design interface, and calling preset model components, wherein the model components comprise:
and when the selection operation of any component information in the model component display area is detected, calling the model component corresponding to the component information, and displaying in the model design area.
3. The method of claim 1, wherein collecting model design information for each of the model components in response to a user input operation on the model design interface, wherein the model design information includes model attributes and model relationships, comprises:
under the condition that the parameter editing operation of the model component is detected, displaying an attribute setting interface of the model component, and acquiring model attribute parameters in the model component based on the attribute setting interface;
and obtaining connecting lines arranged among the model components, and determining the model relation among the connected model components based on the connecting lines.
4. The method of claim 1, wherein the model component comprises a database table component and the model relationships comprise primary and secondary associations and cross-associations.
5. The method of claim 1, wherein determining a database table based on the model attributes and the model relationships comprises:
generating an entity class based on the model attributes and the model relationships;
and mapping the entity class according to a preset mapping relation to obtain a corresponding database table, wherein the preset mapping relation comprises the mapping relation between the entity class and the database table.
6. The method of claim 1, wherein after determining a database table based on the model attributes and the model relationships, the method further comprises:
judging whether the database table exists in a history database table, and if the database table exists in the history database table, updating the parameters of the corresponding database table in the history database table based on the database table; and if the database table does not exist in the historical database table, storing the database table into the historical database table.
7. The method according to any one of claims 1-6, further comprising:
monitoring the model attributes and/or model relationships;
and if the model attribute and/or the model relation are changed, modifying the database table based on the change information.
8. An apparatus for generating database tables, comprising:
the interface display module is used for responding to preset trigger operation and displaying a model design interface;
the component calling module is used for calling a preset model component in response to the model selection operation of a user on the model design interface;
the information acquisition module is used for responding to information input operation of a user on the model design interface and acquiring model design information of each model component, wherein the model design information comprises model attributes and model relations;
and the database table module is used for determining a database table based on the model attribute and the model relation.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the database table generation method of any of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform the database table generation method of any one of claims 1-7 when executed.
CN202210251313.9A 2022-03-15 2022-03-15 Database table generation method and device, electronic equipment and storage medium Active CN114595231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210251313.9A CN114595231B (en) 2022-03-15 2022-03-15 Database table generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210251313.9A CN114595231B (en) 2022-03-15 2022-03-15 Database table generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114595231A true CN114595231A (en) 2022-06-07
CN114595231B CN114595231B (en) 2024-02-27

Family

ID=81817624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210251313.9A Active CN114595231B (en) 2022-03-15 2022-03-15 Database table generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114595231B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030055837A1 (en) * 2001-06-26 2003-03-20 Brobst Stephen A. Visual-modeling technique for use in implementing a database system
US20060074942A1 (en) * 2004-10-05 2006-04-06 Shaburov Victor V Visual database modeling
CN102999600A (en) * 2012-11-20 2013-03-27 中兴通讯股份有限公司 Method and system for automatically generating embedded database
CN107609181A (en) * 2017-09-29 2018-01-19 北京酷我科技有限公司 A kind of update data of database optimized algorithm
CN107807954A (en) * 2017-09-28 2018-03-16 广东亿迅科技有限公司 Visual modeling dimensional analytic system and its method
CN109684300A (en) * 2018-11-20 2019-04-26 成都四方伟业软件股份有限公司 One kind being based on visual big data warehouse design method and system
CN111427865A (en) * 2020-03-18 2020-07-17 北京明略软件系统有限公司 Method and device for managing objects of database

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030055837A1 (en) * 2001-06-26 2003-03-20 Brobst Stephen A. Visual-modeling technique for use in implementing a database system
US20060074942A1 (en) * 2004-10-05 2006-04-06 Shaburov Victor V Visual database modeling
CN102999600A (en) * 2012-11-20 2013-03-27 中兴通讯股份有限公司 Method and system for automatically generating embedded database
CN107807954A (en) * 2017-09-28 2018-03-16 广东亿迅科技有限公司 Visual modeling dimensional analytic system and its method
CN107609181A (en) * 2017-09-29 2018-01-19 北京酷我科技有限公司 A kind of update data of database optimized algorithm
CN109684300A (en) * 2018-11-20 2019-04-26 成都四方伟业软件股份有限公司 One kind being based on visual big data warehouse design method and system
CN111427865A (en) * 2020-03-18 2020-07-17 北京明略软件系统有限公司 Method and device for managing objects of database

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
H.PAUL ZELLWEGER: "The branching data model the foundation for automated tree visualization", 《2018 22ND INTERNATIONAL CONFERENCE INFORMATION VISUALIZATION》, 6 December 2018 (2018-12-06), pages 1 - 2 *
阳林 等: "一种可视化代码生成器的研究及应用", 《科研信息化技术与应用》, vol. 7, no. 2, 20 March 2016 (2016-03-20), pages 66 - 70 *
香甜的甲基橙: "使用StarUML绘制ER图,使用插件DDL将ER图转换成SQL脚本,使用插件Java生成Java代码", pages 1 - 20, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_51249285/article/details/123123095> *

Also Published As

Publication number Publication date
CN114595231B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
CN114021156A (en) Method, device and equipment for organizing vulnerability automatic aggregation and storage medium
CN114816578A (en) Method, device and equipment for generating program configuration file based on configuration table
CN116955856A (en) Information display method, device, electronic equipment and storage medium
CN115905322A (en) Service processing method and device, electronic equipment and storage medium
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN114595231B (en) Database table generation method and device, electronic equipment and storage medium
CN115329150A (en) Method and device for generating search condition tree, electronic equipment and storage medium
CN115408546A (en) Time sequence data management method, device, equipment and storage medium
CN114860346A (en) Management method of modeling task and operation method of modeling task
CN115455091A (en) Data generation method and device, electronic equipment and storage medium
CN114896418A (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN115168358A (en) Database access method and device, electronic equipment and storage medium
CN114706610A (en) Business flow chart generation method, device, equipment and storage medium
EP3832985A1 (en) Method and apparatus for processing local hot spot, electronic device and storage medium
CN113079046A (en) Data access method and device, electronic equipment and medium
CN112527537B (en) Quality monitoring method, device, equipment and medium of online service system
CN115329999A (en) Operation and maintenance task processing method, device, platform and storage medium
CN113986112B (en) Soft keyboard display method, related device and computer program product
CN117827840A (en) Index creation method and device, electronic equipment and storage medium
CN117709902A (en) Material input method, device, equipment and medium based on BOM file
CN116126296A (en) Control method and device based on multiple associated date selectors and electronic equipment
CN114706578A (en) Data processing method, device, equipment and medium
CN117608734A (en) Page generation method, device, equipment and storage medium
CN115828572A (en) Production system data processing method, device, equipment and storage medium
CN115510838A (en) Template generation method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant