Sunday, September 19, 2010

E-R Diagram


What are Entity Relationship Diagrams?

Entity Relationship Diagrams (ERDs) illustrate the logical structure of databases.
An ER Diagram
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.
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.
Weak Entity
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.
Key attribute
Multivalued attribute
A multivalued attribute can have more than one value. For example, an employee entity can have multiple skill values.
Multivalued attribute
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.
Derived attribute
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.
Relationships
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.
Cardinality
Click here for more cardinality notations
Recursive relationship
In some cases, entities can be self-linked. For example, employees can supervise other employees.
Recursive relationship


Drawing ER Diagrams in SmartDraw

You can draw E-R diagrams in SmartDraw easily and quickly.

ERD Library
Use the SmartDraw explorer to find the ERD library located under Software Design and Software.
The SmartDraw ERD library
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
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
Drawing the line between two entities
Connecting two symbols
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.

http://www.smartdraw.com/downloads

For Watch Video

http://www.smartdraw.com/specials/sd/watch-video.htm?id=35545&gclid=CLr24brBk6QCFdRA6wodwhnhHg



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
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.
An ER diagram created using the Blues style in SmartDraw
To hide the shadow on an individual object, go to the Arrange menu and select Hide Shadow.