Professional Documents
Culture Documents
Model Data Objects #LO1 For Trainee's
Model Data Objects #LO1 For Trainee's
LEVEL III
Based on December, 2022, Version 3 Occupational
Standards (OS) and Curriculum
Module Title: Modeling Data Objects
LG Code: EIS WDDBA3 M02 0322
TTLM Code: EIS WDDBA3 TTLM 02 1220v1
Elements:
LO 1: Identify entities and relationships
LO 2: Develop normalization
LO 3: Validate model
January 2023
Adama, Ethiopia
Ethiopian TVET System
Training, Teaching and Learning Materials Development
Learning Instructions:
Read the specific objectives of this Learning Guide.
1. Follow the instructions described below.
2. Read the information written in the “Information Sheets”. Try to understand what are being
discussed. Ask your trainer for assistance if you have hard time understanding them.
3. Accomplish the “Self-checks” which are placed following all information sheets.
4. Ask from your trainer the key to correction (key answers) or you can request your trainer to
correct your work. (You are to get the key answer only after you finished answering the Self-
checks).
5. If you earned a satisfactory evaluation proceed to “Operation sheets”
6. If your performance is satisfactory proceed to the next learning guide,
The purpose of Data Analysis is to extract useful information from data and taking the
• Text Analysis
• Statistical Analysis
• Diagnostic Analysis
• Predictive Analysis
• Prescriptive Analysis
✓ Text Analysis
➢ It is one of the methods of data analysis to discover a pattern in large data sets
✓ Statistical Analysis
✓ Diagnostic Analysis
➢ Diagnostic Analysis shows "Why did it happen?" by finding the cause from the
✓ Predictive Analysis
The simplest data analysis example is like if last year I bought two dresses based on my
savings and if this year my salary is increasing double then I can buy four dresses.
This Analysis makes predictions about future outcomes based on current or past data.
Forecasting is just an estimate. Its accuracy is based on how much detailed information
✓ Prescriptive Analysis
➢ Prescriptive Analysis combines the insight from all previous Analysis to determine
➢ Most data driven companies are utilizing Prescriptive Analysis because predictive
➢ Based on current situations and problems, they analyze the data and make
decisions.
2. A method of data analysis which analyses a set of data or a sample of data is:
_________________________
_________________________
_________________________
__________________________________
__________________________________
_________________________________
__________________________________ _______________________________
__________________________________ _______________________________
_________________________________
A system is a group of interrelated entities that form a unified whole to achieve some
Constraints of a System
• A system must have some structure and behavior which is designed to achieve a
predefined objective.
components.
• The objectives of the organization have a higher priority than the objectives of its
subsystems.
Example
• Payroll system,
• Organization
• Interaction
It is defined by the manner in which the components operate with each other.
Example
• Interdependence
Interdependence means how the components of a system depend on one another. For
proper functioning, the components are coordinated and linked together according to a
specified plan. The output of one subsystem is the required by other subsystem as
input.
• Integration
means that the parts of the system work together within the system even if each part
• Central Objective
The objective of system must be central. It may be real or stated. It is not uncommon
Elements of a System
✓ The main aim of a system is to produce an output which is useful for its user.
✓ Inputs are the information that enters into the system for processing.
• Processor(s)
input is also modified to enable the processor for handling the transformation.
• Control
software.
• Feedback
system.
• Environment
✓ A system should be defined by its boundaries. Boundaries are the limits that
another system.
✓ Each system has boundaries that determine its sphere of influence and control.
Directions: Answer all the questions listed below. Use the Answer sheet provided in
the next page:
A. Integration C. Organization
A. Interdependence C. Integration
1. What is system(2pts)
_____________________________________________________________________
__________________________
__________________________
__________________________
1___________________________________2________________________________
3___________________________________4._______________________________
5___________________________________6________________________________
Information sheet 3: Identifying entities, attributes, data types and relationships of data
about which the data should be captured and stored in the form of properties, workflow
and tables. Data can be stored about such entities. A design tool that allows database
administrators to view the relationships between several entities is called the entity
relationship diagram (ERD). Database entity is the key element in all relational
databases.
Entity Attributes
An attribute defines the information about the entity that needs to be stored. If the entity
is an employee, attributes could include name, employee ID, health plan enrollment,
and work location. An entity will have zero or more attributes, and each of those
Example
The domain of an entity describes the possible values of attributes. In the entity, each
attribute will have only one value, which could be blank or it could be a number, text, a
date, or a time.
will have values. These values are unique to each record, and so it's a special type of
domain.
Data type
Data type refers to the format of data storage that can hold a distinct type or range of
values. When computer programs store data in variables, each variable must be
designated a distinct data type. There are programming languages that require the
programmer to determine the data type of a variable before attaching a value to it.
While some programming languages can automatically attach a data type to a variable
based on the initial data assigned to the variable. Database fields require distinct type
of data to be entered.
• Integer is a whole number that can have a positive, negative or zero value. It cannot
• Character refers to any number, letter, space or symbol that can be entered in a
• String is used to represent text. It is composed of a set of characters that can have
spaces and numbers. Strings are enclosed in quotation marks to identify the data as
• Floating Point Number is a number that contains decimals. Numbers that contain
• Varchar as the name implies is variable character as the memory storage has
variable length.
• Boolean – is used for creating true or false statements. To compare values the
following operators are being used: AND, OR, XOR, and NOT.
A. False B. True
A. Name C. Sex
B. Age D. Employee
A. Integer C. String
B. ID number D. Character
______________________________________________________________________
__________________________
__________________________
______________________________________________________________________
A business rule is a statement that imposes some form of constraint on a specific aspect
of the database, such as the elements within a field specification for a particular field or
processes, corporate behavior and computing systems in an organization, and are put
in place to help the organization achieve its goals. Also, Business rules describe
the business policies that apply to the data stored on a company's databases.
There are certain constraints that designers apply to ensure that a database honors a
company’s business rules. These constraints help preserve data integrity. Business-
Rules used to limit the type of data that can go into a table, to maintain the accuracy
and integrity of the data inside table. Constraints are used to make sure that the
A foreign key is a field in one table that references the primary key in another table. The
data in the fields from both tables is exactly the same, and the table with the primary
key record must have existing records before the table with the foreign key record has
the related records. Like primary keys, you can define foreign keys in the table
illustrates an information system’s entities and the relationships between those entities.
entity set is a collection of similar entities. These entities can have attributes that define
its properties. By defining the entities, their attributes, and showing the relationships
ERD Symbols
Entities represented by rectangles. An entity is an object or concept about which you
want to store information.
A weak entity is an entity that must defined by a foreign key relationship with another
entity as it cannot be uniquely identified by its own attributes alone.
Actions which are represented by diamond shapes show how two entities share
information in the database. In some cases, entities can be self-linked. For example,
employees can supervise other
employees.
A multi valued attribute can have more than one value. For example, an employee entity
can have multiple skill values.
Connecting lines, solid lines that connect attributes to show the relationships of entities
in the diagram.
Cardinality specifies how many instances of an entity relate to one instance of another
entity. Ordinality is also closely linked to cardinality. While cardinality specifies the
Constraints are used for modeling limitations on the relations between entities.
There are two types of constraints on the Entity Relationship (ER) model −
Cardinality
The degree of relationship (cardinality) is represented by characters “1”, “N” or “M”
usually placed at the ends of the relationships:
• one-to-one (1:1)
The employee can manage only one department, and each department can be
managed by one employee only:
• one-to-many (1:N)
The customer may place many orders, but each order can be placed by one
customer only:
• many-to-one (N:1)
Many employees may belong to one department, but one particular employee
can belong to one department only:
• many-to-many (M:N)
One student may belong to more than one student organizations, and one
organization can admit more than one student:
The maximum number of instances of one entity type to which an instance of another
ratio (Figure below). The mapping cardinalities can be used to describe the relationship
between two or more entities. For a binary relationship between two entity
relationship.
For example, consider two entities PERSON and DRIVING_LICENSE. Each person can
only have one driving license, and one driving license with a particular number can only
be issued to a single person. That is, no two persons can have the same driving license.
associated with zero or more instances of type E2. However, an instance of type E2 can
For example, one publisher can publish many books; however, one book (with a
associated with at most one instance of type E2. However, an instance of type E2 can be
associated with zero or more instances of type E1. It is represented by M:1 relationship.
For example, different books can be published by one publisher; however, one book
can only be published by one publisher. Thus, the entities BOOK and PUBLISHER have
M:1 relationship.
associated with zero or more instances of type E2 and an instance of type E2 can also
relationship. For example, one author can write many books and one book can be
written by more than one author. Thus, the entities AUTHOR and BOOK have M:N
relationship.
• Total participation means that every entity in the set is involved in the
relationship, e.g., each student must be guided by a professor (there are no
students who are not guided by any professor). In the Chen notation, this kind of
relation is depicted as a double line.
• Partial participation means that not all entities in the set are involved in the
relationship, e.g., not every professor guides a student (there are professors who
don’t). In the Chen notation, a partial participation is represented by a single line.
The relationship shown above means that each student, without exception, must be
guided by one chosen professor, and one – but not every – professor can guide many
students. So there is no student that is not guided by a professor, and on the other hand
there can be professors who don't guide any students.
Now, let’s see how our example with book and chapter (presented in the previous part)
looks like in the Chen notation.
Chen Style
Martin Style
Follow the steps given below for the conversion of the ER diagrams to tables in the
database management system (DBMS) −
• For each strong entity create a separate table with the same name.
• Includes all attributes, if there is any composite attribute divided into simple
attributes and has to be included.
• Ignore multivalued attributes at this stage.
• Select the p key for the table.
• For each weak entity create a separate table with the same name.
• Include all attributes.
• Include the P key of a strong entity as foreign key is the weak entity.
• Declare the combination of foreign key and decimator attribute as P key
from the weak entity.
Step 3 − Conversion of one-to-one relationship
• For each one to one relation, say A and B modify either A side or B side to
include the P key of the other side as a foreign key.
• If A or B is having total participation, then that should be a modified table.
• If a relationship consists of attributes, include them also in the modified
table.
Step 4 − Conversion of one-to-many relationship
• For each one to many relationships, modify the M side to include the P key
of one side as a foreign key.
• If relationships consist of attributes, include them as well.
Step 5 − Conversion of many-many relationship
• For each multivalued attribute create a separate table and include the P
key of the present table as foreign key.
• Declare the combination of foreign key and multivalued attribute as P keys.
Step 7 − Conversion of n-ary relationship
• For each n-ary relationship create a separate table and include the P key
of all entities as foreign key.
• Declare the combination of foreign keys as P key.
Problem
Solution
Follow the steps given below to draw an ER model for the library management
application −
• Book
• Publisher
• Member
• Section
• Granter
Step 2 − Identify the attributes for the given entities
• Book − The relevant attributes are title, author, price, Isbn.
• Member − The relevant attributes are Name, Bday, MID, address, phone,
age.
• Section − The relevant attributes are Sid, name, phone.
• Publisher − The relevant attributes are name, phone, Pid, address.
• Granter − The relevant attributes are phone, name, Nic, post, address.
• One member borrows multiple books and multiple books can borrow a
single person. Hence, the relationship between member and book is one-
to-many.
• One publisher can supply multiple books and multiple books can be
supplied by a single publisher. Hence, the relationship between publisher
and book is one-to-many.
Solution
Follow the steps given below to draw an ER model for the company −
• Employee
• Department
• Project
• Dependent
Step 2 − Identify the attributes for the given entities
• Employee − The relevant attributes are name, ssn, sex, address, salary.
• Department − The relevant attributes are Name, number of employees,
location.
• Project − The relevant attributes are number, name, location.
• Dependent − The relevant attributes are name, sex, birth date,
relationship.
Step 3 − Identify the Key attributes
• SSN is the key attribute for Employee.
• Number is the key attribute for the Department.
• Number is the key attribute for Project.
• Name is the key attribute for a dependent entity.
Dependent is a weak entity which is denoted by a double rectangle, the entity which
does not contain a primary key is known as weak entity.
Compiled by: Israel K. P a g e 32 | 41
Ethiopian TVET System
Training, Teaching and Learning Materials Development
Step 5 − Complete ER diagram
The complete ER diagram is as follows −
A. False B. True
A. Relationship C. Entity
3. Which Entity type has not sufficient attributes (even primary key)
______________________________________________________________________
______________________________________________________________________
Requirement
Assume that, ABC College needs to develop a database in order to store information
about enrollment and you are invited to design & develop the database based on the
following information. Student has Unique-ID, Name, DOB, Gender & Mobile. Each
student takes several courses and one course should be taken by many students.
Course has unique Course-Code, unique Course-name and Credit hour. The database
also expected to store Instructors’ profile and Instructor has Unique- ID, Name, Gender,
Age, Date of Hire, Year of service which is computed from Date of Hire, Qualification,
and Phone. Each instructor may teach more than one courses and one course should
mark, Grade & registration date of each student of those who attend & complete the
courses. In addition the database also keeps the total number of hours thought by each
instructor.
Task #3: Draw ERD using Chen notation or Crow’s feet Notation
Purpose:
Conditions for operation: - Have a clean workspace with all necessary ICT
equipments.
Procedure: - 1.
Click on Entity shape “Table1” →click on Physical Name and rename to table name Eg.
“Employee”
To add column click on “columns” under categories and assign physical name and data
types and other constraints such as (primary key and foreign keys)
• Database schema
Employee Table
FullName char 50
Sex char 10
Address char 5
To change the size of data type of employee “FullName” from default one (10) to 50
please follows following procedures.
Click on Data type of required data (Full Name)→Edit→select data type→ Length then
write number of size→ok
Database schema
Department Table
DeptName char 50
Click on Arrow between both tables→click on Name under categories to set relationship
which is by (word)
Click on →Miscellaneous →
An instructor set a group of trainees into (1-5) and shares the following projects and
gives any corrections accordingly.
Project work
1. University database
2. Hospital database
3. Bank database
4. Hotel database
5. Pharmacy database