Generating persistent code from ERD

Hi Everyone,

I’ve got an annoying problem I am hoping someone can help me with. We are in the process of automating a large multi-billion dollar corporation that currently does not have any information systems in place - if you can believe that. At any rate, I am creating the various data models needed for the information systems that we are building. I maintain one main enterprise model showing every table, but then I have the individual ERD’s that represent the data needed for a particular project - or example, and ERD named “application automation” which will be used for creating an online employment application.

The problem is when I go to generate the persistent code using the ORM facilities, while I have the application automation ERD on the screen, VP wants to, and does, create this one giant class diagram with every table in the enterprise and then generates the persistent code for it all when what I wanted was code generated for only that one particular project, application automation. What am I doing wrong, how can I do it differently or am I just stuck with this problem???

All I want is the code generated for that one project - how do I accomplish this?

Any help or advice would be greatly appreciated.

Thank You

Ricky Miller
Edison Chouest Offshore

Hi Rmiller511,

Thanks for your post. Upon synchronization from ERD to class diagram, it will synchronize all entity models in your project to the class diagram (you can select which class diagram to sync to, or create a new class diagram).

If you only want to synchronize the entities of “application automation” to class diagram, please create a separate project file for it.

As there is a breakthrough in our new version (VP Suite 4.0) - supports referencing model elements of external project. Therefore you can have separate projects and reference the model elements in project.
More details about referencing model elements in external project can be found from the following link:
http://resources.visual-paradigm.com/index.php/visual-modeling/67-vm-general/347-project-ref.html

Hope you will find this new feature useful. If you have any further question, please feel free to contact me.

Best regards,
Lilian Wong

Thank you so much for that clarification. Unfortunately, it is a devastating problem for us now.

My task is to design and build information systems for a billion dollar corporation where no automation of any type currently exists - no information systems and no applications. The corporation is comprised of 11 very large subsidiaries - all with basically the same common needs - hiring, payroll, purchasing, logistics, etc. So we are in the process of building the enterprise data model which would serve the purposes for all of the affiliate companies. At this time, we have collected enough use cases and created enough ERDs to begin generating the first applications such as an electronic application for employment, personnel management, time keeping, etc., etc. All of which can be re-used (with some differences) by the different companies, and all of which will use many of the same tables such as employee, timesheet, schedules, etc., etc.

We approach the problem in the standard way -

  1. write the problem statement
  2. create use cases and capture requirements
  3. identify the entities/classes and create ERDs

This done, we would now like to generate a class diagram to match the ERD that illustrates the data necessary to implement, for example, an online electronic application for employment. The problem is that VP will not, under any circumstances, give me a class diagram that consists of only the components involved in the solution. Instead, it will only give us the ‘big bang’ class diagram, which is a mess, is not usable as is without hours of work to re-organize it aesthetically to make it usable, then cut and past only the classes we are interested in to a new class diagram that matches the ERD.

If this was not bad enough, then there is the code generation. We can not simply generate only the code we are interested in, we must generate code for every single entity in the internal repository of VP.

The only solution at this point is to create individual projects where the same work - the same entities, definitions, date types and specifications are replicated over and over again with the multitude of individual projects we will be required to created.

What this effectively does it devout most of our time managing a case tool versus addressing the serious problems this company is faced with. The case tool definitely does not emulate how software is actually developed using the proven methods of our industry.

Don’t mean to be critical, but these are not opinions, these are the facts that I am realistically faced with at the moment, and to be honest, I am perplexed as to what to do.

At any rate, thank you for your reply. You help is very much appreciated.

Best Regards,

Ricky Miller

Hi Ricky Miller,

Thanks for replying. As I know you communicated the same issue with my colleague Rain in the online ticket system. Below I quoted his reply so other users can pick up on this issue:

Dear Ricky Miller,

Thanks for your details. Our ORM code/database generation is in project based (.vpp), which means it will generate code for all the ORM classes within your project. This is because we have to ensure the generated code is valid (you can have diagram modeling part of the system, which contain classes related to other class not in the diagram, but we cannot generate code for that class without take care those relationship).

But in the latest VP Suite 4.0 (a build newer than the formal release), we support synchronize ER model to class model without render the class diagram if your ER model is large enough (if we found that there are over 500 elements, including connector, need to render for generate the class diagram). This help you to create the class model without generating a giant diagram. You can then using the Form Diagram feature (right click on selected class in Model Explorer/Class Repository), or simply drag and drop the class to create the diagram you needed.

The latest build of VP Suite 4.0 can be downloaded at
http://files2.visual-paradigm.com/200904/Patch/20090425d/VP_Suite_MacOSX_4_0_20090425d.dmg

And about the common part in your project, actually the latest VP Suite 4.0 support reference the models from other project file. So you can define the common part in a separated project file, and other child project simply reference to the common project. But unfortunately this reference feature is only for modeling effect. ORM code generation will not follow the reference during code generation. Details about reference to models from other project file can be found at

Feel free to contact me if you need any help, please do not hesitate to contact me.

Best regards,
Rain Wong

If there is anything we can help again, please feel free to ask.

Best regards,
Lilian Wong