Applies ToGói Visio 2 Gói Visio 1 Visio Professional 2024 Visio Professional 2021 Visio Professional 2019 Visio Professional 2016 Visio Professional 2013

Use crow’s foot notations to illustrate the relationship between entities in a crow’s foot diagram. Entities are connected by lines, and symbols at either end of the line describe the cardinality of the relationship between the entities.

Because they are widely used and utilize only four symbols, crow’s foot notation diagrams help you communicate complex relationships in an easy-to-use format.

Create the diagram and entities

  1. In Visio, on the File menu, select New > Software, and then select Crow’s Foot Database Notation.

  2. Choose either Metric Units or US Units, and select Create.

  3. From the Crow’s Foot Database Notation stencil, drag an Entity shape onto the drawing page.

  4. Drag another Entity shape onto the drawing page to create a second entity.

  5. Drag a Relationship shape onto the drawing page to create the relationship line.

  6. To connect the entities, drag the left end of the relationship line to the first entity, and glue it to an attribute, a connection point, or the entire entity. Drag the other end of the relationship line, and glue it to the second entity.

  7. Set the cardinality symbols on both ends of the relationship line:

    • Right-click the relationship line, click Set Begin Symbol, and choose from the list. The default is Zero or more.

    • Right-click the relationship line again, click Set End Symbol, and choose from the list. The default is 1 and only 1.

      Set the end symbol.

You can adjust the width of an entity by selecting its border and then clicking and dragging its yellow handle. You can't manually adjust the height of an entity. The height is adjusted by the addition or subtraction of attributes:

  • To remove an unneeded attribute, select it and press Delete.

  • To add an attribute to an entity, drag an Attribute from the Shapes pane to the entity and then release the mouse key. Double-click the attribute name placeholder and enter a suitable name for the attribute.

Edit an entity's attributes

By default, the names of an entity's attributes are shown, but the type of each attribute is hidden from view.

A Crow's Foot entity in which the type of each attribute is hidden from view.

You can change this setting for any entity:

  1. Right-click the entity and select Show Attribute Types.

    A Crow's Foot entity in which the type of each attribute is visible.

  2. To change the type, point at the type name and single-click twice. A gray box appears around the type name to indicate it's selected.

  3. Enter the new type name. When you're done, press Esc (or click elsewhere on the entity) to save the change. 

Change the appearance of the crow’s foot notation

  1. Right-click the relationship line, and click Format Shape.

  2. Click Line in the right pane to expand the list.

  3. To change the color of the relationship line, click the icon next to Color, and select a color.

    Set the color of the Relationship line.

  4. Click Begin Arrow size or End Arrow size to change the size of the Begin and End symbols.

    Set the arrow size.

  5. To add text, select the relationship line and type the text.

Note: Creating and editing crow's foot database notation diagrams on Visio for the web requires a Visio Plan 1 or Visio Plan 2 license, which is purchased separately from Microsoft 365. For more information, contact your Microsoft 365 admin. If your admin has turned on "self-service purchasing," you can buy a license for Visio yourself. For more details, see Self-service purchase FAQ.

Create the diagram and entities

  1. Open Visio for the web and search for crow's foot.

  2. Select the Crow's Foot Database Notation diagram.

  3. In the dialog box, select either Metric Units or US Units.

  4. Select Create.

  5. The diagram opens. You should see the Shapes window next to the diagram. If you don’t see it, go to View > Task Panes and make sure that Shapes is selected. If you still don’t see it, click the Expand the Shapes window button on the left.

  6. From the Crow’s Foot Database Notation stencil, drag an Entity shape onto the drawing page.

  7. Drag another Entity shape onto the drawing page to create a second entity.

  8. Drag a Relationship shape onto the drawing page to create the relationship line.

  9. To connect the entities, drag the left end of the relationship line to the first entity, and glue it to an attribute, a connection point, or the entire entity. Drag the other end of the relationship line, and glue it to the second entity.

  10. Set the cardinality symbols on both ends of the relationship line:

    • Right-click the relationship line, click Set Begin Symbol, and choose from the list. The default is Zero or more.

    • Right-click the relationship line again, click Set End Symbol, and choose from the list. The default is 1 and only 1.

      Right-click the Relationship line, select Set Begin Symbol, and then select a cardinality setting from the list.

You can adjust the width of an entity by selecting its border and then clicking and dragging its yellow handle. You can't manually adjust the height of an entity. The height is adjusted by the addition or subtraction of attributes:

  • To remove an unneeded attribute, select it and press Delete.

  • To add an attribute to an entity, drag an Attribute from the Shapes pane to the entity and then release the mouse key. Double-click the attribute name placeholder and enter a suitable name for the attribute.

Edit an entity's attributes

By default, the names of an entity's attributes are shown, but the type of each attribute is hidden from view.

A Crow's Foot entity in which the type of each attribute is hidden from view.

You can change this setting for any entity:

  1. Right-click the entity and select Show Attribute Types.

    A Crow's Foot entity in which the type of each attribute is visible.

  2. To change the type, point at the type name and single-click twice. A gray box appears around the type name to indicate it's selected.

  3. Enter the new type name. When you're done, press Esc (or click elsewhere on the entity) to save the change. 

Shapes available in crow's foot database notation

Shape

Description

The Entity shape in Crow's Foot Database Notation.

Entity

An object, a component of data. It can be uniquely identified by its attributes and therefore it's independent of any other entity in the schema.   

The Entity With Attributes shape in Crow's Foot Database Notation.

Entity With Attributes

An object, a component of data. It can be uniquely identified by its attributes and therefore it's independent of any other entity in the schema. Includes a column for showing the data type of each attribute.

The Attribute shape in Crow's Foot Database Notation.

Attribute

A fact that describes an entity. Appears within the frame of the entity.

The Primary Key Attribute shape in Crow's Foot Database Notation.

Primary Key Attribute

An attribute that uniquely identifies a particular entity. 

The Primary Key Separator shape in Crow's Foot Database Notation.

Primary Key Separator

A horizontal line used to separate the primary key attribute from the other attributes of the entity. 

The Relationship shape in Crow's Foot Database Notation.

Relationship

Indicates the association between two strong entities. Its name is a verb that briefly describes the association. After you glue the relationship to the entities, right-click it to set options such as whether it is an "Identifying" relationship, and to set the symbols at each end of the connecting line. 

Strong and weak entities

  • A strong entity has a primary key, meaning that it can be uniquely identified by its attributes alone.

  • A weak entity is an entity that can't be uniquely identified by its attributes alone. It is existence-dependent on its parent entity. It must use a foreign key in conjunction with its attributes to create a primary key. Typically, the foreign key is the primary key of a strong entity that the weak entity is related to.

The relationship between two strong entities is simply called a relationship

The relationship between a strong entity and a weak entity is called a strong relationship.

Symbols in crow's foot notation

Crow's foot diagrams represent entities as boxes, and relationships as lines between the boxes. Different shapes at the ends of these lines represent the relative cardinality of the relationship. 

Three symbols are used to represent cardinality:

A ring represents "zero"

The ring symbol in Crow's Foot Notation.

A dash represents "one"

The dash symbol in Crow's Foot Notation.

A crow's foot represents "many" or "infinite"

The crow's foot symbol in Crow's Foot Notation.

These symbols are used in pairs to represent the four types of cardinality that an entity may have in a relationship. The inner element of the notation represents the minimum, and the outer element (closest to the entity) represents the maximum.

Description

Symbol

Ring and dash: Minimum zero, maximum one (optional)

The symbol for Zero or One, in crow's foot notation.

Dash and dash: Minimum one, maximum one (mandatory)

The symbol for One and Only One, in crow's foot notation.

Ring and crow's foot: Minimum zero, maximum many (optional)

The symbol for Zero or More, in crow's foot notation.

Dash and crow's foot: Minimum one, maximum many (mandatory)

The symbol for One or More, in crow's foot notation.

Tips for designing the diagram

  • Identify all the entities you need. Draw all of them in the diagram.

  • Determine which entities have relationships with each other, and connect them. (Not all entities will have relationships. Some may have multiple relationships.)

  • Each entity should appear only once in the diagram.

  • Look over the relationships you've drawn. Are there any redundant relationships? Are there any that are unnecessary or missing? 

Bạn cần thêm trợ giúp?

Bạn muốn xem các tùy chọn khác?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.