Можно ли создавать «синонимы» сущностей?

284
leokhorn

PowerAMC ​​/ PowerDesigner позволяет создавать «графические синонимы» базовых объектов, позволяя размещать один и тот же объект дважды (или более) на диаграмме. Это замечательно, когда каким-то образом сущность должна быть связана с двумя другими, которые оказываются на противоположных концах диаграммы.

Есть ли способ сделать это в Visio 2010 при использовании шаблона моделирования базы данных?

0

1 ответ на вопрос

0
leokhorn

There are two ways of doing this:

  • Open the Table and Views panel (Database tab, Model Preferences, first tab, "when deleting an object from the diagram" should be on "Ask the user")
  • Drag and drop the existing table from that panel onto the diagram

This creates a duplicate of the logical entity and recreates all links (relations) to it. Not immediately useful to clean up the diagram but if you delete the extraneous links and say "No" when it asks if it should also delete the logical elements, then the links disappear visually but the foreign keys remain.

Second method:

  • Copy a table from the diagram (CTRL+C)
  • In the Home tab, choose to Paste, Special Paste and keep what should be the default mode: Visio diagram data

A copy of the table will appear but it won't be automatically linked to anything visually.

From both points, the duplicates on the diagram are both logically the same entity. This means that if you modify one, the other is also modified. If you link one to something, the other one is also logically linked (foreign keys will be listed in both, though only one may have the visual link).

Note: I'm using the French version of Visio so exact labels mentioned may be different in English. I tried translating to the best of my ability.