Professional Documents
Culture Documents
611a39231265660010ce8df9-1629109230-Module 1 - Lesson 1 Part 2
611a39231265660010ce8df9-1629109230-Module 1 - Lesson 1 Part 2
ER model stands for an Entity-Relationship model. It is a high-level data model. This model is used to
define the data elements and relationship of a particular system. It gives an overview of a conceptual
database design for a very simple and easy viewing of data. In ER modeling, the database structure is
portrayed as a diagram called an entity-relationship diagram.
There are three components of ER diagram which mainly consist of an entity, attribute, and relation. These
will be discussed in detail below.
➢ Weak Entity: On the contrary, there are also weak entities. An entity that is dependent on another
entity is called a weak entity. This entity type does not contain any key attribute of its own. Below
is the diagrammatic representation of a strong and weak entity.
1
UM DIGOS COLLEGE
DEPARTMENT OF TECHNICAL PROGRAMS
Information Technology Program
Attributes
It is used to represent the property of an entity or a relationship type. For example, staffNo, name, position,
and salary can be attributes of Staff (See the given diagram below). The attributes contain values that
characterize each entity's existence and represent the main part of the data stored in the database.
➢ Key Attribute: The key attribute is used to represent the main characteristics of an entity. It
denotes a primary key. In the diagram above, you will see the key attribute (staffNo) represented
by a circle with the text underlined.
➢ Composite Attributes: Refers to an attribute that composed of many other attributes. The
composite attribute is drawn by a circle, and those circles are connected with a circle.
➢ Multivalued Attribute: A type of attribute that can have more than one value is associated as a
multivalued attribute. For example, a student can have more than one mobile number from different
network subscribers.
➢ Derived Attribute: This type of attribute can be originated from other attributes. In the diagram
representation, it is represented by a dashed circle. For example, A person's age changes over time
and can be derived from another attribute like Date of birth.
2
UM DIGOS COLLEGE
DEPARTMENT OF TECHNICAL PROGRAMS
Information Technology Program
As mentioned in the definition of an ER model, attributes can also be assigned in entity relationships. A
relationship is used to describe the relation between entities. In the given examples below, we used a
diamond symbol between two entities to represent the relationship.
When an entity has only one occurrence associated with the relationship, then it is associated as one
to one relationship. Like in the diagram example, A patient receives a medical prescription, or on
the contrary, a medical prescription is given to a patient.
If there is only one occurrence of an entity on the left, and on the right entity composed of more
than one occurrence associated with the relationship then this is known as a one-to-many
relationship.
For example, A teacher can teach more than one course, or on the contrary, more than one course
can be handled by a single teacher.
3
UM DIGOS COLLEGE
DEPARTMENT OF TECHNICAL PROGRAMS
Information Technology Program
If there is only one occurrence of an entity on the left, and on the right entity composed of more
than one occurrence associated with the relationship then this is known as a one-to-many
relationship.
When there is more than one occurrence of both entities associated with the relationship, then it is
known as a many-to-many relationship.
For example, A scientist can develop more than one COVID vaccine or on the contrary, a COVID
vaccine can be developed by a scientist
4
UM DIGOS COLLEGE
DEPARTMENT OF TECHNICAL PROGRAMS
Information Technology Program
Looking at the example “Teacher teaches Class” relationship, the reality is, it is also possible for a
Teacher not to teach a Class. Therefore, Class entity type is optional to Teacher entity. On the other hand,
a Class must be taught by a Teacher. Therefore, Teacher entity type is mandatory to Class entity. Note that
the ERD model in the given diagram shows the cardinality of Student to be (0,5). This indicates that a
Teacher may teach but no Class or the Teacher can teach as many as five Classes. Also, in Teacher entity
type, assuming each class is taught by one and only one Teacher which is represented by (1,1) cardinality.
Self Help: You can also refer to the sources below to help you further
understand the lesson:
- Agarwal, Udit(2016). Data mining and data warehousing 2nd Edition. S.K. Kataria & Sons
- Witten, Ian H. (2017). Data mining : Practical Machine Learning Tools and Techniques 4th Ed.
Elsevier
- Nikolay V. Kovalev (2012)., Database Management System, Mandaluyong City: National Book
Store
- Cooper, J. (2013). Database design and sql for db2. Retrieved from
https://ebookcentral.proquest.com
- Molaro, C., Parekh, S., & Purcell, T. (2013). Db2 11 : the database for big data & analytics.
Retrieved from https://ebookcentral.proquest.com
- Taylor, A. G. (2013). Sql for dummies. Retrieved from https://ebookcentral.proquest.com
- Masood-Al-Farooq, B. A. (2014). Sql server 2014 development essentials. Retrieved from
https://ebookcentral.proquest.com
Let’s Check
Activity 1. Encircle the letter of your answer.
1. The logical structure of the database.
a) Database c) Relationship
b) Schema d) ERD
2. What is relational database?
a) A place to store relational information
b) A database that is related to other databases
5
UM DIGOS COLLEGE
DEPARTMENT OF TECHNICAL PROGRAMS
Information Technology Program
39
UM DIGOS COLLEGE
DEPARTMENT OF TECHNICAL PROGRAMS
Information Technology Program
Let’s Analyze
Test your knowledge in the concept of ERD and Database Normalization, by answering the following
questions.
Diagram Analysis: Analyze the given diagram and answer the analysis questions below.
2. Do you think “address” could also have other attributes? If no, Why? If yes, provide an
example.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
P a g e 2|9
UM DIGOS COLLEGE
DEPARTMENT OF TECHNICAL PROGRAMS
Information Technology Program
In a Nutshell
Based on the definition of the essential term previously and the learning exercises that you have done,
please feel free to write your arguments or lessons learned below.
P a g e 3|9
UM DIGOS COLLEGE
DEPARTMENT OF TECHNICAL PROGRAMS
Information Technology Program
Questions/Issues Answers
•
•
•
•
•
Keywords Index
a. Entity
b. Attributes
c. Instance
d. Entity Set
e. ERD
f. Relationship Key
P a g e 4|9