Data Modeling Process
Determining identifiers (key attribute)
Specifying attributes, and
Specifying cardinality & participation
Specifying specialization & generalization
concepts is necessary
2 Fakultas Ilmu Komputer UI
Entity – a class of persons, places, objects,
events, or concepts about which we need to
capture and store data.
Named by a singular noun
Persons: agency, contractor, customer,
department, division, employee, instructor,
Places: sales region, building, room,
branch office, campus.
Objects: book, machine, part, product, raw material, software
license, software package, tool, vehicle model, vehicle.
Events: application, award, cancellation, class, flight, invoice,
order, registration, renewal, requisition, reservation, sale, trip.
Concepts: account, block of time, bond, course, fund,
3 Fakultas Ilmu Komputer UI
Examine every combination of two entities
and see whether there is a possible
relationship between them
This is often documented using a matrix that lists the
entity names on both axes.
A symbol is entered at the intersection of each row and
column to indicate the existence of a possible
This technique becomes unusable if the model is large.
Look at the requirements documents to find
relationships indicated by the documents.
The two techniques can be used together
4 Fakultas Ilmu Komputer UI
One or more attributes can serve as the entity
identifier, uniquely identifying each entity
Concatenated identifier consists of several
5 Fakultas Ilmu Komputer UI
Attribute – a descriptive property or
characteristic of an entity. Synonyms
include element, property, and field.
Just as a physical student can have
attributes, such as hair color, height, etc.,
a data entity has data attributes
Compound attribute – an attribute that
consists of other attributes. Synonyms in
different data modeling languages are
numerous: concatenated attribute,
composite attribute, and data structure.
6 Fakultas Ilmu Komputer UI
A domain is the set of valid data properties and values
for an attribute.
It can be imagined as the source of the possible
values of that attribute, including type definition,
initial value and value constraints.
The use of domains allows attributes to inherit the
properties of their assigned domains, and also allows
the database administrator to change attribute
properties by changing the domain properties.
Domains can thus be used to enforce data standards
throughout the model.
Some organizations use data dictionaries to
document and standardize domains and their
7 Fakultas Ilmu Komputer UI
refers to the number of times instances
in one entity can be related to instances
in another entity
One instance in an entity refers to one and only one
instance in the related entity (1:1)
One instance in an entity refers to one or more
instances in the related entity (1:N)
One or more instances in an entity refer to one or more
instances in the related entity (M:N)
8 Fakultas Ilmu Komputer UI
Sometimes called modality
Refers to whether or not an instance of
a child entity can exist without a
related instance in the parent entity
Not Null means that an instance in the related entity
must exist for an instance in another entity to be valid
Null means that no instance in the related entity is
necessary for an instance in another entity to be valid
9 Fakultas Ilmu Komputer UI
ERD - Design Guidelines
Best practices rather than rules
Entities should have many occurrences
Avoid unnecessary attributes
Clearly label all components
Apply correct cardinality and modality
Break attributes into lowest level needed
Labels should reflect common business terms
Assumptions should be clearly stated
10 Fakultas Ilmu Komputer UI
A conceptual schema is a complete logical
view of the database.
An implementational schema shows physical
storage using a particular product or
In E-R modeling, an attribute may be either
composite or multi-value, but it cannot be
The degree of a relationship is expressed as
the relationship’s maximum cardinality
All weak entities must have a minimum
cardinality of 1 on the entity on which it
11 Fakultas Ilmu Komputer UI
The representation of a particular entity is called a(n)
a. entity class
b. entity relationship
c. entity instance
d. entity attribute
e. None of the above.
Supertype / subtype entities are said to have a(n)
12 Fakultas Ilmu Komputer UI
Multiple Choice (cont)
In terms of generalization hierarchies, the
characteristic of “inheritance” means that:
a. the attributes of an instance of the supertype include
the attributes of the subtype.
b. an instance of the supertype must belong to one of
c. the attributes of an instance of the subtype include
the attributes of the supertype.
d. there is a redundant relationship among instances of
e. the attributes of different subtypes must not overlap
with each other.
13 Fakultas Ilmu Komputer UI
Multiple Choice (cont)
Minimum cardinality refers to …….
a. the most instances of one entity class that can be
involved in a relationship with one instance of
another entity class
b. the minimum number of entity classes involved in a
c. whether or not an instance of one entity class is
required to be related to an instance of another entity
d. whether or not an entity is a weak entity
e. None of the above.
14 Fakultas Ilmu Komputer UI
Fill in blank
In a generalization hierarchy, the ……..entity
contains the attributes that are common to
Generalization hierarchies have a
characteristic called …….which means that
entities in the subtypes have all the attributes
of the supertype.
Relationships among entities of a single
entity are sometimes called ….. Relationships
When designing a data model the users’ views
must be translated into the developers’
15 Fakultas Ilmu Komputer UI
A company database needs to store information about
employees (identifed by ssn, with salary and phone as
attributes), departments (identifed by dno, with dname
and budget as attributes), and children of employees
(with name and age as attributes). Employees work in
departments; each department is managed by an
employee; a child must be identi.ed uniquely by name
when the parent (who is an employee; assume that
only one parent works for the company) is known. We
are not interested in information about a child once the
parent leaves the company.
Draw an ER diagram that captures that information.
16 Fakultas Ilmu Komputer UI
Addition to Group Presentation on Monday
Each of the clinics in the hospital is identified by a unique
name. There are two types of clinics: Local and distant.
Clinics located at the main campus of the hospital are local
and the remaining ones are distant. Some distant clinics are
jointly operated by another health institution XYZ
Healthcare. A director is responsible for each clinic. The
director is also a doctor. Each doctor may serve as the
director of one and only one clinic but may serve as the
assistant director of another (one) clinic. There are a large
number of laboratories at the hospital; some labs are
managed by one clinic, whereas others are managed jointly
by two or more clinics. Doctors are assigned to one clinic;
each clinic has many doctors. Each patient is assigned to one
primary doctor. A doctor takes care of many patients. Each
patient has a number of tests done at a number of labs; each
lab can carry out a number of tests.
Draw an EER Diagram
17 Fakultas Ilmu Komputer UI