Chapter 2 Data Merise
Chapter 2 Data Merise
II- RELATIONSHIP
one-to-many (1:*)
II- ER diagram symbols and notation
ELEMENTS IN ER DIAGRAMS
There are three basic elements in an ER Diagram: entity, attribute, relationship. There are
more elements which are
based on the main elements. They are weak entity, multivalued attribute, derived attribute,
weak relationship and
recursive relationship. Cardinality and ordinality are two other notations used in ER diagrams
to further
define relationships.
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. In more technical
terms it can defined as
an entity that cannot be identified by its own attributes. It uses a foreign key combined with
its attributed to form the
primary key. An entity like order item is a good example for this. The order item will be
meaningless without an
order so it depends on the existence of order.
Attributes in ER diagram, note that an attribute can have its own attributes ( composite
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.
Example4