ZeePedia
Information Systems
img
VU
Information System (CS507)
LESSON 25
Rules for DFD's
The DFD as an analytical tool follows certain rules. These rules help in achieving the level of
standardization.
· There should be no black holes, gray holes, miracles.
· Do not leave things unlabeled
· the DFD should not include data flows that are unassociated with the process.
Data Flows cannot be without a process or function being involved in the flow. Below are given three
diagrams that indicate bad practices. There has to be a process in between these three diagrams.
Entity A
Entity B
data store to
entity - or
data store to
entity to
reverse
data store
entity
For a better understanding of data flow diagram, two diagrams are drawn for the same process. The
diagram A includes some errors/ violation of rules usually used and diagram B is the amended picture
how the correct DFD should look like.
The process covered in these diagrams is as follows.
·  The number of hours employees have worked is recorded and employee time record is created
stored in employee time file.
·  Employee salary information is taken from employee master file which is used along with time
records to calculate gross pay.
·  The leads to the calculation of deductions leading to computation of net pay.
·  Payrolls slips are printed used for
·  Record purpose in the employee master file.
·  Preparation of checks
·  Paychecks and a copy of pay slip is given to the employees.
108
img
VU
Information System (CS507)
There
must be a
Miracle--No process
process
can have only
between
outputs without an
entity and
input
data store
Avoid Gray Holes ­ process must have
sufficient input to execute
Avoid Black Holes ­ No
process can have only
inputs without an output
The diagram shows the violation of rules along with the relevant explanation. Below we have corrected the
diagram.
109
img
VU
Information System (CS507)
Following corrections have been made:
·  A process of creation of employee time record has been added between employee and employee
time file.
·  Directions of processes have been corrected among employee master file and processes of gross and
net pay calculation.
·  The presentation of payroll printing process has been improved.
25.1 Entity Relationship Diagram
"The entity-relationship diagram (ERD) is a data model or diagram for high-level descriptions of
conceptual data model, and it provides a graphical notation for representing such data models in the
form of entity-relationship diagrams."
E-R Diagram (E-R model) facilitates database design by allowing the specification of an "enterprise
schema" which represents the overall logical structure of a database. The E-R Diagram (E-R model) is
extremely useful in mapping the meanings and interactions of real-world enterprises onto a conceptual
schema.
A company hires many employees, one as a
minimum
COMPANY
HIRES
EMPLOYEES
DEPARTMENT
ASSIGNED TO
RUN BY
WORK ON
PROJECTS
HOD
RUN BY
110
img
VU
Information System (CS507)
·Atleast one employee works on a project.
COMPANY
·An employee may work on more than one
projects at a time.
·At one time, an employee may not be working on
any project.
HIRES
EMPLOYEES
DEPARTMENT
ASSIGNED TO
RUN BY
WORK ON
PROJECTS
HOD
RUN BY
·An employee can be assigned to one
department only.
COMPANY
·One department may have more than one
employees.
HIRES
EMPLOYEES
DEPARTMENT
ASSIGNED TO
RUN BY
WORK ON
PROJECTS
HOD
RUN BY
111
img
VU
Information System (CS507)
·Only one HOD will head the project.
·A HOD of department may head more than one
COMPANY
project.
·At one time, he may not be heading any project.
HIRES
EMPLOYEES
DEPARTMENT
ASSIGNED TO
RUN BY
WORK ON
PROJECTS
HOD
RUN BY
Another ERD
Above we have seen a common example of how a company, its employees, the head of departments,
various projects being worked on are interlinked. ERD can be drawn with a different perspective as well.
112
img
VU
Information System (CS507)
Reservation
1
Room
Reservation ID
Room ID
Room ID
User ID
Manager
Date
Building
Start time
Room
End time
Description
Note
Status
Status
1
User
Session
User ID
Session ID
First
User ID
Last
Session String
Login
Time Stamp
Password
Type
Initials
Status
Log
Log ID
User ID
Time Stamp
In/out
The above figure shows a hotel booking system. Various records have been kept for each entity. However
each entity shares a relationship with for logical purpose. For instance, the field for room ID has been kept
in reservation for access to further data. User information has been kept separate, however link has been
made to reservation, session and logs by making user ID common to all three tables. Such kind of
relationship helps in keeping
25.2 Entity
An entity is an object that exists and is distinguishable from other objects. An entity is described using a set
of attributes. For example specific person, company, event, plant, crop, department, section, cost center.
Entity Set &attributes
113
img
VU
Information System (CS507)
·
An entity set is a set of entities of the same type that share the same properties
·  All entities in an entity set have the same set of attributes, i.e. common characteristics e.g.
names, addresses, date of birth, etc.
·  Each entity set has a distinct attribute by which it can be easily identified, e.g. NIC no.,
employee no.
Example
·  Bird is an entity
·  The class of birds is an entity set
·  The color of birds is an attribute
25.3 Value Sets
Each attribute has a Value Set (domain) i.e. defined parameters or the range in which value of the attribute
may fall, e.g.
For Example:
Range of age allowed for employees is between 18 and 60, we can specify the value set of the age attribute
of the EMPLOYEE to be the numbers between 18 and 60.
Attribute Types
There are four types of attributes
·  Single / composite :
·  Single ­ a single value completely defines the attributes. E.g. The figure 27 represents the age
(attribute) of a person (entity)
·  Composite ­ More than one values are required to explain the attribute e.g address includes
house no., street no., postal code, etc for its complete explanation.
·
Single / multi-valued:
a.  Single ­ as explained above
b. Multi-valued ­ Where an attribute can have more than one value. E.g. An individual may
have qualification. This is an attribute. If a person possesses more than one qualification
·
Null : is a blank read as zero value. E.g. the various categories of graduation degrees (B.A., B.Com.,
BSc, etc) will apply to graduates and not to non-graduates and would be read as "Not Applicable".
·
Derived : is information provided on the basis of a unique attribute e.g. customer ID, Employee
ID, Student ID. Relevant dependant information can be obtained/derived through the said
attribute.
25.4 Relationships
A relationship is an association among entities. There has to be a relationship between two entities.
114
img
VU
Information System (CS507)
?
Department
Employees
Account entity
Customer entity
Relationship
Types of Relationship
One to One­ e.g one supervisor controls one department.
Many to One ­ e.g. More than one employee works in one department
Many to Many­ More than one employees can work on more than one projects.
Total and partial participation
Total Participation ­ if ALL entities in an entity set "A" are related to the entity set "B". For example, all
employees work for same department or section of the department. Every employee has to be a part of a
department. No employee can exist in an organization without being part of a department.
Partial Participation: if SOME (not all) entities in an entity set "A" are related to the entity set "B". For
example, employees work on various projects undertaken by the organization. It is not essential that each
employee should work on every project.
115