Professional Documents
Culture Documents
Workshop
What is a “System” ?
A system is an organized collection of highly integrated parts designed to achieve a
desired outcome. The system has a wide variety of inputs which are manipulated
through a process or series of processes in a manner to produce an output
Input Output
Input The System Output
Input Process Output
The simplest process model of a system is based on Input, Output and the System itself – viewed as process
The process symbol defines the boundary of the system
The system is inside the boundary; the environment is outside that boundary
The system exchange input and output with its environment
Input Output
Input The System Output
Input Process Output
Environment
Process modeling involves graphically representing the functions, or processes, that capture,
manipulate, store, and distribute data between a system and its environment and between
components within a system.
Data flow diagrams enable you to model how data flow through an information system, the
relationships among the data flows, and how data come to be stored at specific locations.
Data flow diagrams also show the processes that change or transform data.
There are two different standard sets of DFD symbols each set consists of four symbols
that represent the same things: data flows, data stores, processes,
and sources/sinks (or external entities).
Data Flow
A data flow is as data in motion, moving from one place in a system to another. A data
flow could represent data on a customer order form or a payroll check; it could also
represent the results of a query to a database, the contents of a printed report, or data
on a data entry computer display form.
Data Store
A data store is data at rest. A data store may represent one of many different physical
locations for data; for example, a file folder, one or more computer-based file(s), or
a notebook.
A data store might contain data about customers, students, customer orders, or
supplier invoices.
When modeling the data processing of a system, it does not matter whether a process is performed manually or
by a computer.
Source/ Sink
a source/sink is the origin and/or destination of the data. Sources/sinks are sometimes referred to as external
entities because they are outside the system. Once processed, data or information leave the system and go to
some other place.
Sources and sinks are outside the system we are studying, In this respect, we do not consider the following:
Interactions that occur between sources and sinks
What a source or sink does with information or how it operates (i.e., a source or sink is a “black box”)
How to control or redesign a source or sink because, from the perspective of the system we are studying, the
data a sink receives and often what data a source provides are fixed
How to provide sources and sinks direct access to stored data because, as external agents, they cannot directly
access or manipulate data stored within the system; that is, processes within the system must receive or
distribute data between the system and its environment
Systems &
Project Analysis Analysis
Designand Design - BIIT – Naveed Ashraf
Workshop
DFD Mechanics
Sources/sinks are always outside the information system and define the boundaries of
the system.
Data must originate outside a system from one or more sources, and the system must
produce information to one or more sinks (these are principles of open systems, and
almost every information system is an open system).
If any data processing takes place inside the source/sink, it is of no interest because this
processing takes place outside the system we are diagramming.
Improperly drawn DFD showing Process as Source/Sink DFD showing proper use of Process
All context diagrams have only one process, labeled 0. The sources/sinks represent the environmental boundaries of the
system.
The data stores of the system are conceptually inside one process, data stores do not appear on a context diagram.
Input Output
Input The System Output
Input Process Output
Context diagram of Hoosier Burger’s food-ordering system
Project Analysis & Design Workshop - BIIT – Naveed Ashraf
Opening Context to make Level – 0 DFD
As analyst, you must determine which processes are represented by the
single process in the context diagram.
In our example, the main processes represent the major functions of the
system, and these major functions correspond to actions such as:
These major functions often correspond to the activities on the main system
menu.
Note that the sources/sinks are the same in the context diagram and in this
diagram: the customer, the kitchen, and the restaurant’s manager.
Make a list of “All” the Processes and sub-processes that will take ‘input” and
generate “output” to meet the requirements of project allocated to you.
These processes and sub-processes of your project will transformed the “Input”
taken from “End-user” or other processes to the Output”
The inputs to a process are different from the outputs of that process.
Objects on a DFD have unique names.
The act of going from a single system to sub-system’s component processes is called (functional) decomposition.
Functional decomposition is an iterative process of breaking the description or perspective of a system down into finer
and finer detail.
This process creates a set of hierarchically related diagrams / charts in which one process on a given diagram is
explained in greater detail on another diagram.
Each resulting process (or subsystem) is also a candidate for decomposition.
Each sub process may also be broken down into smaller units.
Decomposition continues until you have reached the point at which no sub process can logically be broken down any
further.
The lowest level of a DFD is called a primitive DFD,
Context
ContextLevel
Level
Level - 1
Level - 0
In other words, Process 1.0, which appears in a level-0 diagram, must have the same inputs and outputs
when decomposed into a level-1 diagram.
Process is a single decision, calculation, DB, operation, such as retrieve, update, create, delete,
or read or menu choice
Data store represents single entity such as a customer, employee, product, or order
When the system user does not care to see any more detail
When you believe that you have shown each business form or transaction, computer online
display, and report as a single data flow
This Input will be “Transformed” to output by writing program for the sub-process in
consideration.
The resulted output might be a report, screen showing results, data saving message
etc, etc.
What is Data?
In simple words data can be facts related to any object in consideration.
For example your name, age, height, weight, etc are some data related to you.
A picture , image , file , pdf etc can also be considered data.
What is a Database?
Database is a systematic collection of data. Databases support storage and manipulation of data.
Databases make data management easy.
What is SQL?
Structured Query language, pronounced as "S-Q-L" or sometimes as "See-Quel".
Concept of NoSQL databases grew with internet giants such as Google, Facebook, Amazon etc
who deal with gigantic volumes of data.
When you use relational database for massive volumes of data , the system starts getting slow
in terms of response time. To overcome this , we could of course "scale up" our systems by
upgrading our existing hardware.
The alternative to the above problem would be to distribute our database load on multiple
hosts as the load increases. This is known as "scaling out".
NoSQL database are non-relational databases that scale out better than relational databases
and are designed with web applications in mind.
They do not use SQL to query the data and do not follow strict schemas like relational models.
With NoSQL, ACID (Atomicity, Consistency, Isolation, Durability) features are not guaranteed
always
Project Analysis & Design Workshop - BIIT – Naveed Ashraf
Normalization
The inventor of the relational model Edgar Codd proposed the theory of normalization
with the introduction of the First Normal Form, and he continued to extend theory
with Second and Third Normal Form. Later he joined Raymond F. Boyce to develop the
theory of Boyce-Codd Normal Form
Raymond F. Boyce
Project Analysis & Design Workshop - BIIT – Naveed Ashraf
Non-normalized data
Without any normalization, all information is stored in one table as shown below
Primary Key
A primary is a single column value used to identify a database record uniquely.
A primary key cannot be NULL
A primary key value must be unique
The primary key values should rarely be changed
The primary key must be given a value when a new record is inserted
Composite Key
A composite key is a primary key composed of
multiple columns used to identify a record uniquely
In our database, we have two people with the same
name Robert Phil, but they live in different places.
Rule 1- Be in 1NF
Rule 2- Single Column Primary Key
Table 2
Project Analysis & Design Workshop - BIIT – Naveed Ashraf
Foreign Key
Foreign Key references the primary key of another Table! It helps
connect your tables
A foreign key can have a different name from its primary key
It ensures rows in one table have corresponding rows in another
Unlike the Primary key, they do not have to be unique.
Foreign keys can be null even though primary keys can not
A transitive functional dependency is when changing a non-key column, might cause any
of the other non-key columns to change
In this table, changing the non-key column Full Name may change Salutation.
To move 2NF table into 3NF, we again divide table and created a new table
which stores Salutations.
Table 3
Project Analysis & Design Workshop - BIIT – Naveed Ashraf
Conceptual Data Modeling
The purpose of a conceptual data model is to show as many rules about the
meaning and interrelationships among data as are possible.
Systems &
Project Analysis Analysis
Designand Design - BIIT – Naveed Ashraf
Workshop
Process of Conceptual Data Modeling
Second deliverable is a set of entries about data objects to be stored in repository or project
dictionary.
Repeating Group
A set of two or more multivalued attributes that are logically related.
We separate the repeating data into another entity, called a weak (or
attributive) entity (designated by a rectangle with a double line border),
and then use a relationship
Make a list of “Entities” that you are using in your DFDs for input and output
Create a table for each of the Entity in your DBMS. Attributes will appear as “Fields”
in your tables.
Normalize the tables and Assign “Keys” for establishing “Relationships” among these
tables
An association usually means that an event has occurred or that there exists some natural linkage between entity
instances.
An E-R model is normally expressed as an entity-relationship diagram (E-R diagram), which is a graphical
representation of an E-R model.
Unary Relationships Also called a recursive relationship, a unary relationship is a relationship between the
instances of one entity type.
Ternary Relationships A ternary relationship is a simultaneous relationship among instances of three entity types.
A video store may stock more than one DVD of a given movie. It is also true that the store may not have a single copy of
a particular movie in stock. We need a more precise notation to indicate the range of cardinalities for a relationship.
Minimum Cardinalities
The minimum cardinality of a relationship is the minimum number of instances of entity B that may be associated with
each instance of entity A.
In example, the minimum number of DVDs available for a movie is zero, in which case we say that DVD is an optional
participant in the Is_stocked_as relationship. When the minimum cardinality of a relationship is one, then we say that
entity B is a mandatory participant in the relationship.
Project Analysis & Design Workshop - BIIT – Naveed Ashraf
Conceptual Data Modeling and ER Model (Cardinality in Relationship)
Maximum Cardinalities
The maximum cardinality is the maximum number of instances. For our example, this maximum is “many”.
The zero through the line near the DVD entity means a minimum cardinality of zero, whereas the crow’s
foot notation means a “many” maximum cardinality.
The double underline of Copy_Number indicates that this attribute is part of the identifier of DVD, but the
full composite identifier must also include the identifier of MOVIE, Movie_Name.
Each patient has recorded one or more patient histories (we assume that the initial
patient visit is always recorded as an instance of PATIENT HISTORY).
Each PROJECT has at least one assigned EMPLOYEE (some projects have more than one).
Each EMPLOYEE may or (optionally) may not be assigned to any existing PROJECT, or may be
assigned to several PROJECTs.
Business rules are specifications that preserve the integrity of the logical data model. Four basic types
of business rules are as follows:
1. Entity integrity. Each instance of an entity type must have a unique identifier that is not null.
2. Referential integrity constraints. Rules concerning the relationships between entity types.
4. Triggering operations. Other business rules that protect the validity of attribute values.
By applying the database rules, make a first version of ERD that show the attributes
and relationships among the entities for your project.