Search This Blog

Loading...

Sep 5, 2010

ER Diagram


Sponsored Links:
ER Diagram (Entity relationship Model) is most powerful tool for data modeling used to show conceptual representation of data. We can represent overall logical structure of database using ERD. An ERD is often used as a way to visualize a relational database: each entity represents a database table, and the relationship lines represent the keys in one table that point to specific records in related tables.The components of E-R Model are:
  • Entity
  • An Entity Set
  • Attribute
  • Relationship and Relationship set 
Entity: An Entity is an object that exists and differentiate from other objects. For example James with SSN 1 is an entity and can be identified as unique. It represented by an Rectangle Box.
image
Entity Set: Is a set of same type entities. For example All employees having an SSN number.
Attribute:  An entity is represented by set of attributes. Example name, SSN, age are the attribute for “Employee” entity. Ellipses representing attributes.
image
Relationship/ Relationship Set:  Association between two or more entities and relationship set is a collection of relationship of the same type. Relationship lines indicate that each instance of an entity may have a relationship with instances of the connected entity, and vice versa. Diamonds representing relationship sets.
image
A relationship set may involve more than two entity sets as shown in figure below. The entity sets customers, loans and branches may be linked by a relationship “Borrow” which indicates that a customer may avail loan from a particular branch of bank.
image

Follow by Email