MS Visio 2007: How do I get the cardinality to appear on both ends of a relationship? - visio

In Visio 2007, I can only seem to set the cardinality of the Parent-to-child relationship, but I want to set the Child-to-Parent as well. Is there a reason Visio won't let me do this? Do I need to create a separate relationship to achieve this? I'm using two Entity objects/shapes and a Relationship object/shape.
Note: I got the cardinality to appear on the diagram by going Database > Options >> Document and checking the Cardinality box.

From Menu;
Database > Options >> Document
Click Relationship Tab. You will see Name Display. Check "show verb phase". Choose "Foward text", "Inverse text" or both.. That depands on your wish.

Visio uses multiplicity/cardinality on both sides when completing a UML Model Diagram; double-clicking the connector will allow you to select the multiplicity/cardinality from the drop-down options for both directions. Using the Entity setup will just give you a check box that is relatively useless for what you want to do.

Related

Change default stereotype: Upon adding a Column to a DB-Table, I would like the col stereotype to be my custom stereotpye

For our project, wo would like to document certain information with the model in Enterprise Architect, in order to not have multiple sites where stuff get's documented.
A consequence is, that the default model of EAUML::table and EAUML::column is insufficient.
Therefore I started to extend the classes to add our custom properties as shown below.
Now (after exporting and importing a MDG Profile) I am able to change our defined tables to our new stereotype.
Question here is: Is there a way to change the default column stereotype to "CUSTOM Col" for the "CUSTOM Table" instances? I don't seem to find a way. I imagine with a script in the right place or a "substitution" of the right kind. But I am an EA-Newby and have no clue how to solve this.
Thanks for any pointers.
Best

Is it possible to create “synonyms” of entities?

PowerAMC/PowerDesigner allows you to create "graphical synonyms" of underlying entities allowing you to place the same entity twice (or more) on a diagram. Each is an instance of the same entity. This is great to pretty-up diagrams when, somehow, an entity must be linked to two others that happen to be on opposite ends of the diagram.
Is there a way to do this in Visio 2010 when using the database modeling template?
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.
If you press the control key then click and drag an entity it will create a synonym.
I have yet to figure out how to remove a specific synonym without deleting all replicas of it.

How to add foreign key relationship in Entity Framework?

Click here to see how to do it while using a code first approach. Below the original database first approach question and answer.
I am using Entity Designer to create a database first model. Now I want to create a foreign key relationship between ProductId and ProductId (see below). I looked at the "add new association" but I cannot connect the two items. Can someone more experienced tell me how to accomplish this?
According to Relationships/Associations with the EF Designer, the steps to create a foreign key association are:
Right-click an empty area of the design surface, point to Add New, and select Association….
Fill in the settings for the association in the Add Association dialog.
...being sure to check the Add foreign key properties to the Entity checkbox when filling in the relationship details.
See also: Relationships, Navigation Properties, and Foreign Keys
If you are using the database first approach, it's better to create the foreign key on the database and update the model. Of course, this is true if you can modify the database; if not, you're stuck with the option of creating the referential constraint on the model.
To answer the bonus question:
If you have SQL Management Studio installed then you can very easily use the Database Migration wizard (right click on a database, "Tasks", "Deploy Database to SQL Azure") and from there fill the textboxes with the required information that you get from Azure.
Also, make sure to add your IP to the ignore list in Azure or else you won't be able to upload. This can be done in the Azure webportal.

Master Data Services entity error

I'm starting to use Master Data Services and I came across something strange. When I deploy the sample models and entities and afterwards go to the Master Data Manager website, I see under "System Administration" in the left column under the Model name a tree structure of entities.
However, when I created my own model and entity (+attributes), I couldn't find the entity under the model on the left side.
How can I fix this?
I suppose that is also why I get an "invalid entity" error message when trying to create members through the API.
I was able to fix this, although I'm not sure if it's really necessary to 'fix'.
When creating an entity, if you set "enable explicit hierarchies and collections" to "yes", the entity will be placed in the left-hand side tree view too.
I'm not sure if it's absolutely necessary to do so for at least one entity but it did help in my case.
Microsoft mentions the following about this ( http://technet.microsoft.com/en-us/library/ff487054.aspx ):
From the Enable explicit hierarchies and collections list, select one of the following options:
No. Select this option if you do not need to enable the entity for explicit hierarchies and collections. You can change this later if needed.
Yes. Select this option when you want to enable the entity for explicit hierarchies and collections. In the Explicit hierarchy name box, type a name. Optionally, select Mandatory hierarchy (all leaf members are included to make the explicit hierarchy a mandatory hierarchy.
Hope this helps.
The "strange" view is the Model View, and the entities you add from the left to the right side will be displayed in the "Explorer" view (inside the Explorer function, there is an Explorer menu as well).

iphone core data: three tier Entity relationship confusion

Re the Core Data table below. I want to associate the "Color" entity with the "detailsColor" attribute (in the Details entity). The idea is that there are (in this case) three Colors applicable to detailsColor.
I would have thought the "Relationships" in Color would apply to the "detailsColor" attribute as these colors only apply there. I cannot seem to connect the two though. I can only create a relationship with the entire Details entity. Is this correct? Suggestions appreciated.
A relation connects entities, so it doesn't make sense to say that "colorDetails" applies "to the entire Details entity". Your set up looks okay to me.