TVisioTutorial

  • Upload
    8256

  • View
    223

  • Download
    0

Embed Size (px)

Citation preview

  • 8/3/2019 TVisioTutorial

    1/6

  • 8/3/2019 TVisioTutorial

    2/6

    3 Visio Basics

    3.1 Download and Installation

    MS Visio can be downloaded or checked out from the Web site:http://msdn04.e-academy.com/elms/Storefront/Home.aspx?campus=unc_lis

    If you have any problem, please contact SILS technical support Email: mailto:[email protected],Web: http://sils.unc.edu/itrc/its/index.html, or Phone: 962-8188.

    3.2 Startup

    After installation, you will find MS Visio under: START All Programs MicrosoftOffice Microsoft Office Visio 2007. Figure 2 shows the MS Visio interface after beingloaded:

    Figure 2: MS Visio startup

    3.3 Start a New Drawing

    To 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 diagrams 1, shown in Figure 3. For ER modeling, 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, which

    is useful for drawing database schemas, but not for conceptual ER modeling. In this tutorial, we rely on

    basic block shapes to draw ER diagrams.

    2

    http://msdn04.e-academy.com/elms/Storefront/Home.aspx?campus=unc_lismailto:[email protected]:[email protected]://sils.unc.edu/itrc/its/index.htmlhttp://sils.unc.edu/itrc/its/index.htmlhttp://sils.unc.edu/itrc/its/index.htmlmailto:[email protected]://msdn04.e-academy.com/elms/Storefront/Home.aspx?campus=unc_lis
  • 8/3/2019 TVisioTutorial

    3/6

    Figure 3: New Drawing with Block Shapes

    3.4 Basic Operations

    If you like, select 100% from the Zoom dropdown box on the toolbar or select 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 on the shape to edit its label/text;

    Resize a shape: Click on the shape to select and drag a selection handle (green smallrectangles on the borders). Drag a corner handle to resize proportionally (Figure 4(a)).

    Rotate a shape: Drag the rotation handle of a selected 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 position, select the shape anduse the four direction arrow keys (Right/Left/Up/Down) to move the selected shape.

    Select multiple shapes: Starting from a blank area, mouse down and drag a dottedrectangle to cover FULLY all shapes you want to select. A shape is not selected if it

    is 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 more formatting and shape options.

    Tips: Look at toolbar icons for quick access to options, e.g., background color, linepattern/thickness, etc (Figure 5). This is useful especially when you have to repeat variousoperations.

    3

  • 8/3/2019 TVisioTutorial

    4/6

    (a) Resize (b) Connect two shapes

    Figure 4: Illustration of Operations

    Figure 5: Useful Toolbar Icons, from left to right: Text Color, Line Color, Fill Color, Line

    Weight, Line Patter, and Line Ends.

    4 ER-specific Operations

    4.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 Shapes

    For 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 drawn. Similar techniques can be applied to the others.

    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 Shapes

    If you need a shape with dotted/dashed borders (e.g., a DERIVED ATTRIBUTE), simplyselect the shape 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

  • 8/3/2019 TVisioTutorial

    5/6

    (a) Larger box (b) Smaller Box (c) Group/combine

    Figure 6: Draw a double-lined shape

    4.4 Connect Two Shapes

    Drag 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 Connector,Straight Connector, or Curved Connector.

    4.5 Key Attribute

    Draw 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 shapes selected);

    Ctrl + N: to new a drawing;

    Ctrl + U: to underline text;

    Ctrl + Shift + R/C/L: to align (text) right/center/left.

    5

  • 8/3/2019 TVisioTutorial

    6/6

    6 Practice

    6.1 Next Construction Example

    Workers 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 entities

    2. Establish attributes and keys (if possible)

    3. Check entities

    4. Establish relationships

    5. Establish cardinalities

    6. Identify aggregates

    7. Establish attributes for aggregates

    8. Check relationships

    9. Check model for completeness

    10. Transform to schema

    7 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.

    Computer-base training on Visio: http://cbt.unc.edu.

    6

    http://miksa.ils.unc.edu/courses/inls523/lectures/http://miksa.ils.unc.edu/courses/inls523/lectures/http://cbt.unc.edu/http://cbt.unc.edu/http://miksa.ils.unc.edu/courses/inls523/lectures/