Creating an Entity Relationship Diagram (ERD) with Microsoft Visio 2013 Part 1 Transcript

Print

Introduction

This video will show you how to create an Entity Relationship Diagram (ERD) with Microsoft Visio 2013. We’ll proceed through four steps. First, we’ll launch Visio and create a diagram. We’ll create a conceptual model diagram showing just the names and the relationships of the major entities. Then we’ll refine this into a logical data model diagram. In the logical data model, we’ll resolve any many-to-many relationships by transforming them into one-to-many relationships with associative entities. Finally we’ll complete our diagram by adding attributes, data types, and keys, and making sure it’s normalized.

The example we will use is a simplified database for storing information about movies. We’ll use just three major entities: Directors, Movies, and Actors. To keep things simple, we’ll use these business rules for how the entities are related:

  • Each Director directs zero or many Movies; each Movie is directed by exactly one Director.
  • Each Movie features one or many Actors; each Actor is featured in zero or many Movies.

A more realistic database would have more entities and somewhat more complex business rules; for example, we would probably allow for the possibility that a movie might have multiple co-directors. But we’ll work with these basic rules in this example.

Launching Visio and Creating a Diagram

If Visio 2013 is installed locally on your computer, you can launch it from the Start menu as you would any application; or you can launch it from the DeVry University Citrix server. Either way, you’ll see this screen to start. Click the Categories heading, select the Software and Database category, and then select the Crow’s Foot Database Notation diagram. Click Create to create the diagram.

Creating a Conceptual Data Model Diagram

First we’ll create a conceptual data model diagram that shows just our major entities and how they’re related. Double click the page tab at the lower left, change the page name to Conceptual-ERD, and press Return. Use the zoom control at the lower right to zoom in to see what you’re doing. For our conceptual model we’ll just regular rectangles for our entities instead of the Entity shapes from the stencil. Click the Rectangle tool on the Ribbon, then click and drag on the page to draw a rectangle.

Immediately after drawing the rectangle, type the label Directors and it will appear in the rectangle. Draw and label additional rectangles for Movies and Actors.

Next, add a relationship. Drag a relationship line from the Shapes area at the left and drop it on the page. Remember from our business rules that each Movie is directed by exactly one Director, but each Director can direct zero or many movies; so the relationship between Directors and Movies is one to many. Drag the end of the line with the “one” symbol (two bars) and connect it to Directors. Notice how the shape gets a colored outline when the line is connected; that’s how you know when to release the mouse button. Drag the “many” end of the line (with the crow’s foot symbol) and connect it to Movies. Type the verb phrase “direct” to label the relationship. The default symbols on this line represent “exactly one” and “zero or many”, so this relationship is correct as is.

Repeat the process to add a relationship line between Movies and Actors, and label it “feature.” From our business rules, each Movie features one or more actors, and each Actor is featured in zero or more Movies, so this is a many to many relationship. We need to change the symbols on the ends of this line. Right click on the line, choose Set Begin Symbol, and change it to 1 or More to reflect that each Movie features one or more Actors. Right click on the line again, choose Set End Symbol, and change it to Zero or More to reflect that each Actor is featured in zero or more Movies. Click away on a blank area of the page to de-select so you can see the line. The conceptual model diagram is now complete.

Next we’ll create a logical data model diagram that adds more detail. Click the plus sign at the bottom of the screen to add a second page for this diagram. Double-click the page tab and rename the page to Logical-ERD. Zoom in as needed. Instead of standard rectangles, this time we’ll use the Entity shape from the stencil for each entity. Drag an Entity shape onto the page. Click the Entity name box at the top and type the new name “Directors” to label the entity. Repeat this process for each of the other entities, Movies and Actors.

Add relationship lines between these entities, label the relationships, and set the correct beginning and ending symbols for the relationships, exactly as you did for the conceptual model diagram. Note that the entity shapes feature smaller shapes for attributes inside them. Make sure you connect your relationship lines to the outer shapes for the entities as a whole, not to an inner shape for an individual attribute.

[End of Audio]