Book a Demo

Author Topic: Views of class and tables  (Read 5803 times)

jercoli

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Views of class and tables
« on: August 18, 2005, 11:41:27 am »
Some question, when i've to mapping my final classes to tables; what type of diagram i must develope?

Should i've 2 differents diagrams ??, because the class is the same in both diagrams but in one of them the <<stereotype>> is table to could work with code-generation (fields, PK, FK, ...) in my favorite DB; and the other is type class becouse i've want to generate code in C# of my methods.

Excuse my poor english, thanks in advance.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Views of class and tables
« Reply #1 on: August 18, 2005, 03:06:45 pm »
Hi jercoli,

If you intend to use EA's inbuilt methods to generate the tables and code, then you'll need two classes (actually three).  

Why three?  Well, a coding class (in a language like C++) represents one platform and the table represents another platform (DDL).

While they derive from the same thing, they themselves contain different metadata about the original which is platform independent. These code and database classes are thus specific to their platform.

EA provides a mechanism to keep these three classes in synchronization.  It's called the MDA-style transform.  This is intended, principally, to transform a PIM (platform independent model) to one (or more) PSMs (platform specific models).  Type MDA into the Help system to see the MDA-Style Transforms topic.  This will explain the details.  MDA stands for Model Driven Architecture.

HTH,
Paolo
« Last Edit: August 18, 2005, 03:21:17 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!