Reverse engineer a database
Reverse engineering is what we call the process that takes a given database and turns it into a model driven “thing”.
You just need to give a valid connection string to it; in this case a use the MusicStoreDb from a MicrosoftSample:
You start by Analyzing the database:
And then you “Go!” – be aware of that this process will empty the package you started from and fill it with the stuff from the reverse engineer process:
Giving us this in the modlr tree:
And I will drag these classes out on a diagram to get this:
And that is enough information to run the model against the exact same database as we reversed it from:
Giving us a way to use the trusty AutoForms and EcoSpaceDebugger to look at the data and change it if we want:
In this particular database the RecordId, ArtistId and sofort are of type int in the database and are designed with “Is Identity==true” in SqlExpress. Also the “Identity Increment” is set in SqlExpress.
The Reverse algorithm gave us a model with int Attributes for the ID – we want ECO to be able to use that Key scheme instead of the standard ECO_ID – how is that done? Like this:
The PrimaryKey setting we got from the reversing process and the PrimaryKeyMapper I set to ”AutoInc” - an Eco-supplied primary key mapper with that name that handles the normal AutoIncrease behavior of databases. (You can create your own named mappers in ECO for visualStudio).
And for the Attribute we must also say that it is DbAssigned; that forces ECO to omit setting the primary key on first save, and also forces ECO to read the saved row back from the database to get the actual assigned key (which we need to use as a foreign key in related objects) :
This is actually enough to be able to create new objects from the ecospace debugger and have them inserted in the database (or from code or wecpof or what have you). If you follow along in this brief and try to save a new Album you will notice 2 SQLServer exceptions – Both Genre and Artist foreign keys are marked NOT NULL in the DB – handle this by assigning an Artist and a Genre to the new Album with AutoForms drag and drop.
Database evolveSo when you have reached this far you may have the need for changing the model – just like any developer you might get an uncontrollable urge to make the model look more like reality from time to time.
To use the Model Evolve mechanism – that calculates what needs to be changed in the database by comparing a new and old db script – we have to allow ECO to write the (current)script to the database. If we do not do this ECO will not have any “old” script to compare the new script with that ECO derives from your current model.
In ECO for VisualStudio you can choose to store the script some other way by using the ORMappingProvider components in your EcoSpace – but in Gaffr/AppComplete you do not have any code so you really must allow us to store it in the database. Note that this is only if you want to use the Database Evolve mechanism.
To write the Script to the Database open up the prototyper once more by hitting “Run” :
And once we have done this one time operation, that is only necessary for reversed databases (since standard eco databases has these from the start), we can do some model changes:
And “Run” and “Evolve”:
Looking in the SQL Script tab in the dialog above we can see the expected script that ECO will send to the database:
BEGIN TRANSACTION;
/* Add column [Album].ReleaseDate */
ALTER TABLE [Album] ADD ReleaseDate DATETIME DEFAULT '19000101' NOT NULL;
COMMIT;
That wraps up this presentation of the Reverse (engineer) database function in ECO and Gaffr/AppComplete.
Industrialization of research tools: the ATL case
High Level Documentation: Layered or Package Diagrams?
Re: [UML Forum] UC model - how to model a background process run?
I have two comments:
- I agree with RJB's suggestion about 'sorting out' the design detail in
a different behavioural diagram. Much of the language in your post sounds
very design oriented and the use case diagram is the wrong place for that.
- I suggest that you will need to add some text to the model and the
Re: [UML Forum] uml question
It is not only feasible, it is standard practice in most UML drawing
tools. However, it is usually done "under the hood" so that the linking
of state action to Activity Diagram is seamless in the tool's UI. The
tool can do this with a variety of mechanisms, like a hierarchical tree
Re: [UML Forum] UC model - how to model a background process run?
I think you are reading too much into <<includes>>. Remember that use
cases are only in UML to provide traceability for requirements to the
model solution's elements. So all UML is doing is organizing the use
cases; it does not deal with the semantics of use case content at all.
uml question
I have an Uml question, i tried to post it many times in vain, so i hope that it
is possible to get an answer even this way.
my question is about adding the internal activites inside a state in a State
diagram. my problem is that those activities are somehow complex that i want to
Re: UC model - how to model a background process run?
(2) Use <<include>> and sort out the synchronization using
asynchronous messages in a sequence diagram.
Hope this helps.
UC model - how to model a background process run?
There are two use cases. One is a running process (a system function)
which performs some actions, then waits some time and performs the
same actions again. Let's say it runs all the time on and on. Let's
call it UC.1
There is also another Use Case which is an usual user performed
function - let's call it UC.2. UC.2 is a GUI function by means of
I can not use SUT sterotype for UML testing Profile on Eclipse
I was building UML Testing Profile according to the UTP specification
from omg.org using Eclipse Galileo Modeling version.
I have created some stereotypes such as:
- TestComponent: extends UML::StructuredClassifier
- TestContext: extends UML::StructuredClassifier
- SUT: extends UML::Property
Re: [UML Forum] Understanding associative classes
The association class is *required* for *:* associations because such
associations cannot be resolved with a simple referential attribute on
one side or the other. Essentially the association class is a
placeholder for a more complex underlying implementation. Thus quite
Understanding associative classes
I'm having some issue while applying the concept of associative class
on an exercise i have to complete.
So far i have always thought that an associative class is "only"
useful if the cardinality "multiplicity" between to classes is greater
then 1.
so for example:
"in a transports company there are several trucks that can only refill
Re: [UML Forum] UML is active, but the buzz is lost?
I think OMG shot themselves in the foot in their effort to make UML the
Mother of Modeling Languages. Prior to v2.0 one of the major knocks on
UML was that it was too big and complex because it tried to be a
superset notation for all OOA/D notations, many of which were somewhat
PyUML - UML to Python Roundtrip Tool
PyUML is an open source Eclipse plug-in offering round trip engineering betwee UML and Python.
PyUML is based on the PyDev (Python IDE for Eclipse) and Eclipse UML Tools plugins
-->GRA2MOL - From grammars to modeling languages
Most reverse engineering and software modernization processes require to extract some kind of models from the source code as a way to facilitate the understanding and/or manipulation of the legacy system. -->
Re: [UML Forum] Re: UML 2.x - Raising Events on Transition (State Machine / Effect)
In an OO context the SM would implement an object and it would be the
objects that collaborated. So one would model that message sending in an
Interaction Diagram. One would describe the message generation and
relationship navigation either in an AAL or with analogous fundamental
RE: [UML Forum] UML is active, but the buzz is lost?
First, I use UML extensively, and have since UML 1.3.
Having said that, I think you are right that the UML is being quietly
adopted as the "lingua franca" of software and even perhaps systems (with or
without SysML) development. This survival has been in the face of myriad
domain specific languages that either casually imitated parts of the UML, or
Re: UML 2.x - Raising Events on Transition (State Machine / Effect)
I am neither interested in OO development directly nor any code
generation (executable UML, etc.), but your explanations are still
very interesting.
As I said, I expected that there is no "send message to other SM"
notion as presented in many papers and tutorials, because they are all
UML is active, but the buzz is lost?
that UML is still active but the buzz around it is now lost. My
opinion is that this is not necessarily a bad thing (more plus
comments here: [link]
Re: [UML Forum] UML 2.x - Raising Events on Transition (State Machine / Effect)
If you are looking to use state machines in some other context than OO
development, you can stop reading. I suspect you are not interested in
OO development, though you might still find the comments on
implementation implications below interesting.
I'm afraid that is not the way interacting FSMs work, at least as far as


