CN104572125A - Methods and devices for drawing and storing entity relation diagrams - Google Patents

Methods and devices for drawing and storing entity relation diagrams Download PDF

Info

Publication number
CN104572125A
CN104572125A CN201510043473.4A CN201510043473A CN104572125A CN 104572125 A CN104572125 A CN 104572125A CN 201510043473 A CN201510043473 A CN 201510043473A CN 104572125 A CN104572125 A CN 104572125A
Authority
CN
China
Prior art keywords
model
business
business object
entity
solid
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
CN201510043473.4A
Other languages
Chinese (zh)
Other versions
CN104572125B (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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN201510043473.4A priority Critical patent/CN104572125B/en
Publication of CN104572125A publication Critical patent/CN104572125A/en
Application granted granted Critical
Publication of CN104572125B publication Critical patent/CN104572125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method for drawing entity relation diagrams. The method includes extracting item identification in drawing instructions when the drawing instructions are received; acquiring a plurality of entity models in preliminarily created model bases by the aid of the item identification; extracting entity relations from preliminarily created relation bases; generating and displaying entity diagrams of the entity models; determining start entity diagrams and termination entity diagrams in the entity diagrams by the aid of the entity relations; generating and displaying connection lines between the start entity diagrams and the termination entity diagrams so as to completely draw the entity relation diagrams. Compared with the prior art, the method has the advantage that a drawing mode of the method is favorable for modifying the entity relation diagrams. The invention further provides a method for storing the entity relation diagrams, a device for drawing the entity relation diagrams and a device for storing the entity relation diagrams. The method for storing the entity relation diagrams is used for generating model tables in the model bases and relation tables in the relation bases.

Description

The method for drafting of entity relationship diagram, storage means, drawing apparatus and memory storage
Technical field
The application relates to the rendering technique field of entity relationship diagram, especially the method for drafting of entity relationship diagram, storage means, drawing apparatus and memory storage.
Background technology
Entity relationship diagram, is used to the data model of described project, comprises entity, entity attribute and inter-entity relation, usually, uses rectangle presentation-entity, uses ellipse representation entity attribute, uses line to be connected by associated entity.Existing drafting mode is, software for drawing the provides graphic element such as " square frame ", " arrow ", manually the relation of the entity comprised in certain project, attribute and inter-entity is drawn out.When preserving, store whole entity relationship diagram with document form.During relation amendment if desired to the entity attribute in entity relationship diagram or inter-entity, need manually again to draw in mapping software, this kind of drafting mode revises inconvenience.
Summary of the invention
In view of this, the invention provides the method for drafting of entity relationship diagram, storage means, drawing apparatus and memory storage, in order to solve the technical matters of drafting mode of the prior art inconvenience amendment.For realizing described object, technical scheme provided by the invention is as follows:
A method for drafting for entity relationship diagram, comprising:
When receiving drafting instruction, extract the project label in described drafting instruction;
In the model bank be pre-created, obtain the multiple solid models corresponding with described project label; Wherein, described solid model comprises entity attribute;
In the relation storehouse be pre-created, obtain the entity relationship corresponding with described project label;
Generate each described solid model solid pattern separately, and show solid pattern described in each;
According to described entity relationship, in described multiple solid pattern, determine starting point solid pattern and terminal solid pattern;
Generate the connecting line between described starting point solid pattern and described terminal solid pattern, and show described connecting line.
Alternatively, above-mentioned method for drafting also comprises:
In described model bank, obtain the business object model corresponding with described project label, and generate the business object figure of described business object model;
Determine the target entity model that described business object model comprises, show described business object figure in the mode of the solid pattern of nested described target entity model.
Alternatively, above-mentioned method for drafting also comprises:
In described model bank, obtain the business module model corresponding with described project label, and generate the business module figure of described business module model;
Determine the target service object model that described business module model comprises, show described business module figure in the mode of the business object figure of nested described target service object model.
Alternatively, when the business object figure generated is multiple, described method for drafting also comprises:
When receiving object relationship and checking instruction, determine to check with described the first business object figure that instruction is corresponding, and the solid pattern that hiding described first business object figure is nested with;
In described relation storehouse, obtain the object relationship that described first business object figure is corresponding;
When business object figure after the starting point business object model of described object relationship or the second business object figure corresponding to terminal business object model are hidden entity figure, generate the connecting line between described first business object figure and described second business object figure, and show described connecting line.
Alternatively, when the business module figure generated is multiple, described method for drafting also comprises:
When receiving module relationship and checking instruction, determine to check with described the first business module figure that instruction is corresponding, and hide the solid pattern that the business object figure that is nested with of described first business module figure and this business object image be nested with;
In described relation storehouse, obtain the module relationship that described first business module figure is corresponding;
When the starting point business module model of described module relationship or the second business module figure corresponding to terminal business module model are the business module figure of hiding business object figure and solid pattern, generate the connecting line between described first business module figure and described second business module figure, and show described connecting line.
Present invention also provides a kind of storage means of entity relationship diagram, comprising:
Obtain the attribute of solid model, by the property store of described solid model in solid model table, obtain the attribute of business object model, by the property store of described business object in business object model table, and obtain the attribute of business module model, by the property store of described business module in business module model table; Wherein, the attribute of described business module model is the business object model comprised, and the attribute of described business object model is the solid model comprised;
In the entity relationship diagram drawn, obtain starting point solid model, terminal solid model, starting point business object model, terminal business object model, starting point business module model and terminal business module model that connecting line is corresponding, and be stored in relation table.
Alternatively, above-mentioned storage means, also comprises:
When receiving the modify instruction to described model bank, extract the amendment table mark in described modify instruction, the front attribute of amendment and the rear attribute of amendment;
Determine the amendment model table that described amendment table mark is corresponding, and in described amendment model table, attribute before described amendment is replaced with attribute after described amendment; Wherein, described amendment model table is solid model table, business object model table or business module model table.
Alternatively, above-mentioned storage means, also comprises:
When receiving the modify instruction to described relation storehouse, extract the amendment table mark in described modify instruction, the front relation of amendment and the rear relation of amendment;
Determine the amendment relation table that described amendment table mark is corresponding, and in described amendment relation table, relation before described amendment is replaced with relation after described amendment.
Present invention also provides a kind of drawing apparatus of entity relationship diagram, comprising:
Project label extraction unit, for when receiving drafting instruction, extracts the project label in described drafting instruction;
Solid model acquiring unit, in the model bank be pre-created, obtains the multiple solid models corresponding with described project label; Wherein, described solid model comprises entity attribute;
Entity relationship acquiring unit, in the relation storehouse be pre-created, obtains the entity relationship corresponding with described project label;
Solid pattern display unit, for generating each described solid model solid pattern separately, and shows solid pattern described in each;
Starting and terminal point determining unit, for according to described entity relationship, determines starting point solid pattern and terminal solid pattern in described multiple solid pattern;
Connecting line display unit, for generating the connecting line between described starting point solid pattern and described terminal solid pattern, and shows described connecting line.
Present invention also provides a kind of memory storage of entity relationship diagram, comprising:
Model table storage unit, for obtaining the attribute of solid model, by the property store of described solid model in solid model table, obtain the attribute of business object model, by the property store of described business object in business object model table, and obtain the attribute of business module model, by the property store of described business module in business module model table; Wherein, the attribute of described business module model is the business object model comprised, and the attribute of described business object model is the solid model comprised;
Relation table storage unit, for in the entity relationship diagram drawn, obtain starting point solid model, terminal solid model, starting point business object model, terminal business object model, starting point business module model and terminal business module model that connecting line is corresponding, and be stored in relation table.
As known from the above, the present invention has following beneficial effect:
In the method for drafting of entity relationship diagram provided by the invention, when receiving drafting instruction, extract project label wherein, utilize this project label in the model bank be pre-created, obtain multiple solid model, and entity relationship is extracted in the relation storehouse be pre-created, generate and the solid pattern of display entity model, utilize entity relationship, initial solid pattern and terminal solid pattern is determined in solid pattern, and then generate and show the connecting line between starting point solid pattern and terminal solid pattern, thus complete the drafting of entity relationship diagram.Compared with prior art, this kind of drafting mode is more conducive to the amendment of entity relationship diagram.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to the accompanying drawing provided.
The process flow diagram of the method for drafting of the entity relationship diagram that Fig. 1 provides for the embodiment of the present invention;
Fig. 2 is project structure exemplary plot provided by the invention;
Fig. 3 is the sterogram of solid model table provided by the invention;
Fig. 4 is an exemplary plot of entity relationship diagram provided by the invention;
The partial process view of the method for drafting of the entity relationship diagram that Fig. 5 provides for another embodiment of the present invention;
Fig. 6 is another exemplary plot of entity relationship diagram provided by the invention;
The structural drawing of the drawing apparatus of the entity relationship diagram that Fig. 7 provides for the embodiment of the present invention;
The structural drawing of the memory storage of the entity relationship diagram that Fig. 8 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The entity relationship method for drafting that the embodiment of the present invention provides can think an application software, and this application program is arranged on electronic equipment, as in desk-top computer, then and this electronic equipment drafting of utilizing this application program can realize entity relationship.See Fig. 1, it illustrates the flow process of the entity relationship drawing drawing method that the embodiment of the present invention provides, specifically comprise the following steps:
Step S101: when receiving drafting instruction, extract the project label in described drafting instruction.
Wherein, user can choose or manually input the project label of certain project, after electronic equipment receives this project label, this project label can be included in the execution module drawn and be sent to the present embodiment in instruction, and then trigger the present embodiment extraction project label wherein.It should be noted that, the solid model corresponding with this project label is stored in advance in model bank, and the entity relationship corresponding with this project label has been stored in advance in relation storehouse.
Step S102: in the model bank be pre-created, obtains the multiple solid models corresponding with described project label; Wherein, described solid model comprises entity attribute.
In the present embodiment, include the solid model of some projects in the model bank be pre-created, this model bank can be called data model systems again.Search in this model bank and the solid model that in extraction step S101, project label is corresponding.It should be noted that, comprise entity attribute in solid model, entity attribute can represent by field, and that is, solid model can represent by the field that it comprises.In project structure as shown in Figure 2, project label is BoEing DataModel, and such as, the entity that this project comprises has AR_PAY_CTRL_HIST, AR_PAY_CTRL_INFO and AR_PAY_CTRL_PLG, see Fig. 3, it illustrates each attribute that entity A R_PAY_CTRL_HIST comprises.
Step S103: in the relation storehouse be pre-created, obtains the entity relationship corresponding with described project label.
In the present embodiment, the relation between the solid model including some projects in the relation storehouse be pre-created, i.e. entity relationship.Search in this relation storehouse and the entity relationship that in extraction step S101, project label is corresponding.It should be noted that, entity relationship is the relation between two entities, and this relation has direction, and therefore, entity relationship comprises starting point solid model and terminal solid model.
Step S104: generate each described solid model solid pattern separately, and show solid pattern described in each.
Wherein, for each solid model extracted all generates respective solid pattern, this solid pattern comprises the entity attribute of solid model.The pattern of solid pattern can be comprise form in square box, and each bar in form is the entity attribute of solid model, certainly, graphic style can be in prior art any one, the present invention does not limit.It should be noted that, attractive in appearance in order to show, the attribute display number of acquiescence can be set, when certain entity attributes is more, only the attribute of default amount is preset in display, when user needs to watch remaining attribute, follow-up display (or display all) button can be clicked, and then show the attribute of all the other (or whole).
In the entity relationship diagram of electronic game project as shown in Figure 4, solid model comprises Client (client) 111, GameConfig (game configuration) 112, GameSoftware (Games Software) 121, PersonalComputer (personal computer) 122, Manufacturer (gaming manufacturer) 211, Distributor (business is disposed in game) 212 and NetWorks (network provider) 213.Illustrate with Client, the attribute comprised in this solid model has ID, Name, Address and Phone, certainly, if when user clicks follow-up display (the downward triangle icon on the right side of Client), other attribute of Client entity can be shown.
Step S105: according to described entity relationship, determines starting point solid pattern and terminal solid pattern in described multiple solid pattern.
Wherein, in entity relationship, include starting point solid model and terminal solid model, utilize this starting point solid model to determine starting point solid pattern, and utilize this terminal solid model to determine terminal solid pattern.Particularly, entity relationship is stored in tables of data, is searching in entity relationship, searches starting point entity and terminal entity, records one of starting point entity and terminal entity composition as an entity relationship.
Such as, the entity relationship of the electronic game project shown in Fig. 4 is as shown in table 1, comprises seven records in this table, illustrates in this project and comprises seven entity relationships.Wherein, illustrate with Article 1 record, starting point solid model (i.e. starting point entity) in this relation is Client, terminal solid model (i.e. terminal entity) is GameConfig, see Fig. 4, the solid pattern of solid model Client is figure 111, the solid pattern of solid model GameConfig is figure 112, then figure 111 is starting point solid pattern, and figure 112 is terminal solid pattern.
Table 1
Step S106: generate the connecting line between described starting point solid pattern and described terminal solid pattern, and show described connecting line.
Wherein, use connecting line to couple together starting point solid pattern and terminal solid pattern, thus complete the drafting of entity relationship diagram.It should be noted that, entity relationship has directivity, and connecting line can use arrow to represent direction, and namely the figure of arrow indication is relation terminal, and the other end of connecting line is relation starting point.See Fig. 4, comprise seven connecting lines (in order to point out, irising out with thick lines), seven relations stored in corresponding table 1 respectively.
From above technical scheme, in the method for drafting of the entity relationship diagram that the present embodiment provides, when receiving drafting instruction, extract project label wherein, utilize this project label in the model bank be pre-created, obtain multiple solid model, and entity relationship is extracted in the relation storehouse be pre-created, generate and the solid pattern of display entity model, utilize entity relationship, initial solid pattern and terminal solid pattern is determined in solid pattern, and then generate and show the connecting line between starting point solid pattern and terminal solid pattern, thus complete the drafting of entity relationship diagram.Compared with prior art, this kind of drafting mode is more conducive to the amendment of entity relationship diagram.
Specifically, in prior art when needing to modify to the solid model in entity relationship diagram or entity relationship, can not modify in original file, must manually repaint new figure, alter mode is loaded down with trivial details.But, the special storage entity model of the model bank that the present embodiment is pre-created, and the special storage entity relation in the relation storehouse be pre-created, when needs are modified to solid model or entity relationship, modify in respective database, after amendment completes, user only need resend drafting instruction, and then the present embodiment can utilize amended data to draw new figure, does not need user again manually to draw, revises more convenient.
It should be noted that, the step S103 in above-described embodiment not limits and performs after step s 102, can perform before it or with it simultaneously.
The entity relationship that above-described embodiment is drawn comprise solid model and between relation, but in reality, the usual more complicated of project, in order to clearly represent the service logic relation of project, uses the higher level such as business object and business module concept.Wherein, business module comprises business object, business object comprises entity, as shown in Figure 2, the business module such as product factory, deposit management is included in project BoEing DataModel, deposit supervisory packet contains the business objects such as AR_PAY_CTRL_INFO, AR_SEM_INFO, and AR_PAY_CTRL_INFO includes entity A R_PAY_CTRL_HIST, AR_PAY_CTRL_INFO and AR_PAY_CTRL_PLG.
And for example, as shown in Figure 4, business module in this figure has User (user side) 1, GameService (game provider) 2, further, the business object that User comprises has UserClientConfig (client configuration) 11 and UserClientPc (client rs PC information) 12, the business object that GameService comprises has GameServiceProvider (game service provider) 21, further, the entity that UserClientConfig comprises has Client (client) 111 and GameConfig (game configuration) 112, the entity that UserClientPc comprises has GameSoftware (Games Software) 121 and PersonalComputer (personal computer) 122, the entity that GameServiceProvider comprises has Manufacturer (gaming manufacturer) 211, Distributor (business is disposed in game) 212 and NetWorks (network provider) 213.
In order to the business object in displaying project, as shown in Figure 5, above-described embodiment can also comprise the following steps:
Step S107: in described model bank, obtains the business object model corresponding with described project label, and generates the business object figure of described business object model.
Step S108: determine the target entity model that described business object model comprises, shows described business object figure in the mode of the solid pattern of nested described target entity model.
Particularly, business object model specifically refers to the entity that business object comprises, and the mode of model bank storage service object model can be the title storing each entity that this business object comprises in tables of data.After extracting project label, the business object utilizing project label to find it to comprise, for the business object of searching generates respective business object figure.The entity (being referred to as target entity model) that this business object comprises is found in the tables of data of business object, and then when showing business object figure, be nested in the business object figure of generation by the entity graph of a correspondence comprised, this kind of nested display mode more clearly can show the service logic of project.
See Fig. 4, illustrate with business object UserClientConfig111, the figure of Client and the graphical boxes of GameConfig get up by the square box of this business object, thus represent that the entity that business object UserClientConfig comprises is Client and GameConfig.Alternatively, business object figure is square box, and the solid pattern comprised is nested in square box, and certainly, can also be any one display form of the prior art, the present invention limit.
Further, in order to the business module in displaying project, as shown in Figure 5, above-described embodiment can also comprise the following steps:
Step S109: in described model bank, obtains the business module model corresponding with described project label, and generates the business module figure of described business module model.
Step S110: determine the target service object model that described business module model comprises, shows described business module figure in the mode of the business object figure of nested described target service object model.
The explanation of relevant service module see the explanation of above-mentioned relevant service object, can not repeat.In like manner, the mode of the nested display of business module can more clearly show project service logic.
Comprise business object in project, further, can also business module be comprised.The present invention, except checking the relation between solid model, can also to provide between business object and the checking of relation between business module.Specifically, business module comprises business object, business object comprises entity, relation is there is between entity, then can think also there is relation (being called as object relationship) between the business object that entity belongs to, and then also there is relation (being called as module relationship) between the business module of business object ownership.It should be noted that, related two entities of tool may belong to same business object, pass then between business object is self and self relation, certainly, above-mentioned entity also may belong to different business object, then can check the relation between different business object, and the better effect of the present embodiment is to check this type of object relationship, in addition, the explanation of business module in like manner business object.
In relation storehouse except storage entity relation, all right storage object relation and module relationship, as shown in table 1, starting point business object and terminal business object can form object relationship, and starting point business module and terminal business module can comprising modules relations.
One, the view procedure of object relationship is:
When receiving object relationship and checking instruction, determine to check with described the first business object figure that instruction is corresponding, and the solid pattern that hiding described first business object figure is nested with; In described relation storehouse, obtain the object relationship that described first business object figure is corresponding; When business object figure after the starting point business object model of described object relationship or the second business object figure corresponding to terminal business object model are hidden entity figure, generate the connecting line between described first business object figure and described second business object figure, and show described connecting line.
Particularly, when user needs the relation in the project of checking between business object, can click in display interface the corresponding button (as square box A in Fig. 4 the triangle button of indicating), trigger formation object relation and check instruction, the mark of the business object that needs are checked is comprised in instruction, therefore, user is the object relationship of which business object for what check to utilize this instruction to determine.For convenience of description, this business object is called the first business object.Obtain the object relationship of this first business object, and in display interface, use connecting line to represent this object relationship, thus realize checking object relationship.In addition, in order to make more cheer and bright the relation shown between business object, the solid pattern that business object figure is nested with can be hidden, like this, user can view object relationship intuitively.
It should be noted that, the object relationship that the first business object figure is corresponding refers to the relation of the figured business object of the first business object as starting point and the relation as terminal.Such as, see Fig. 4, what user clicked is the triangle button of UserClientPc, the object relationship then found in Table 1 has three, be respectively: the relation that starting point business object (i.e. starting point business object model) is UserClientPc, terminal business object (i.e. terminal business object model) is UserClientConfig, starting point business object is UserClientPc, terminal business object is the relation of UserClientPc, and starting point business object is UserClientPc, terminal business object is the relation of GameServiceProvider.
In addition, if when to there is starting point business object model and terminal business object model be the object relationship of same business object model, demand can be checked according to actual, display or do not show the connecting line of this object relationship.
Existing composition graphs 4 and Fig. 6 are described the above-mentioned mode of checking.Such as, see Fig. 4, if what user clicked is the triangle button in UserClientPc, the solid pattern GameSoftware that this business object figure hiding is nested with and solid pattern PersonalComputer, see Fig. 6, figure after UserClientPc hides is the figure of square box 120 frame choosing, as mentioned above, the object relationship found has three, in these three object relationships, as shown in Figure 6, if the business object figure 210 using GameServiceProvider as terminal business object model is the business object figure of hidden entity figure, the solid pattern hidden is illustrated in figure 4 Manufacture, Distributor and NetWorks, then generate the connecting line between UserClientPc and GameServiceProvider and show.
In this embodiment, if in each object relationship of the first business object figure, when there is the object relationship of starting point business object model or the second business object figure corresponding to terminal business object model not hidden entity figure, then the connecting line of this object relationship can connect the solid pattern in this first business object figure and this second object business figure.As shown in Figure 6, the non-hidden entity figure of business object figure 11 of UserClientConfig, then generate and what show is connecting line between the business object figure 120 of UserClientPc and the business object figure 112 of GameConfig.
Its two, the view procedure of module relationship is:
When receiving module relationship and checking instruction, determine to check with described the first business module figure that instruction is corresponding, and hide the solid pattern that the business object figure that is nested with of described first business module figure and this business object image be nested with; In described relation storehouse, obtain the module relationship that described first business module figure is corresponding; When the starting point business module model of described module relationship or the second business module figure corresponding to terminal business module model are the business module figure of hiding business object figure and solid pattern, generate the connecting line between described first business module figure and described second business module figure, and show described connecting line.
The explanation of pertinent modules relation see the explanation of above-mentioned related objects relation, can not repeat herein.
As known from the above, what the embodiment of the present invention provided checks scheme to object relationship and module relationship, based on the Bedding storage mode of data model, business object and business module is classified as according to service logic by all solid models, thus piecemeal can be carried out to business object and business module, by the business object grouping under the entity under identical services object and identical services module, final generation has the entity relationship diagram of hierarchical structure, meets drafting (or check) demand of user to different levels relation.
Corresponding above-mentioned method for drafting, present invention also offers a kind of storage means of entity relationship diagram, more particularly, namely storage entity graph of a relation stores data respectively in model bank and relation storehouse, and this storage means comprises:
Obtain the attribute of solid model, by the property store of described solid model in solid model table, obtain the attribute of business object model, by the property store of described business object in business object model table, and obtain the attribute of business module model, by the property store of described business module in business module model table; Wherein, the attribute of described business module model is the business object model comprised, and the attribute of described business object model is the solid model comprised.In the entity relationship diagram drawn, obtain starting point solid model, terminal solid model, starting point business object model, terminal business object model, starting point business module model and terminal business module model that connecting line is corresponding, and be stored in relation table.
Particularly, get the project model that the attribute of the attribute of solid model, the attribute of business object model and business module model can build from user.This project model can be that user utilizes data model Core Generator to build, project model as shown in Figure 2.The attribute of solid model as field store in the tables of data (solid model table) of solid model, the attribute of business object model can think the business object model that this business object model comprises, more specifically, for the mark of business object model, identify as field store in the tables of data (business object model table) of business object model, the in like manner attribute of known business module model and business module model table, thus construct model bank.
It should be noted that, more than can think the first structure to solid model table, business object model table and business module model table.After first structure, user can utilize each table to carry out the drafting of entity relationship diagram, and when drawing for the first time, user oneself can draw entity relationship according to the field in entity list, thus generates the first entity relationship diagram drawn.According to this entity relationship diagram, can production Methods table.Particularly, in this entity relationship diagram, determine starting point solid model that every bar connecting line comprises, terminal solid model, starting point business object model, terminal business object model, starting point business module model and terminal business module model, thus the relation table generated as table 1, thus construct relation storehouse.
As known from the above, entity relationship diagram separately stores by the present invention, and namely storage entity model, business object model and business module model in model bank, store various relation in relation storehouse, thus make the amendment of entity relationship diagram convenient.Specifically, by file storage entity graph of a relation in prior art, as Microsoft visio and SyBase ProweDesigner is stored by the file of corresponding format.If the entity in entity relationship diagram or be related to that either party changes, the complete entity graph of a relation of new edition all manually must be repainted.In this programme, if entity or relation change, only need revise corresponding database, method for drafting according to amended data, can complete the drafting of new entity relationship diagram automatically, and amendment is got up convenient.
If desired the model data in model bank is modified, can perform by the following method, that is:
When receiving the modify instruction to described model bank, extract the amendment table mark in described modify instruction, the front attribute of amendment and the rear attribute of amendment; Determine the amendment model table that described amendment table mark is corresponding, and in described amendment model table, attribute before described amendment is replaced with attribute after described amendment; Wherein, described amendment model table is solid model table, business object model table or business module model table.
Particularly, user utilizes data base tool to send modify instruction to model bank, and instruction comprises table mark, and this table mark shows the tables of data that needs are revised.For convenience of description, this tables of data is called amendment model table.In addition, also comprise two attributes in modify instruction, one is the attribute before amendment, and one is the attribute for being revised as, and in like manner, for convenience of description, the former is called the front attribute of amendment, the latter is called the rear attribute of amendment.After finding amendment model table, in this amendment model table, the former is replaced with the latter, the amendment of complete paired attributes, also namely realize the amendment to data model.When drawing entity relationship diagram, the data model impact of amendment be figure in figure, can't impact for connecting line.
When if desired the relation data in relation storehouse being modified, can perform by the following method, that is:
When receiving the modify instruction to described relation storehouse, extract the amendment table mark in described modify instruction, the front relation of amendment and the rear relation of amendment; Determine the amendment relation table that described amendment table mark is corresponding, and in described amendment relation table, relation before described amendment is replaced with relation after described amendment.
Particularly, user utilizes data base tool to send modify instruction to relation storehouse, and this instruction comprises table mark, and this table mark shows the tables of data that needs are revised.In like manner, for convenience of description, this tables of data is called amendment relation table.In addition, the front relation of amendment and the rear relation of amendment is also comprised in modify instruction.It should be noted that, the mark of each relation can be comprised in relation table, and this mark has uniqueness, thus, before amendment, relation refers to the mark wanting the relation revised, more specifically, can also comprise the starting point in this relation, terminal or both, show to want to revise the starting point in this relation, terminal or both.In like manner relation after known amendment.To relation data amendment, impact be line in entity relationship diagram, can't impact data model.
About method for drafting and the storage means of entity relationship diagram provided by the invention, also supplement what time below.
After drawing entity relationship diagram according to the idsplay order of user, can directly store this entity relationship diagram, this figure is current latest edition, thus when needing display entity graph of a relation next time, directly can read this entity relationship diagram and show, and saves the drafting time at every turn.Certainly, the situation that data in possible memory model storehouse and/or relation storehouse are modified, namely entity relationship diagram is modified, after then user clicks the idsplay order of display entity graph of a relation, user subject graph of a relation can be pointed out to be modified, and to abandon reading the entity relationship diagram stored, but according to above-mentioned method for drafting, from model bank and graph of a relation, read data, regenerate new entity relationship diagram.
In addition, the type of above-mentioned various relation (entity relationship, object relationship and module relationship) can also be recorded in relation table, type is divided into four kinds, i.e. 1:1,1:n, n:1, n:n, the relation quantity that the Origin And Destination referring to relation respectively has, be described with n:n, illustrate that the starting point of this relation has n with the relation certainly as starting point, and the terminal of this relation have n with the relation certainly as terminal.
Be introduced the drawing apparatus of the entity relationship diagram that the embodiment of the present invention provides below, it should be noted that, the drawing apparatus of concerned entity graph of a relation with reference to the method for drafting of entity relationship diagram provided above, can not repeat below.
With reference to Fig. 7, it illustrates the structure of the drawing apparatus of the entity relationship diagram that the embodiment of the present invention provides, specifically comprise: project label extraction unit 101, solid model acquiring unit 102, entity relationship acquiring unit 103, solid pattern display unit 104, starting and terminal point determining unit 105 and connecting line display unit 106; Wherein:
Project label extraction unit 101, for when receiving drafting instruction, extracts the project label in described drafting instruction;
Solid model acquiring unit 102, in the model bank be pre-created, obtains the multiple solid models corresponding with described project label; Wherein, described solid model comprises entity attribute;
Entity relationship acquiring unit 103, in the relation storehouse be pre-created, obtains the entity relationship corresponding with described project label;
Solid pattern display unit 104, for generating each described solid model solid pattern separately, and shows solid pattern described in each;
Starting and terminal point determining unit 105, for according to described entity relationship, determines starting point solid pattern and terminal solid pattern in described multiple solid pattern;
Connecting line display unit 106, for generating the connecting line between described starting point solid pattern and described terminal solid pattern, and shows described connecting line.
From above technical scheme, the drawing apparatus of the entity relationship diagram that the present embodiment provides, to need and the device preserved in the model bank that builds in advance and relation storehouse is connected, thus data model is obtained in model bank, and read relation data from relation storehouse, and then utilize two parts Plotting data entity relationship diagram read.Compared with prior art, when this drawing apparatus draws entity relationship diagram, do not need artificial drafting, but from the database built in advance, read data automatically generate, draw more automatic, and facilitate the amendment of entity relationship diagram, namely user only need modify to model bank or relation storehouse, and drawing apparatus directly utilizes the entity relationship diagram that amended data genaration is new.
Certainly, above-mentioned drawing apparatus can also comprise: business object display unit and business module display unit; Wherein:
Business object display unit, in described model bank, obtains the business object model corresponding with described project label, and generates the business object figure of described business object model; Determine the target entity model that described business object model comprises, show described business object figure in the mode of the solid pattern of nested described target entity model;
Business module display unit, in described model bank, obtains the business module model corresponding with described project label, and generates the business module figure of described business module model; Determine the target service object model that described business module model comprises, show described business module figure in the mode of the business object figure of nested described target service object model.
When the business object figure generated is multiple, drawing apparatus also comprises:
Object relationship checks unit, for when receiving object relationship and checking instruction, determines to check with described the first business object figure that instruction is corresponding, and the solid pattern that hiding described first business object figure is nested with; In described relation storehouse, obtain the object relationship that described first business object figure is corresponding; When business object figure after the starting point business object model of described object relationship or the second business object figure corresponding to terminal business object model are hidden entity figure, generate the connecting line between described first business object figure and described second business object figure, and show described connecting line.
When the business module figure generated is multiple, drawing apparatus also comprises:
Module relationship checks unit, for when receiving module relationship and checking instruction, determine to check with described the first business module figure that instruction is corresponding, and hide the solid pattern that the business object figure that is nested with of described first business module figure and this business object image be nested with; In described relation storehouse, obtain the module relationship that described first business module figure is corresponding; When the starting point business module model of described module relationship or the second business module figure corresponding to terminal business module model are the business module figure of hiding business object figure and solid pattern, generate the connecting line between described first business module figure and described second business module figure, and show described connecting line.
In addition, with reference to Fig. 8, the embodiment of the present invention additionally provides a kind of memory storage of entity relationship diagram, specifically comprises: model table storage unit 201 and relation table storage unit 202.
Model table storage unit 201, for obtaining the attribute of solid model, by the property store of described solid model in solid model table, obtain the attribute of business object model, by the property store of described business object in business object model table, and obtain the attribute of business module model, by the property store of described business module in business module model table; Wherein, the attribute of described business module model is the business object model comprised, and the attribute of described business object model is the solid model comprised;
Relation table storage unit 202, for in the entity relationship diagram drawn, obtain starting point solid model, terminal solid model, starting point business object model, terminal business object model, starting point business module model and terminal business module model that connecting line is corresponding, and be stored in relation table.
Certainly, above-mentioned memory storage can also comprise:
Model table amendment unit, for when receiving the modify instruction to described model bank, extracts the amendment table mark in described modify instruction, the front attribute of amendment and attribute after revising; Determine the amendment model table that described amendment table mark is corresponding, and in described amendment model table, attribute before described amendment is replaced with attribute after described amendment; Wherein, described amendment model table is solid model table, business object model table or business module model table.
Certainly, above-mentioned memory storage can also comprise:
Relation table amendment unit, for when receiving the modify instruction to described relation storehouse, extracts the amendment table mark in described modify instruction, the front relation of amendment and relation after revising; Determine the amendment relation table that described amendment table mark is corresponding, and in described amendment relation table, relation before described amendment is replaced with relation after described amendment.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.
Also it should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising above-mentioned key element and also there is other identical element.
To the above-mentioned explanation of the disclosed embodiments, professional and technical personnel in the field are realized or uses the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. a method for drafting for entity relationship diagram, is characterized in that, comprising:
When receiving drafting instruction, extract the project label in described drafting instruction;
In the model bank be pre-created, obtain the multiple solid models corresponding with described project label; Wherein, described solid model comprises entity attribute;
In the relation storehouse be pre-created, obtain the entity relationship corresponding with described project label;
Generate each described solid model solid pattern separately, and show solid pattern described in each;
According to described entity relationship, in described multiple solid pattern, determine starting point solid pattern and terminal solid pattern;
Generate the connecting line between described starting point solid pattern and described terminal solid pattern, and show described connecting line.
2. the method for drafting of entity relationship diagram according to claim 1, is characterized in that, also comprises:
In described model bank, obtain the business object model corresponding with described project label, and generate the business object figure of described business object model;
Determine the target entity model that described business object model comprises, show described business object figure in the mode of the solid pattern of nested described target entity model.
3. the method for drafting of entity relationship diagram according to claim 2, is characterized in that, also comprises:
In described model bank, obtain the business module model corresponding with described project label, and generate the business module figure of described business module model;
Determine the target service object model that described business module model comprises, show described business module figure in the mode of the business object figure of nested described target service object model.
4. the method for drafting of entity relationship diagram according to claim 2, is characterized in that, when the business object figure generated is multiple, described method for drafting also comprises:
When receiving object relationship and checking instruction, determine to check with described the first business object figure that instruction is corresponding, and the solid pattern that hiding described first business object figure is nested with;
In described relation storehouse, obtain the object relationship that described first business object figure is corresponding;
When business object figure after the starting point business object model of described object relationship or the second business object figure corresponding to terminal business object model are hidden entity figure, generate the connecting line between described first business object figure and described second business object figure, and show described connecting line.
5. the method for drafting of entity relationship diagram according to claim 3, is characterized in that, when the business module figure generated is multiple, described method for drafting also comprises:
When receiving module relationship and checking instruction, determine to check with described the first business module figure that instruction is corresponding, and hide the solid pattern that the business object figure that is nested with of described first business module figure and this business object image be nested with;
In described relation storehouse, obtain the module relationship that described first business module figure is corresponding;
When the starting point business module model of described module relationship or the second business module figure corresponding to terminal business module model are the business module figure of hiding business object figure and solid pattern, generate the connecting line between described first business module figure and described second business module figure, and show described connecting line.
6. a storage means for entity relationship diagram, is characterized in that, comprising:
Obtain the attribute of solid model, by the property store of described solid model in solid model table, obtain the attribute of business object model, by the property store of described business object in business object model table, and obtain the attribute of business module model, by the property store of described business module in business module model table; Wherein, the attribute of described business module model is the business object model comprised, and the attribute of described business object model is the solid model comprised;
In the entity relationship diagram drawn, obtain starting point solid model, terminal solid model, starting point business object model, terminal business object model, starting point business module model and terminal business module model that connecting line is corresponding, and be stored in relation table.
7. the storage means of entity relationship diagram according to claim 6, is characterized in that, also comprises:
When receiving the modify instruction to described model bank, extract the amendment table mark in described modify instruction, the front attribute of amendment and the rear attribute of amendment;
Determine the amendment model table that described amendment table mark is corresponding, and in described amendment model table, attribute before described amendment is replaced with attribute after described amendment; Wherein, described amendment model table is solid model table, business object model table or business module model table.
8. the storage means of entity relationship diagram according to claim 6, is characterized in that, also comprises:
When receiving the modify instruction to described relation storehouse, extract the amendment table mark in described modify instruction, the front relation of amendment and the rear relation of amendment;
Determine the amendment relation table that described amendment table mark is corresponding, and in described amendment relation table, relation before described amendment is replaced with relation after described amendment.
9. a drawing apparatus for entity relationship diagram, is characterized in that, comprising:
Project label extraction unit, for when receiving drafting instruction, extracts the project label in described drafting instruction;
Solid model acquiring unit, in the model bank be pre-created, obtains the multiple solid models corresponding with described project label; Wherein, described solid model comprises entity attribute;
Entity relationship acquiring unit, in the relation storehouse be pre-created, obtains the entity relationship corresponding with described project label;
Solid pattern display unit, for generating each described solid model solid pattern separately, and shows solid pattern described in each;
Starting and terminal point determining unit, for according to described entity relationship, determines starting point solid pattern and terminal solid pattern in described multiple solid pattern;
Connecting line display unit, for generating the connecting line between described starting point solid pattern and described terminal solid pattern, and shows described connecting line.
10. a memory storage for entity relationship diagram, is characterized in that, comprising:
Model table storage unit, for obtaining the attribute of solid model, by the property store of described solid model in solid model table, obtain the attribute of business object model, by the property store of described business object in business object model table, and obtain the attribute of business module model, by the property store of described business module in business module model table; Wherein, the attribute of described business module model is the business object model comprised, and the attribute of described business object model is the solid model comprised;
Relation table storage unit, for in the entity relationship diagram drawn, obtain starting point solid model, terminal solid model, starting point business object model, terminal business object model, starting point business module model and terminal business module model that connecting line is corresponding, and be stored in relation table.
CN201510043473.4A 2015-01-28 2015-01-28 Method for drafting, storage method, drawing apparatus and the storage device of entity relationship diagram Active CN104572125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510043473.4A CN104572125B (en) 2015-01-28 2015-01-28 Method for drafting, storage method, drawing apparatus and the storage device of entity relationship diagram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510043473.4A CN104572125B (en) 2015-01-28 2015-01-28 Method for drafting, storage method, drawing apparatus and the storage device of entity relationship diagram

Publications (2)

Publication Number Publication Date
CN104572125A true CN104572125A (en) 2015-04-29
CN104572125B CN104572125B (en) 2018-10-16

Family

ID=53088291

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510043473.4A Active CN104572125B (en) 2015-01-28 2015-01-28 Method for drafting, storage method, drawing apparatus and the storage device of entity relationship diagram

Country Status (1)

Country Link
CN (1) CN104572125B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227892A (en) * 2016-08-24 2016-12-14 深圳市卓讯信息技术有限公司 A kind of intellectual analysis database table relation generates the method and device of E R figure
CN107239459A (en) * 2016-03-28 2017-10-10 阿里巴巴集团控股有限公司 Entity contact map methods of exhibiting and device
CN108399157A (en) * 2017-12-21 2018-08-14 中兴通讯股份有限公司 Dynamic abstracting method, server and the readable storage medium storing program for executing of entity and relation on attributes
CN108711179A (en) * 2018-05-21 2018-10-26 张宗良 Drawing restoring method and system
CN109086315A (en) * 2018-06-27 2018-12-25 阿里巴巴集团控股有限公司 A kind of layout method and device of ER figure
CN110609873A (en) * 2018-06-15 2019-12-24 富士施乐株式会社 Information processing apparatus and non-transitory computer readable medium
CN111611419A (en) * 2019-02-26 2020-09-01 阿里巴巴集团控股有限公司 Sub-graph identification method and device
US11016648B2 (en) 2018-10-30 2021-05-25 Johnson Controls Technology Company Systems and methods for entity visualization and management with an entity node editor
CN117093207A (en) * 2023-10-17 2023-11-21 恩核(北京)信息技术有限公司 Entity processing method, device and system of multi-service data model

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581163A (en) * 2004-05-20 2005-02-16 北京大学 Inquiring method of operation system member storehouse
CN101901262A (en) * 2010-07-26 2010-12-01 北京新洲协同软件技术有限公司 Object-oriented model-based enterprise database construction and service data display method
US20120117516A1 (en) * 2010-11-10 2012-05-10 Robert Guinness Systems and methods for information management using socially vetted graphs
CN103345402A (en) * 2013-05-27 2013-10-09 上海华兴数字科技有限公司 Display module imaging configuration method based on intermediate code
CN104243220A (en) * 2014-10-10 2014-12-24 中国农业银行股份有限公司 Method and device for generating inter-system relation graph

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581163A (en) * 2004-05-20 2005-02-16 北京大学 Inquiring method of operation system member storehouse
CN101901262A (en) * 2010-07-26 2010-12-01 北京新洲协同软件技术有限公司 Object-oriented model-based enterprise database construction and service data display method
US20120117516A1 (en) * 2010-11-10 2012-05-10 Robert Guinness Systems and methods for information management using socially vetted graphs
CN103345402A (en) * 2013-05-27 2013-10-09 上海华兴数字科技有限公司 Display module imaging configuration method based on intermediate code
CN104243220A (en) * 2014-10-10 2014-12-24 中国农业银行股份有限公司 Method and device for generating inter-system relation graph

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239459A (en) * 2016-03-28 2017-10-10 阿里巴巴集团控股有限公司 Entity contact map methods of exhibiting and device
CN106227892A (en) * 2016-08-24 2016-12-14 深圳市卓讯信息技术有限公司 A kind of intellectual analysis database table relation generates the method and device of E R figure
CN106227892B (en) * 2016-08-24 2020-06-16 深圳市卓讯信息技术有限公司 Method and device for generating E-R (E-R) graph by intelligently analyzing database table relationship
CN108399157A (en) * 2017-12-21 2018-08-14 中兴通讯股份有限公司 Dynamic abstracting method, server and the readable storage medium storing program for executing of entity and relation on attributes
CN108399157B (en) * 2017-12-21 2023-08-18 中兴通讯股份有限公司 Dynamic extraction method of entity and attribute relationship, server and readable storage medium
CN108711179B (en) * 2018-05-21 2022-07-19 杭州多技教育科技有限公司 Drawing reduction method and system
CN108711179A (en) * 2018-05-21 2018-10-26 张宗良 Drawing restoring method and system
CN110609873A (en) * 2018-06-15 2019-12-24 富士施乐株式会社 Information processing apparatus and non-transitory computer readable medium
CN109086315A (en) * 2018-06-27 2018-12-25 阿里巴巴集团控股有限公司 A kind of layout method and device of ER figure
US11269505B2 (en) 2018-10-30 2022-03-08 Johnson Controls Technology Company System and methods for entity visualization and management with an entity node editor
US11016648B2 (en) 2018-10-30 2021-05-25 Johnson Controls Technology Company Systems and methods for entity visualization and management with an entity node editor
US11941238B2 (en) 2018-10-30 2024-03-26 Johnson Controls Technology Company Systems and methods for entity visualization and management with an entity node editor
CN111611419B (en) * 2019-02-26 2023-06-20 阿里巴巴集团控股有限公司 Sub-graph identification method and device
CN111611419A (en) * 2019-02-26 2020-09-01 阿里巴巴集团控股有限公司 Sub-graph identification method and device
CN117093207A (en) * 2023-10-17 2023-11-21 恩核(北京)信息技术有限公司 Entity processing method, device and system of multi-service data model
CN117093207B (en) * 2023-10-17 2024-02-02 恩核(北京)信息技术有限公司 Entity processing method, device and system of multi-service data model

Also Published As

Publication number Publication date
CN104572125B (en) 2018-10-16

Similar Documents

Publication Publication Date Title
CN104572125A (en) Methods and devices for drawing and storing entity relation diagrams
CN108733713B (en) Data query method and device in data warehouse
CN102890686A (en) Method and system for showing commodity search result
CN103020158A (en) Report form creation method, device and system
CN109739915B (en) Cross-domain shared data model construction method
CN103310099A (en) Method and system for realizing augmented reality by adopting image capture and recognition technology
CN106470110B (en) Method and device for sending messages to multiple users in user list in group mode
CN104579909B (en) Method and equipment for classifying user information and acquiring user grouping information
CN110515896B (en) Model resource management method, model file manufacturing method, device and system
US20150213536A1 (en) Method and apparatus for searching information in electronic commerce platform
CN102495922B (en) Customized suit sample plate making method and system
CN104899186A (en) Form generating and obtaining method and device
CN104102670A (en) Performance indicator analytical framework
CN108446327A (en) Operation system dynamic creation method, device, computer equipment and storage medium
CN115081414B (en) Spreadsheet generation method, device, equipment and medium based on data model
CN103019691A (en) Transformation method for extract, transform and load (ETL) operation relation graph and implementation system thereof
CN111538774A (en) Data storage and display method, system, equipment and storage medium
CN112559513A (en) Link data access method, device, storage medium, processor and electronic device
CN109726295A (en) Brand knowledge map display methods, device, figure server and storage medium
CN112307264A (en) Data query method and device, storage medium and electronic equipment
CN105306273A (en) Process configuration method and device
CN108959229A (en) Planning report generation method, terminal and storage medium based on customer information
CN107766519B (en) Method for visually configuring data structure
CN106156275A (en) A kind of method and apparatus of singulated inquiry
CN116992092A (en) Method and device for establishing flow model, storage medium and terminal equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant