Unformatted text preview:

GoalsER Symbols of NotationVisio BasicsDownload and InstallationStartupStart a New DrawingBasic OperationsER-specific OperationsBasic ER ShapesDouble-bordered ShapesDotted-bordered ShapesConnect Two ShapesKey AttributeUseful HotkeysPracticeNext Construction ExampleDesign Steps (from class 5 slides)Additional ResourcesA Tutorial on MS Visio for ER ModelingWeimao [email protected] of Information and Library ScienceUniversity of North Carolina at Chapel HillFebruary 24, 20091 Goals• to learn basic operations with MS Visio;• to create conceptual Entity Relation (ER) diagrams using Visio;2 ER Symbols of NotationFigure 1: ER Symbols13 Visio Basics3.1 Download and InstallationMS Visio can be downloaded or checked out from the Web site:http://msdn04.e-academy.com/elms/Storefront/Home.aspx?campus=unc_lisIf you have any problem, please contact SILS technical support – Ema il: mailto:[email protected],Web: http://sils.unc.edu/itrc/its/index.html, or Phone: 962-8188.3.2 StartupAfter installation, you will find MS Visio under: START → All Programs → Micr osoftOffice → Microsoft Office Visio 2 007. Figure 2 shows the MS Visio interface after beingloaded:Figure 2: MS Visio startup3.3 Start a New DrawingTo start a new drawing, select menu item “File → New. . . → New Drawing (US units)” orsimply press “Ctrl + N”.Then, select menu “File → Shapes → General → Block (US units)” to load shapesneeded to draw ER diagrams1, shown in Figure 3. For ER mo deling, we will rely on theseshapes: Box (for ENTITY), Diamond (for RELATIONSHIP), Circle (distorted to ellipse:for ATTRIBUTE), and Dynamic connector (line: for CARDINALITY/PARTICIPATIONnotation).1There is an option under “Shapes → Software and Database → Database → Entity Relationship”, whichis useful for drawing database schemas, but not for conceptual ER modeling. In this tutorial, we rely onbasic block shapes to draw ER diagrams.2Figure 3: New Drawing with Block Shapes3.4 Basic OperationsIf you like, select “100%” from the Z oom dro pdown box on the toolbar or selec t “View →Zoom → 100%” to view the actual size of the drawing sheet.• Add a shape: Drag a related icon from the Shapes panel on the left to the drawingsheet (white page);• Edit a label: Double click o n the shape to edit its label/text;• Resize a shape: Click on the shap e to select and drag a selection handle (green smallrectangles on the borders). Drag a cor ner handle to r e size proportio nally (Figure 4(a)).• Rotate a shape: Drag the rotation handle of a s e le c ted shape (a small green circlewhen a shape is selected, Figure 4 (a)).• Move a shape: Select and drag a shape to the position you want (automaticallysnapped to the closest grid lines). To fine tune the po sition, select the shape anduse the four direction arrow keys (Right/Left/Up/Down) to move the selected shape.• Select multiple shape s: Starting from a blank area, mouse down and dr ag a dottedrectangle to cover FULLY all shapes you want to select. A shape is not selected if itis partially covered by the selection rectangle. Or, you can hold down your Ctrl keyand select one shape at a time until you select all you want.• Format and options: right click for mor e formatting and shape options.Tips: Look at toolbar icons for quick acces s to options, e.g., background color, linepattern/thickness, etc (Figure 5). This is useful especially when you have to repeat variousoperations.3(a) Resize (b) Connect two shapesFigure 4: Illustration of OperationsFigure 5: Useful Toolbar Icons, from left to right: Tex t Color, Line Color, Fill Color, LineWeight, Line Patter, and Line Ends.4 ER-specific Operations4.1 Basic ER Shapes• Box for ENTITY;• Diamond for RELATIONSHIP;• Circle (resized to ellipse) for ATTRIBUTE;• Dynamic connector for CARDINALITY/PARTICIPATION;4.2 Double-bordered ShapesFor WEAK ENTITY, IDENTIFYING RELATIONSHIP, and MULTIVALUED ATTRIBUTE,we can combine two shapes to form a shape with double-lined borders. The following illus-trates how a weak entity can be dr awn. Similar techniques can be applied to the other s.1. Draw a larger Box and remove text/ label from it (Figure 6 (a));2. Draw a smaller Box, remove text from it, and move it on top of the larger Box (Figure 6(b));3. Select both, right click to select menu “Shape → Group” (Figure 6 (c)).4.3 Dotted-bordered Shap esIf you need a shape with dotted/dashed borders (e.g., a DERIVED ATTRIBUTE), simplyselect the s hape you have drawn and select the dotted line pattern using the Line Patterntoolbar icon (click on the small drop-down arrow of the icon, Figure 5).4(a) Larger box (b) Smaller Box (c) Group/combineFigure 6: Draw a double-lined shape4.4 Connect Two ShapesDrag a Dynamic connector to the drawing sheet and move one end to a connection pointof each shape you want to connect (Figure 4 (b)). The connection point will be activatedand the line end snapped to it (glued). Once glued, connections stay even when shapes aremoved.Double click the line to enter text, e.g., to define cardinality “1” or “N”/ “*” to the line.Right click on the line and select the type of line you like, e.g., Right-Angle Connecto r,Straight Connector, or Curved Connector.4.5 Key Att ributeDraw an attribute using the Circle shape and label it. Select the shape and click theUnderline toolbar icon (or simply press Ctrl + U). Or, you can draw a circle and a straight(horizontal) line and group them.5 Useful Hotkeys• Ctrl + D: to duplicate a selected shape (or multiple shap es selected);• Ctrl + N: to new a drawing;• Ctrl + U: to underline text;• Ctrl + Shift + R/C/ L: to align (text) right/ c e nter/left.56 Practice6.1 Next Construction ExampleWorkers are assigned to buildings to work on various assignments. Workers and buildingsare identified with unique identifiers. Workers can be assigned to more than one buildingand multiple workers can be assigned to a single building. Workers have various skills. [Seeclass 5 slides.]6.2 Design Steps (from class 5 slides)1. Establish entities2. Establish attributes and keys (if possible)3. Check entities4. Establish relationships5. Establish cardinalities6. Identify aggrega tes7. Establish attributes for aggregates8. Check relationships9. Check model for completeness10. Transform to schema7 Additional Resources• I have created a set of ER symbols in Visio, available at:http://miksa.ils.unc.edu/courses/inls523/lectures/.Feel free to reuse them.•


View Full Document

UNC-Chapel Hill INLS 523 - A Tutorial on MS Visio for ER Modeling

Download A Tutorial on MS Visio for ER Modeling
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view A Tutorial on MS Visio for ER Modeling and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view A Tutorial on MS Visio for ER Modeling 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?