Field Names in Logical Model generated from an ORM Source Model

A

Aravind Hande

I am looking at the Employee ORM Source (US Units).vsd sample file that
comes with VSEA.

This model has many facts - two of which are shown below:

Project (nr) is managed by Employee (empNr)
Project (nr) is evaluated by Employee (empNr)

When I generate a logical model from this ORM Source model, the field
names that are generated for the above roles in the Project table are:

managerEmpNr
evaluatorEmpNr


How did this work? I can't seem to find anything in the source model
which indicates that "is managed by Employee" should be replaced by
"manager" or "is evaluated by Employee" should be replaced by
"evaluator". There is nothing in the database properties or the fact
editor for these entities / predicates, or even in the
options-->document-->abbreviation tab

For test purposes I created a new fact (only one employee works on a
project)

Project (nr) is worked on by Employee (empNr)

When I convert this to a logical model I see that "is worked on by
Employee" is replaced by "Worked Employee" which is not what I
want. How do I control this?



Also, what is the best way to generate the logical model with the right
field names without having to modify the logical model (i.e. I want full
control in the ORM source model).

Ideally, I want to enter a fact like

"Project (ID) has Description" and have the field name be "chrDescription"
instead of "Description".

Right now, to get this I am entering the fact as:

"Project (ID) has chrDescription". This is very klugy and I don't like
this
approach :-(

Any comments, suggestions will be greatly appreciated.

Thanks,
Aravind Hande
 
S

Scot A. Becker

Hi Again Aravind,
First Problem -- Column name issues when merging many ORM source files

I can't be of much help here, unfortunately, as I always keep a 1:1
relationship between my ORM Source and Database Model Diagrams. I do this
largely because the last time I played around with multiple source files, I
had some problems. Both this product and it predecessor had at lot of
problems with "projects", in my opinion.

If I had to guess, I would say that logical names seem to be stored in the
ORM source model itself (during the migrate/update) and as such the order in
which they are added might make a difference. One (ugly) work around might
be to generate a new Database Model from each source model independently,
set the names as you desire, and then migrate/update the changes back to the
(one) ORM source. Then, try adding them all to a single database model and
generate. If I am right, the name would be set in each source model and so
when each source model is used to map, it will keep the names right. It's a
guess... it might work; let me know if it does ; ).
Second problem -- PK/FK name issues in the logical model.
------------------------------------------------------------------
This seems quite bizarre. Occasionally, the logical name for the
Primary Key is an empty string (there is a valid conceptual name) .
A FK corresponding to this PK is then named "1" in the child table. If
there
is a table with multiple FK's with the same problem, then these FK
columns are named "2", "3" etc.

Any ideas on why this might happen?

I haven't seen this before either, sorry. Are you adjusting the names or
just letting them generate automatically? I usually do the latter, so maybe
that it why I haven't seen it. You might want to search the archives of this
group (via google); I think I have seen this one posted before....
Third problem -- Same "Value" defined in multiple files causes problems
------------------------------------------------------------------
If one ORM source file has a fact
Entity1 (idEntity1) has Description

And another ORM source file has another fact
Entity2 (idEntity2) has Description.

In both files Description is defined as Varchar(100).

When I build the logical model from these two ORM source models, I
get an error message. To get around this error, I used the "Namespace"
property for the Description value type. In the first model I set this
property to Entity1 and in the second I set it to Entity2. This seems to
have solved this problem.

Visio stores Entity types as facts themselves. For example, the object
Person(ssn) is really "Person is identified by SSN()" with the Person role
being mandatory, each role being unique, and the SSN role being a primarily
unique. I would suspect that when merging multiple ORM sources together, the
SSN() object is getting seen more than once.

One way to solve this is to externalize the reference mode (as I did above)
such that SSN() is identified only once. Then, when it is referred to in any
other model, set it as "external" (in those other models). This setting
tells the engine to ignore the definition here and look for it elsewhere. By
the way, it was playing around with the external options that caused me to
give up on using multiple ORM Source Models. Good Luck.
Is the namespace property used for this specific purpose? If not, what
is it used for? Can't find anything useful about the Namespace property
in the Visio help files.

As I understand it, this is precisely what namespace if for.
Any suggestions / tips will be greatly appreciated.

Sorry I can't be of more specific help.

Kind Regards,
Scot.
................................................
Scot Becker

Orthogonal Software
www.orthogonalsoftware.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top