Book a Demo

Author Topic: Unable to set or remove Primary Key (or Foreign Key) in visio data model  (Read 9269 times)

ppaulv

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Hi,
I'm trying to migrate from Visio2010 to EA for making data models. the only thing drawn are tables/entities, attributes, relationships, primary/foreign keys.
Importing in EA 14 works just fine as long as the Visio models stay within one page per tab. So far so good.
All diagrams in the file (15 or so) end up just nicely in EA.
But .... now I want to start working with it and I'm not able te get to the place where I can change Primary/Foreign keys in the tables.
I followed the user guide on that subject:
https://sparxsystems.com/resources/user-guides/model-domains/database-models.pdf
where on page 37 the following is mentioned :  Design > Tools > Database Builder > Click on Table name > Constraints/Indexes | Right-click | Add New Constraint
When I do the Right-click, nothing happens.
Also the other method indicated:
In diagram | Right-click on Table | Features & Properties | Operations >
Constraints/Indexes | Right-click | Add New Constraint
nothing happens after the Right-click and I can not add or change a constraint, the option is just not visible anywhere.
What am I doing wrong here?
« Last Edit: March 06, 2019, 09:59:13 pm by ppaulv »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
There might be an issue with the imported tables not being recognized as "real" tables by EA.

Create some tables manually and see if you can set Primary or Foreign keys on those.
Then compare these manual tables with the ones imported from Visio.

Also make sure to check the fully qualified stereotype. I remember differences between imported tables vs regular tables with regards to the stereotype (both «table», but not both from the same profile)

Geert

ppaulv

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Hi Geert,  thnx for the quick reply. Unfortunately I already did that, without result.
Unfortunately EA has so many options and possibilities, it is well possible I did something wrong here.
The imported model shows the correct PK's and FK's but no way I'm able to change them.
I tried to include a screen print but I can't do that I'm afraid.

shiba28

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Hi,
Create a foreign key relationship with the Connector tool
1. Open your database model diagram.
2. On the Home tab, in the Tools group, click Connector.
3. Position the Connector tool over the center of the parent table so that the table is outlined, and drag it to the center of the child table.
4. Define the relationship by editing its properties.





DigitalOceanSiteGroundiPage

« Last Edit: May 03, 2019, 04:58:37 am by shiba28 »

Richard Freggi

  • EA User
  • **
  • Posts: 498
  • Karma: +18/-7
    • View Profile
My experience is that EA does not update or delete FK automatically when the PK is changed or deleted (see my earlier post on this topic).  I have to manually update each FK in the relationship editor.  So you may have to manually correct them.