Entity relationship model

13
ENTITY- RELATIONAL MODEL 7/5/22

Transcript of Entity relationship model

Page 1: Entity relationship model

ENTITY-RELATIONAL MODELMonday, May 1, 2023

Page 2: Entity relationship model

LEARNING OUTCOMES:At the end of the lesson I should be able to:a.Define entities, attribute, and

relationshipb.Identify objects around an entity sets and

relationship that exit between them

Page 3: Entity relationship model

Entity-relationship is a graphical representation of entities and their relationship to each other.Entity-relationship diagrams are used to:1. Identify data that must be

captured, stored and retrieved in order to support the business activities performed by an organization and,

2. Identify the data required to drive and report on the performance measures that an organization should be monitoring.

Page 4: Entity relationship model

COMPONENTS OF ENTITY-RELATIONSHIP

These components include:1.Entities2.Attributes3.Relationship

Page 5: Entity relationship model

ENTITIESThese are objects or concepts within the data model.

Page 6: Entity relationship model

ATTRIBUTES An attribute is unique distinguishing characteristic of an entity.

Page 7: Entity relationship model

RELATIONSHIP A relationship is an association among the instances of one or more entity types that is of interest to the organization. E.g.1.Employees work in a department2.Teachers teaches subjects3.Lawyers advice clients4.Equipment is allowed to project5.Truck is a type of vehicle

Page 8: Entity relationship model

CARDINALITYThe cardinality defines the relationship between entities in terms of numbers.

Don’t write this (NB): The degree of relationship (also known as cardinality) is the number of occurrences in one entity which are associated (or linked) to the number of occurrences in another.

Page 9: Entity relationship model

TYPES OF CARDINALITYThere are three cardinalities that can exit between two entities:1.One-to-one relationship (1:1)2.One-to-many relationship (1:M)3.Many-to-many relationship (M:N)

Page 10: Entity relationship model

ONE-TO-ONE RELATIONSHIP (1:1)

This is where one occurrence of an entity relates to only one occurrence in another entity.

Page 11: Entity relationship model

ONE-TO-MANY RELATIONSHIP(1:M)

Is where one occurrence in an entity relates to many occurrences in another entity.

Page 12: Entity relationship model

MANY-TO-MANY (M:N)This is where many occurrences in an entity relate to many occurrences in another entity.

Page 13: Entity relationship model

ASSIGNMENTRead up the topic: “relational models” (see pages 71 to 81).