Book a Demo

Author Topic: Database model to Class diagram  (Read 3309 times)

Metalstorm

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Database model to Class diagram
« on: October 21, 2011, 02:38:17 am »
Hi all,

Within EA I have produced a relational MsSQL database model, how do I then generate a class diagram based on the DB tables without doing it all manually. Like the generate code option but instead generate class diagram.

On that note, if i go to one of the tables and generate c# code for it the class, fields have types like nvarchar(max) instead of string, bit instead of bool etc which c# doesn't recognise; any way around this apart from renaming them all manually?

finally, is there a create getter/setter option? I am yet to find it.

thanks.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Database model to Class diagram
« Reply #1 on: October 21, 2011, 06:49:10 pm »
Metalstorm,

You can reverse engineer your database from odbc. That process also allows to create a diagram.

You shouldn't try to generate c# code from database tables.
What you should do is create a PIM model and use MDA transformations to generate your database PSM and C# PSM model.

getter/setter... that is probably possible, but I don't know how. It probably is some kind of setting mentioning "property"

Geert

Metalstorm

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Database model to Class diagram
« Reply #2 on: October 21, 2011, 07:02:02 pm »
Hi Geert,

Thank you for your reply, We already have the Database diagram in EA (as a UML Structural, Class) is that right ?

How do you create a PIM model within EA ? Is there a specific model ? Once that's done how do you then MDA transform it ?

Thanks.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Database model to Class diagram
« Reply #3 on: October 21, 2011, 07:10:37 pm »
I'm sorry, I can't help you with that.
I guess you should be able to find the correct documentation if you search for "MDA"

Geert