0% found this document useful (0 votes)
7 views

SCO 215 Lecture 5 Analysis ERDs

The document discusses the analysis phase of system design, focusing on data modeling techniques, particularly Entity-Relationship Diagrams (ERDs). It explains how data is organized and represented, emphasizing the importance of understanding entities, attributes, and their relationships within a business system. Additionally, it outlines the process of creating ERDs and the role of a data dictionary in managing database structures.

Uploaded by

opagalahawkins
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

SCO 215 Lecture 5 Analysis ERDs

The document discusses the analysis phase of system design, focusing on data modeling techniques, particularly Entity-Relationship Diagrams (ERDs). It explains how data is organized and represented, emphasizing the importance of understanding entities, attributes, and their relationships within a business system. Additionally, it outlines the process of creating ERDs and the role of a data dictionary in managing database structures.

Uploaded by

opagalahawkins
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Kenyatta University

SCO 215: SYSTEM ANALYSIS AND DESIGN

SAD Lecture 5: Analysis

5.1. Introduction
- Data modelling is a technique for organizing and documenting a system’s data.
- During the analysis phase, analysts create process models to represent how the business
system will operate. At the same time, analysts need to understand the information that is used
and created by the business system (e.g., customer information, order information). In this
chapter, we discuss how the data that flow through the processes are organized and presented.

- A data model is a formal way of representing the data that are used and created by a business
system; it illustrates people, places, or things about which information is captured and how
they are related to each other. The data model is drawn by an iterative process in which the
model becomes more detailed and less conceptual over time. During analysis, analysts draw a
logical data model, which shows the logical organization of data without indicating how data
are stored, created, or manipulated. Because this model is free of any implementation or
technical details, the analysts can focus more easily on matching the diagram to the real
business requirements of the system.

- In the design phase, analysts draw a physical data model to reflect how the data will physically
be stored in databases and files. At this point, the analysts investigate ways to store the data
efficiently and to make the data easy to retrieve.

- Entity-Relationship modelling is a technique which can be used to analyze an organization’s


data requirements.
- The aim is to obtain a model which is a logical view of an organization’s data and serve as a
basis for computer implementation.
- Analysis of the proposed system will have provided the analyst with details of all the data items
or attributes
- The process uses a diagrammatic representation of the proposed tables identifying the table’s,
attributes and entities.
- Although there are several ways to model data, we will present one of the most commonly used
techniques: entity relationship diagramming, a graphic drawing technique developed by Peter
Chen1 that shows all the data components of a business system. We will first describe how to
create an entity relationship diagram (ERD) and discuss some style guidelines.

5.2. THE ENTITY RELATIONSHIP DIAGRAM


An entity relationship diagram (ERD) is a picture which shows the information that is created, stored,
and used by a business system. An analyst can read an ERD to discover the individual pieces of
information in a system and how they are organized and related to each other. On an ERD, similar

1
P. Chen, “The Entity-Relationship Model—Toward a Unified View of Data,” ACM Transactions on Database
Systems, 1976, 1:9–36.

Emma Cheserem SCO 215 Lecture 5 - Analysis ERDs 1


kinds of information are listed together and placed inside boxes called entities. Lines are drawn
between entities to represent relationships among the data, and special symbols are added to the
diagram to communicate high-level business rules that need to be supported by the system. The ERD
implies no order, although entities that are related to each other are usually placed close together.

The ERD also communicates high-level business rules. Business rules are constraints or guidelines
that are followed during the operation of the system; they are rules such as “A payment can be cash,
check, debit card, credit card, coupon(s), or food stamps,” “A sale is paid for by one or more
payments,” or “A customer may place many orders.” Over the course of a workday, people are
constantly applying business rules to do their jobs, and they know the rules through training or
knowing where to look them up. If a situation arises where the rules are not known, workers may
have to refer to a policy guide or written procedure to determine the proper business rules. On a
data model, business rules are communicated by the kinds of relationships that the entities share.

A well-developed ERD can provide sufficient information for database administrator to follow when
developing and maintaining database.

5.2.1. Reality, Data, and Metadata


The real world will be referred to as reality. Data collected about people, places, or events in reality
will eventually be stored in a file or database. To understand the form and structure of the data,
information about the data itself is required. The information that describes data is referred to as
metadata. The relationship between reality, data, and metadata is pictured below. Within the realm
of reality are entities and attributes; within the realm of actual data are record occurrences and data
item occurrences; and within the realm of metadata are record definitions and data item definitions.

Figure : Reality, data, and metadata

5.2.2 Entities

- An entity is something of importance to the system, about which data is held.


- An entity is a class of persons, places, objects, events, or concepts about which we need to
capture and store data.
- For example, in a student management database, an entity could be Students; the entity type
would therefore be Student, whilst a particular occurrence of the entity type could be the
Student Chris Davies.

Emma Cheserem SCO 215 Lecture 5 - Analysis ERDs 2


Identifying entities:

1. Entities are representations of data that is being stored. So if a DFD has been drawn, check
there should be an entity corresponding to each data store or file on the DFD.
2. Think about what groupings of data the user is going to use.
3. An entity is something we are going to hold data about.

- An entity instance is a single occurrence of an entity.


- Example: instances of the entity STUDENT may include
1. Becky Auma
2. John Omondi
3. Bill Makau

An entity must have the following characteristics:


1. It must contain information of interest to the system i.e. the STUDENT entity contains
information concerning names, addresses, qualifications, exam results etc.;
2. It must be possible to have more than one occurrence i.e. the environment itself cannot be
an entity as there is only one occurrence;
3. Each occurrence must be uniquely identifiable - there must be a code or key for each entity
instance.

(i) Entity Attributes


- An attribute is a descriptive property or characteristic of an entity. i.e. a field.
- These are the data items associated with each entity.
Example: Student as an entity may have the following attributes:
 Name:
 Address:
 DOB:
 ADM Number:

(ii) Unique Identifiers


A unique attribute that identifies an entity.

(iii) Relationships
The association between Entities

(iv) Cardinality
- The degree of association between entities.
- A relationship’s cardinality defines the maximum number of entities of one type that can
be associated with an entity of another type.

There are three basic cardinalities


- One to one
- One to many
- Many to many

Emma Cheserem SCO 215 Lecture 5 - Analysis ERDs 3


A one-to-one (1:1) relationship is when at most one instance of an entity A is associated
with one instance of entity B. For example, take the relationship between board members
and offices, where each office is held by one member and no member may hold more than
one office.

A one-to-many (1:N) relationship is when for one instance of entity A, there are zero, one,
or many instances of entity B but for one instance of entity B, there is only one instance of
entity A. An example of a 1:N relationships is

a department has many employees; each employee is assigned to one department.

A many-to-many (M:N) relationship is when for one instance of entity A, there are zero,
one, or many instances of entity B and for one instance of entity B there are zero, one, or
many instances of entity A. An example is employees may be assigned to no more than three
projects at a time; every project has at least two employees assigned to it.

Components of ER Diagrams (Chen notation):


 rectangles representing entity sets.
 ellipses representing attributes.
 diamonds representing relationship sets.
 lines linking attributes to entity sets and entity sets to relationship sets.

Examples

ERD illustrating Employee and Department

(Chen notation)

Crows foot notation illustrating various cardinalities

Emma Cheserem SCO 215 Lecture 5 - Analysis ERDs 4


(Kendall and Kendall pg. 406)

How to draw an ER Diagram


1. Identify the Entities Required
2. Identify the Attributes, Primary Key
3. Identify the relationship between the entities
4. Identify the cardinality ratio and participation

Emma Cheserem SCO 215 Lecture 5 - Analysis ERDs 5


ERD for a Hospital pharmacy billing system

(Kendall, pg. 408)

Exercise 1

Airbnb is an online community marketplace that connects people looking to rent their homes with
people who are looking for accommodations. Airbnb users include hosts and travelers: hosts list and
rent out their unused spaces, and travelers search for and book accommodations in 192 countries
worldwide.

1. Identify the Entities Required - hosts, travelers ,properties

2. Identify the Attributes, Primary Key


Hosts(Host_ID, Host_Name, Host_Number)
Travelers(Traveler_ID, Traveler _Name, Traveler _Number)
Homes(Home_ID, Home_Name, Home_Address, Home_City)

3. Identify the relationship between the entities


Hosts list homes
Travelers book homes
Homes host travelers

4. Identify the cardinality ratio and participation


Hosts can list many homes
Travelers can book one home at a time
Homes can host many travelers at a time

Emma Cheserem SCO 215 Lecture 5 - Analysis ERDs 6


Example of an Entity Relationship Diagram for Airbnb

http://www.rachit.ca/information-modelling/entity-relationship-diagram-for-airbnb/

Exercise 2
Graphic designers create posters for a KU exhibition to illustrate a chosen global problem. Relevant
information on designers includes their name and the department they come from. A poster has a title and is
assigned an identification number, and it may be created by several graphic designers; although each
individual designer may only be involved with one poster.

(i) Create an ERD for the above.


(ii) Normalize the entities and draw a normalized ERD
Example of an Entity Relationship Diagram for Student Information System

(https://www.conceptdraw.com/solution-park/software-erd)

Emma Cheserem SCO 215 Lecture 5 - Analysis ERDs 7


Data Dictionary

 A data dictionary is a document describing a database or collection of databases. It is a is a


collection of descriptions of the data objects or items in a data model for the benefit of
programmers and others who need to refer to them.

 Also called a Metadata Repository, or a database about a database, it is a "centralized


repository of information about data such as meaning, relationships to other data, origin, usage,
and format. A data dictionary defines the structure of the database itself (not that of the data
held in the database) and is used in control and maintenance of large databases.

 The data dictionary consists of record types (tables) created in the database by systems
generated command files, tailored for each supported back-end DBMS. Command files contain
SQL Statements for CREATE TABLE, CREATE UNIQUE INDEX, ALTER TABLE (for referential
integrity), etc., using the specific statement required by that type of database.

Emma Cheserem SCO 215 Lecture 5 - Analysis ERDs 8


References
1. Data Flow Diagram with Examples. http://www.visual-paradigm.com/tutorials/data-flow-
diagram-example-food-ordering-system.jsp
2. Kendall, K. and Kendall, J. (2011). Systems Analysis and Design. Prentice Hall.
3. Dennis, A., Wixom, B. and Roth, R. (2014). Systems Analysis and Design. Wiley.

Emma Cheserem SCO 215 Lecture 5 - Analysis ERDs 9

You might also like