Entity Relationship Diagrams
E-R Diagrams
www.mbedlabs.com 1
Entity Relationship Diagrams
• ER diagrams defines the conceptual views of Database.
• Represents real time Entity and relationship among entities.
• Elements of ER Diagrams
1. Entity
Entities in a school database
www.mbedlabs.com 2
Entity Relationship Diagrams
2. Attributes – Properties of Entity
2.1 Simple Attributes
2.2 Composite Attributes
2.3 Multivalued Attributes 2.4 Derived Attributes
www.mbedlabs.com 3
Entity Relationship Diagrams
3. Relationships - Association among entities
One-to-one One-to-many
Many-to-one Many-to-many
www.mbedlabs.com 4
Classification of ER Diagrams
• Entity set
• An entity or group of entities with same set of attributes.
• An instance of this entity set (class) is entity type (object)
• Relationship set
• A set of similar relationship between entity types of entity set.
• Attribute Set
• An attribute or collection of attributes that uniquely identifies an entity among entity set.
• Cardinality
• the number of entities in one entity set which can be associated to the
number of entities of other set via relationship set.
www.mbedlabs.com 5
Cardinality Types
One-to-one relation
One-to-many relation
Many-to-one relation
Many-to-one relationwww.mbedlabs.com 6
• Generalization
• process of generalizing entities
• based on attributes
• Specialization
• a group of entities is divided into sub-groups
• based on attributes
• Inheritance
• the attributes of higher-level entities are inherited by the lower level entities.
Generalization
InheritanceSpecialization
www.mbedlabs.com 7
Example of ER Diagram
www.mbedlabs.com 8
Thank you
www.mbedlabs.com 9

Entity Relationship diagrams - ER diagrams

  • 1.
    Entity Relationship Diagrams E-RDiagrams www.mbedlabs.com 1
  • 2.
    Entity Relationship Diagrams •ER diagrams defines the conceptual views of Database. • Represents real time Entity and relationship among entities. • Elements of ER Diagrams 1. Entity Entities in a school database www.mbedlabs.com 2
  • 3.
    Entity Relationship Diagrams 2.Attributes – Properties of Entity 2.1 Simple Attributes 2.2 Composite Attributes 2.3 Multivalued Attributes 2.4 Derived Attributes www.mbedlabs.com 3
  • 4.
    Entity Relationship Diagrams 3.Relationships - Association among entities One-to-one One-to-many Many-to-one Many-to-many www.mbedlabs.com 4
  • 5.
    Classification of ERDiagrams • Entity set • An entity or group of entities with same set of attributes. • An instance of this entity set (class) is entity type (object) • Relationship set • A set of similar relationship between entity types of entity set. • Attribute Set • An attribute or collection of attributes that uniquely identifies an entity among entity set. • Cardinality • the number of entities in one entity set which can be associated to the number of entities of other set via relationship set. www.mbedlabs.com 5
  • 6.
    Cardinality Types One-to-one relation One-to-manyrelation Many-to-one relation Many-to-one relationwww.mbedlabs.com 6
  • 7.
    • Generalization • processof generalizing entities • based on attributes • Specialization • a group of entities is divided into sub-groups • based on attributes • Inheritance • the attributes of higher-level entities are inherited by the lower level entities. Generalization InheritanceSpecialization www.mbedlabs.com 7
  • 8.
    Example of ERDiagram www.mbedlabs.com 8
  • 9.