Book a Demo

Author Topic: Database to class diagram  (Read 5148 times)

tortue

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Database to class diagram
« on: October 24, 2014, 07:41:19 pm »
Hello,

I am currently retro ingeeniering a database to UML models.

I sucessfully built the Data model and transformed it to Java model (unsing transformation tool).

But I still have "table" stereotype in my java classes (may indicate that these classes are from some RE process, so it may be OK) and the generated classes are using database datatypes instead of basic java datatypes (ex.: VARCHAR instead of String, ...)

What is the best way to make a clean transformation of a Data model (directly generated from database schema) to some java class diagram or some PIM?

Should I write my own transformation script to generate classes with correct java datatypes or is there a better way to map database datatypes to language datatypes ?

(A quick and dirty fix may be using database datatypes mapping: Create a "Java database type", map database datatypes to our "java database type", transform our model to "java database" and transform "java database" to "java model". Is it correct ?)

Thanks !

UPDATE: It seems (according to EA documentation) it should be done using model transformation templates and code generation datatypes.
« Last Edit: October 25, 2014, 12:55:12 am by tortue »

rocketboy2000

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Database to class diagram
« Reply #1 on: October 25, 2014, 05:39:28 am »
hi there, I'm in the same boat... having to reverse engineer a physical database model to a logical.

I have found some published transforms to do this:
http://community.sparxsystems.com/community-resources/512-84data-modeling-logical-and-conceptual-mda-transforms

not to want to hijack the OP... but additional questions:
-are these published transforms current as the published date is 2011?
-are transforms one direction only? ie. will separate transforms have to be developed for logical to physical model transformation?
« Last Edit: October 25, 2014, 05:45:10 am by rocketboy2000 »