What are Entity Relationship Diagrams

Document Sample
What are Entity Relationship Diagrams Powered By Docstoc
					What are Entity Relationship Diagrams?
Entity Relationship Diagrams (ERDs) illustrate the logical structure of databases.




An ER Diagram



Entity Relationship Diagram Notations



Peter Chen developed ERDs in 1976. Since then Charles Bachman and James Martin
have added some sligh refinements to the basic ERD principles.

Entity

An entity is an object or concept about which you want to store information.
Learn how to edit text on an entity.




Weak Entity

A weak entity is an entity that must defined by a foreign key relationship with another
entity as it cannot be uniquely identified by its own attributes alone.
Learn how to edit text on this object.
Key attribute

A key attribute is the unique, distinguishing characteristic of the entity. For example, an
employee's social security number might be the employee's key attribute.




Multivalued attribute

A multivalued attribute can have more than one value. For example, an employee entity
can have multiple skill values.




Derived attribute

A derived attribute is based on another attribute. For example, an employee's monthly
salary is based on the employee's annual salary.




Relationships

Relationships illustrate how two entities share information in the database structure.

Learn how to draw relationships:
First, connect the two entities, then drop the relationship notation on the line.




Cardinality

Cardinality specifies how many instances of an entity relate to one instance of another
entity.
Ordinality is also closely linked to cardinality. While cardinality specifies the occurences
of a relationship, ordinality describes the relationship as either mandatory or optional. In
other words, cardinality specifies the maximum number of relationships and ordinality
specifies the absolute minimum number of relationships.




Click here for more cardinality notations

To learn how to express cardinality in SmartDraw, click here.

Recursive relationship

In some cases, entities can be self-linked. For example, employees can supervise other
employees.




ERD Library

Use the SmartDraw explorer to find the ERD library located under Software Design and
Software.
The SmartDraw ERD library

To open the library, double-click on it or drag it to the drawing area.

Adding an ERD Symbol to Your Page

To add an ERD symbol to your page, click on it and without releasing the mouse, drag it
to the page.
Dragging an ERD symbol to the page

Connecting Entities

To connect two entities, select one of the line tools on the Toolbar by clicking on it once.
Now, your cursor should look like a pencil. Touch the pencil to the edge of the first
shape, click down, and without releasing the mouse, stretch the line to the edge of the
next shape until you see the anchor symbol.




Drawing the line between two entities



Connecting two symbols

If you don't see the anchor symbol, go to the Arrange menu and make sure Allow Lines
to Link is turned on.




Drawing ER Diagrams in SmartDraw - Part 2
Placing the Relationship Symbol
To add a relationship symbol between two entities, first draw the line connecting the two
entities. Then, drag a relationship symbol from the ERD library and drop it on the line.
(Make sure that Allow Shapes to Link to Lines is turned on under the Arrange menu.)




Dropping a relationship symbol on a line

If you're dropping a relationship symbol on a vertical line, it might not attach correctly.
To make sure the symbol retains its original angle of rotation, right-click on the line and
select Horizontally under Align Shapes and Text to Line.




Dropping a relationship symbol on a line

Drawing Cardinality and Ordinality Relationships

You can express cardinality and ordinality on an E-R diagram in a number of ways. For a
quick look at the different types of notations, click here.

Adding Arrows
You can represent cardinality and ordinality by adding arrowheads to the lines connecting
entities. To do so, select a line, go to Arrowheads under the Lines menu, and go to
More Styles under Arrowheads. Choose the appropriate arrowhead for the type of
relationship you want to illustrate.




Choose the arrowhead that represents the appropriate cardinality and ordinality


Cardinality Notations
Cardinality specifies how many instances of an entity relate to one instance of another
entity.

Ordinality is also closely linked to cardinality. While cardinality specifies the occurances
of a relationship, ordinality describes the relationship as either mandatory or optional. In
other words, cardinality specifies the maximum number of relationships and ordinality
specifies the absolute minimum number of relationships. When the minimum number is
zero, the relationship is usually called optional and when the minimum number is one or
more, the relationship is usually called mandatory.

There are many notation styles that express cardinality and they are all supported by
SmartDraw.

Information Engineering
Chen




Bachman
Martin




Tips for Effective ER Diagrams
1) Make sure that each entity only appears once per diagram.

2) Name every entity, relationship, and attribute on your diagram.

3) Examine relationships between entities closely. Are they necessary? Are there any
relationships missing? Eliminate any redundant relationships. Don't connect relationships
to each other.

4) Use colors to highlight important portions of your diagram.
Using colors can help you highlight important features in your diagram

5) SmartDraw makes it easy to share your software design diagram with others in a
business presentation or on the web.

      Export as GIF or JPEG for the web
      Publish to your free SmartDrawNet web space with just one click. Any hyperlinks
      in your drawings become working hyperlinks on the web—and interlinked pages
      become interlinked web sites!
      Export as HTML with working hyperlinks
      Copy & Paste into PowerPoint® or other Microsoft Office® Suite programs.

When you paste your diagram into another program (such as PowerPoint®), you can edit
it by simply double-clicking on the diagram in the other program. This opens the diagram
in SmartDraw for editing, and your changes will be updated in the other program
automatically.

6) Create a polished diagram by adding shadows and color. You can choose from a
number of ready-made styles in the Edit menu under Colors and Shadows, or you can
create your own.




To hide the shadow on an individual object, go to the Arrange menu and select Hide
Shadow.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:39
posted:7/3/2012
language:English
pages:10