Presentation is loading. Please wait.

Presentation is loading. Please wait.

Entity Relationship Diagram

Similar presentations


Presentation on theme: "Entity Relationship Diagram"— Presentation transcript:

1 Entity Relationship Diagram

2 ER Diagram Usage Able to describe just about any system, ER diagrams are most often associated with complex databases that are used in software engineering and IT networks. ER diagrams are frequently used during the design stage of a development process in order to identify different system elements and their relationships with each other.

3 History for EDR ER diagrams are visual tools that are used in the Entity-Relationship model initially proposed by Peter Chen in 1976 Entities are data objects that maintain different relationships with each other. Additionally, entities are also described further using attributes.

4 Symbols for ERD There are three basic elements in an ER Diagram: entity, attribute, relationship. There are more elements which are based on the main elements, are weak entity, multivalued attribute, derived attribute, weak relationship and recursive relationship.

5 Entity Entity : An entity can be a person, place, event, or object that is relevant to a given system. For example, a school system may include students, teachers, major courses, subjects, fees, and other items. Entities are represented in ER diagrams by a rectangle and named using singular nouns. Weak Entity : A weak entity is an entity that depends on the existence of another entity.

6 Attribute Attribute: An attribute is a property, trait, or characteristic of an entity, relationship, or another attribute. For example, the attribute Inventory Item Name is an attribute of the entity Inventory Item. An entity can have as many attributes as necessary. Meanwhile, attributes can also have their own specific attributes.

7 Multivalued Attribute
Multivalued Attribute : If an attribute can have more than one value it is called an multivalued attribute. It is important to note that this is different to an attribute having its own attributes. For example a teacher entity can have multiple subject values. Derived Attribute : An attribute based on another attribute. This is found rarely in ER diagrams. For example for a circle the area can be derived from the radius.

8 Relationship Relationship : A relationship describes how entities interact. For example, the entity “carpenter” may be related to the entity “table” by the relationship “builds” or “makes”. Relationships are represented by diamond shapes and are labeled using verbs. Recursive Relationship : If the same entity participates more than once in a relationship it is known as a recursive relationship. An employee can be a supervisor and be supervised, so there is a recursive relationship.

9 Entity-Relationship Modeling
E-R data model is a high level conceptual model that describes data as entities, attributes, and relationships. The data modeling process is iterative: You start putting some ideas together, then the process reveals some problems in your thinking.  So, you go back and rework your ideas.

10 Entity-Relationship Diagrams
E-R diagrams enable designers and users to express their understanding of what the planned database is intended to do and how it might work, and to communicate about the database through a common language.

11 Examples of E-R Diagram Symbols

12 Entity Classes and Attributes
Entity Class are represented by rectangles Attributes are represented by ovals Key attribute is represented by an underline Multivalued attributes is represented with an oval with a double border Derived attribute is represented with an oval dashed border -- Example the AGE from current - birth Composite attribute is represented with an oval that connects to additional ovals

13 Ex1:E-R Diagram for Entity Class Customer

14 Relationship Types and Constraints
A relationship type is represented by a diamond and two connecting lines. The name of the relationship is shown inside the diamond.  Reading the diagram from left to right to yields "a store owns a video"..

15 E-R Diagram for the Owns Relationship Type
Now we add cardinality constraints.  The relationship type is one-to-many.  That is, a store may own many videos and a video may be own by no more than one store.

16 Modeling Rentals as a Relationship Type
A relationship between the customer and the video is created when the customer rents the video.  The relationship is removed when the customer returns the video.

17 Many-to-Many

18 Ex:

19 Ex


Download ppt "Entity Relationship Diagram"

Similar presentations


Ads by Google