Entity relation(1)

Preview:

Citation preview

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.

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.

Why we design ER diagrams?

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.

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.

Symbols of ERD

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.

How to represent Entity

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.

How to represent Relationship

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).

How to represent Attribute

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.

Composite Attributes

Derived attributesDerived attributes are depicted by dashed ellipse.

Derived attributes

Multivalued attributes

Multivalued are depicted by double ellipse.

Multivalued attributes

Notations of ER diagram

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

One to One Relationship

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.

One to many Relationship

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.

Many to many Relationship

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

ER diagram of Internet Sales Model

Any Questions ??

Thank you for your attention!

Recommended