29
History of ER (entity relationship) Diagram: Peter Chen developed ERDs in 1976. Since then Charles Bachman and James Martin have added some slight refinements to the basic ERD principles.

Entity relation(1)

Embed Size (px)

Citation preview

Page 1: Entity relation(1)

History of ER (entity relationship) Diagram:

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

Page 2: Entity relation(1)

ER (entity relationship) Diagram:

ER Model is represented by means of an ER diagram. Any object, for example, entities, attributes of an entity, relationship sets, and attributes of relationship sets, can be represented with the help of an ER diagram.

Page 3: Entity relation(1)

Why we design ER diagrams?

Page 4: Entity relation(1)

Why we design ER diagrams?

The software developer/analyst or database designer/analyst gains a better understanding of the information to be contained in the database through the process of constructing the ERD.The ERD serves as a documenting tool.

Page 5: Entity relation(1)

ER (entity relationship) Diagram:

There are three basic elements in ER-Diagrams:

Entities are the "things" for which we want to store information. An entity is a person, place, thing or event.

Attributes are the data we want to collect for an entity.

Relationships describe the relations between the entities.

Page 6: Entity relation(1)

Symbols of ERD

Page 7: Entity relation(1)

EntityAny object having attributes and their values from real word is entity. Entities are represented by means of rectangles. Rectangles are named with the entity set they represent.

Page 8: Entity relation(1)

How to represent Entity

Page 9: Entity relation(1)

RelationshipRelationships are represented by diamond-shaped box. Name of the relationship is written inside the diamond-box. All the entities (rectangles) participating in a relationship, are connected to it by a line.

Page 10: Entity relation(1)

How to represent Relationship

Page 11: Entity relation(1)

AttributeAttributes are the properties of entities. Attributes are represented by means of ellipses. Every ellipse represents one attribute and is directly connected to its entity (rectangle).

Page 12: Entity relation(1)

How to represent Attribute

Page 13: Entity relation(1)

Composite attributesIf the attributes are composite, they are further divided in a tree like structure. Every node is then connected to its attribute. That is, composite attributes are represented by ellipses that are connected with an ellipse.

Page 14: Entity relation(1)

Composite Attributes

Page 15: Entity relation(1)

Derived attributesDerived attributes are depicted by dashed ellipse.

Page 16: Entity relation(1)

Derived attributes

Page 17: Entity relation(1)

Multivalued attributes

Multivalued are depicted by double ellipse.

Page 18: Entity relation(1)

Multivalued attributes

Page 19: Entity relation(1)

Notations of ER diagram

Page 20: Entity relation(1)

One to One RelationshipFor example, if each customer in a database is associated with one mailing address.

Page 21: Entity relation(1)

One to One Relationship

Page 22: Entity relation(1)

One to many RelationshipFor example, a single customer might place an order for multiple products. The customer is associated with multiple entities, but all those entities have a single connection back to the same customer.

Page 23: Entity relation(1)

One to many Relationship

Page 24: Entity relation(1)

Many to many RelationshipFor example, at a company where all call center agents work with multiple customers, each agent is associated with multiple customers, and multiple customers might also be associated with multiple agents.

Page 25: Entity relation(1)

Many to many Relationship

Page 26: Entity relation(1)

The phase in which we need to design an ER diagramIn Designing phase we need to design ERDs.

Page 27: Entity relation(1)

ER diagram of Internet Sales Model

Page 28: Entity relation(1)

Any Questions ??

Page 29: Entity relation(1)

Thank you for your attention!