Database Systems: Data Modeling
Database Systems: Data Modeling
Data Modeling
Introduction
Entities
Relationships among entities
Attributes of both the entities and their
relationships
Entity
An entity is a
person, place, thing,
or event which an
organization wishes
to maintain data
about
Examples:
Student
Subject
Instructor
An entity is
represented by a
rectangle
STUDENT
SUBJECT
Attributes
An attribute is a
characteristic of an
entity
Sample attributes
of the STUDENT
entity
Name
ID Number
Address
Birthday
An attribute is
represented by an
ellipse
Name
ID_Num
STUDENT
Address
Birthday
Value of an Attribute
Attribute: Name
Values:
Juan De la Cruz
Brian Adams
Multivalued Attributes
Attributes having
more than one
value for each
entity instance
Example:
Hobby - a student
may have more
than one hobbies
A multivalued
attribute is
represented by a
double ellipse
Hobby
STUDENT
Composite Attributes
An attribute
broken into
component parts
Derived Attribute
Derived
from date employed and
current date
10
12
Relationship
A relationship is a
natural association
between the
instances of one or
more entities
Example:
enrolls - a student
enrolls in a subject
A relationship is
represented by a
diamond-shaped
symbol
STUDEN
T
enrolls
SUBJEC
T
Relationships may
also have attributes
13
Types of Relationship
One-to-one relationship
One-to-many relationship
Many-to-many relationship
14
Cardinality
Examples of Cardinality
16