Creating ER Diagrams with Visio 2010



Similar documents
A Short Tutorial on Using Visio 2010 for Entity-Relationship Diagrams

Select the Crow s Foot entity relationship diagram (ERD) option. Create the entities and define their components.

Preview DESIGNING DATABASES WITH VISIO PROFESSIONAL: A TUTORIAL

Microsoft Office PowerPoint Creating a new presentation from a design template. Creating a new presentation from a design template

Microsoft Word 2010 Prepared by Computing Services at the Eastman School of Music July 2010

Introduction to Visio 2003 By Kristin Davis Information Technology Lab School of Information The University of Texas at Austin Summer 2005

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Excel 2007 Basic knowledge

MICROSOFT WORD TUTORIAL

Creating Database Model Diagrams in Microsoft Visio Jeffery S. Horsburgh

STC: Descriptive Statistics in Excel Running Descriptive and Correlational Analysis in Excel 2013

Working with Visio Connectors

Clip Art in Office 2000

Microsoft Word Quick Reference Guide. Union Institute & University

Creating a table of contents quickly in Word

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Making a Poster Using PowerPoint 2007

Microsoft Word 2010 Tutorial

Creating a Poster Presentation using PowerPoint

Scientific Graphing in Excel 2010

Publisher 2010 Cheat Sheet

Microsoft Excel Basics

Create a Poster Using Publisher

Creating a Poster in PowerPoint A. Set Up Your Poster

Microsoft Word 2013 Tutorial

Basic Excel Handbook

Word Processing programs and their uses

Word 2010: The Basics Table of Contents THE WORD 2010 WINDOW... 2 SET UP A DOCUMENT... 3 INTRODUCING BACKSTAGE... 3 CREATE A NEW DOCUMENT...

As in the example above, a Budget created on the computer typically has:

Enhanced Formatting and Document Management. Word Unit 3 Module 3. Diocese of St. Petersburg Office of Training Training@dosp.

Guide To Creating Academic Posters Using Microsoft PowerPoint 2010

Microsoft PowerPoint 2010 Handout

Microsoft Office PowerPoint 2013

User Guide. Opening secure from the State of Oregon Viewing birth certificate edits reports in MS Excel

Printing Solutions for Word Printing Solutions for Word Printing Solutions for Word Printing Solutions for Word 2003

Instructions for Formatting MLA Style Papers in Microsoft Word 2010

Using Microsoft Word. Working With Objects

Creating a PowerPoint Poster using Windows

Access II 2007 Workshop

Excel -- Creating Charts

MS Word 2007 practical notes

Advanced Presentation Features and Animation

DOING MORE WITH WORD: MICROSOFT OFFICE 2010

Microsoft Office Excel 2007 Key Features. Office of Enterprise Development and Support Applications Support Group

As in the example given, a Newsletter created on the computer typically has: A title that explains what sort of information is in the newsletter

Microsoft Migrating to Word 2010 from Word 2003

HOUR 9. Formatting Worksheets to Look Great

Beginning Microsoft Word XP

CREATING POSTERS WITH POWERPOINT

Basic Microsoft Excel 2007

TLMC WORKSHOP: THESIS FORMATTING IN WORD 2010

Excel Project Creating a Stock Portfolio Simulation

Maximizing the Use of Slide Masters to Make Global Changes in PowerPoint

Introduction To Microsoft Office PowerPoint Bob Booth July 2008 AP-PPT5

Creating tables of contents and figures in Word 2013

Quick Start Guide. Microsoft Publisher 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve.

Search help. More on Office.com: images templates

Check out our website!

Microsoft Word 2010 Tutorial

KB COPY CENTRE. RM 2300 JCMB The King s Buildings West Mains Road Edinburgh EH9 3JZ. Telephone:

MICROSOFT ACCESS 2007 BOOK 2

How to use Wireframe in Visio

Web GIS User Guide MainStreetGIS, LLC

I ntroduction. Accessing Microsoft PowerPoint. Anatomy of a PowerPoint Window

Excel 2003 A Beginners Guide

Google Sites. How to create a site using Google Sites

Microsoft Excel 2013: Charts June 2014

Personal Portfolios on Blackboard

ECDL. European Computer Driving Licence. Spreadsheet Software BCS ITQ Level 2. Syllabus Version 5.0

In this session, we will explain some of the basics of word processing. 1. Start Microsoft Word 11. Edit the Document cut & move

CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS

Excel 2007 A Beginners Guide

Intro to Excel spreadsheets

Decreases the magnification of your chart. Changes the magnification of the displayed chart.

WHAT S NEW IN WORD 2010 & HOW TO CUSTOMIZE IT

Microsoft Office 2010 Publisher

PowerPoint 2007 Basics Website:

Microsoft Word 2007 Module 1

ITS Training Class Charts and PivotTables Using Excel 2007

CONSTRUCTING SINGLE-SUBJECT REVERSAL DESIGN GRAPHS USING MICROSOFT WORD : A COMPREHENSIVE TUTORIAL

PowerPoint: Design Themes and Slide Layouts Contents

How to Use Excel 2007

Setup CMS 1500 (02/12) Claim Form

Click on various options: Publications by Wizard Publications by Design Blank Publication

Introduction to Microsoft Word 2008

Q&As: Microsoft Excel 2013: Chapter 2

New Features in Microsoft Office 2007

PowerPoint 2013: Basic Skills

HIT THE GROUND RUNNING MS WORD INTRODUCTION

Microsoft Word 2011: Create a Table of Contents

Excel 2003 Tutorial I

Sharing Files and Whiteboards

Instructions for Formatting APA Style Papers in Microsoft Word 2010

9 CREATING REPORTS WITH REPORT WIZARD AND REPORT DESIGNER

National RTAP Marketing Transit Toolkit Customizing Templates in Microsoft Publisher

Creating tables in Microsoft Access 2007

GUIDELINES FOR PREPARING POSTERS USING POWERPOINT PRESENTATION SOFTWARE

CREATING FORMAL REPORT. using MICROSOFT WORD. and EXCEL

Producing Presentations A Beginner's Guide to PowerPoint

Transcription:

Creating ER Diagrams with Visio 2010 Mote s Notes 9/12/2012 Microsoft Visio is a popular business drawing program that can be used to quickly create a wide rage of diagrams: building blueprints, street maps, organizational charts, project timelines, process flow diagrams, software flowcharts, network diagrams,... This document will illustrate the creation of crow's foot ER diagrams with the Professional Edition of Visio 2010. This version of Visio is installed on all computers in the McCombs labs. It can also be downloaded at no cost to your own Windows computer. Getting Started To launch Visio in the McCombs lab, select Start / All Programs / Lab COE Software / Microsoft Office / Microsoft Visio 2010. You will then need to either open an existing Visio file or identify a template category for a new drawing. For this example, we will create a new drawing with the Software and Database category and the Database Model Diagram template. A template (stencil) is simply a set of common shapes and connectors used in the type of drawing specified. Some templates only have a couple of shapes while others have dozens. Visio lets you use 1

multiple templates on the same drawing if necessary. Only one template will be necessary to draw our ER diagrams. Visio will then give you a blank worksheet (like graph paper) and the template containing the basic shapes and connectors for the chosen drawing type. Most crow's foot ER diagrams can be created with just two of the seven basic database shapes and connectors: entity and relationship. 2

If your initial worksheet appears in the portrait orientation, you might want to rotate it to landscape orientation to make more effective use of your rectangular screen. To do this, select the Page Setup option from the Design menu tab. In addition to the worksheet orientation, Page Setup allows you to change the scaling, paper size, margins, layout and routing behavior, etc. 3

Entities Begin creating your ER diagram by dragging the Entity (table) shape from the template to the worksheet. You can reposition it at any time. You can delete any shape by selecting it and pressing the delete key. If the drawing is too small to view, you can zoom in with the slider control in the bottom right corner of the Visio window. This doesn't change the actual size of the drawing when you print it; it simply allows you to have a close up view when you are working on it. 4

Click the entity to view/edit its name, columns, primary key, secondary indices, etc. Change the default name (Table1) of the entity to its proper name (e.g., tblparent). Visio allows you to specify different physical and conceptual names for each entity. Since the Sync Name property has been selected, you only need to enter one new name for the table. 5

Switch to the Columns (fields) category of properties. Enter the names of the fields. Visio automatically assigns a default data type/size of ten character text to all new columns. If desired, you can change the columns to their proper data types and sizes. Indicate the appropriate Required and Primary Key (PK) properties for each field. Notice that Visio automatically underlines the SSN key field and moves it to the top of the diagram. We will change this field shuffling behavior later. 6

The three required fields of the table are shown in boldface and the two optional fields are shown in standard face. You can change the font size by selecting the entity then picking a size from the Home menu tab. You can also change the font family, color, alignment, etc. 7

Relationships Follow the same basic steps to create a second table. Notice that the tblchild table in this example has two social security number fields. SSN is the ID for the child and MotherSSN is the ID for the child's mother. MotherSSN will be a foreign key (pointer) to tblparent. Drag the Relationship connector from the template to a blank space in your worksheet. By default, relationships appear as simple arrows. We will change to the crow's foot style later. 8

Click the end of the relationship connector with the arrowhead. Drag it over tblparent until the border turns red. Drag the other end of the relationship connector over tblchild until it turns red. It is very important that you connect the tables in the proper direction. The arrowhead must be on the oneside (i.e., parent-side) and the tail must be on the many-side (i.e., child-side) of the relationship. Remember: In Codd's relational database model, children point to their parents. Parents do not point to their children. It takes a sharp eye to realize that something has gone wrong. Do you see it? When the relationship was created between tblparent and tblchild, Visio assumed SSN was to be used as the matching field in both tables. Unfortunately, that assumption is only half right. SSN in tblparent is supposed to match MotherSSN in tblchild. To correct this foreign key mistake, click the relationship. 9

Highlight SSN in tblparent and MotherSSN in tblchild, then click the Associate button. Now MotherSSN correctly appears as a foreign key that links each child record to its parent. 10

Fine-tuning the Drawing Many of the basic drawing style options can be accessed from Display Options in the Database menu tab. The General tab lets you select the IDEF1X or Relational symbols. It also lets you select which set of entity names to display. The Table tab lets you select the items to display (e.g., PK, FK, secondary indices, non-key fields, data types). You can also elect to display the primary key fields at the top of each entity or in their actual physical order. Select the Physical Order option in order to have the two SSN fields displayed in their original (third) positions instead of at the top of tblparent and tblchild above the horizontal lines. 11

The Relationship tab lets you display the relationships as arrows or as crow's feet. Select the Crow's Feet option. Notice that the mother-child relationship is shown as mandatory on the one-side and optional on the many-side. We will see how to change this later. Create a new FatherSSN field in tblchild, then create a one-to-many relationship between SSN and FatherSSN. 12

This illustrates one of the problems encountered with more complex ER diagrams. In particular, our drawing has two parallel relationships that appear identical. We know that one represents the motherchild relationship and the other represents the father-child relationship, but the difference isn't particularly clear in the simple diagram. Visio offers a solution. It lets you add simple labels to individual relationships. To do this, click a relationship, then enter a descriptive name. In order to minimize unnecessary clutter in your drawing, you might want to use short relationship labels like Mom and Dad. Open the Display Options from the Database menu tab, then select the Show Physical Name option from the Relationship tab. 13

Now the Mom and Dad labels appear on the appropriate relationships. By default, the one-to-many relationships were created as mandatory on the one-side and optional on the many-side. You can change this on a case-by-case basis by clicking the appropriate relationship. For instance, you can force every tblparent record to have at least one child by changing the mother relationship to One or More cardinality. You can force every parent to have between two and five children by selecting the Range cardinality then specifying the At Least and At Most frequencies. 14

Initially, the mother and father relationships were defined as mandatory on the one-side because MotherSSN and FatherSSN were defined as required fields. If you want to allow a child to not have a father, then de-select the Req'd checkbox for FatherSSN. Now the relationship is optional in both directions. Wrapping Up Select Save or Save As from the File menu tab when you are finished with your ER diagram. Note that Visio will use VSD as the extension for all drawing files. If you wish, you can also save your drawing as a PDF, JPG, GIF, etc. Of course, you cannot edit these non-vsd files at a later point, but they can be handy if you want to print your drawing on a computer that does not have Visio. 15