0% found this document useful (0 votes)
45 views43 pages

System Analysis & Design: Section 6 Eng. Faten Khalifa

The document discusses process modeling and data modeling techniques used in systems analysis and design. It provides details on creating entity relationship diagrams (ERDs), including identifying entities and their attributes, defining relationships between entities, and examples of how to draw ERDs. The key steps in building an ERD are to identify entities, add appropriate attributes, and draw relationships between entities based on cardinality.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views43 pages

System Analysis & Design: Section 6 Eng. Faten Khalifa

The document discusses process modeling and data modeling techniques used in systems analysis and design. It provides details on creating entity relationship diagrams (ERDs), including identifying entities and their attributes, defining relationships between entities, and examples of how to draw ERDs. The key steps in building an ERD are to identify entities, add appropriate attributes, and draw relationships between entities based on cardinality.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 43

System Analysis & Design

Section 6
Eng. Faten Khalifa
Process Modeling
SDLC
 Interview Project
 JAD Session Planning Plan 
 Questionnaire
 Data Flow Diagram
 Data Dictionary Analysis
 Process Specification

7. Entity Relationship Design


8. Normalization

Implementation

Data Modeling
Data Modeling
• 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.

• Analysis phase >> logical data model


• Design phase >> physical data model
Entity-Relationship Diagram (ERD)
• ERD
• responsible for showing the information that is created, stored,
and used by a business system

• is a graphical, detailed, logical representation of entities and their


relationships

• consists of 3 elements:
1. Entity
2. Attribute
3. Relationship
ERD example
*C_ID C_Name *S_ID S_Name

has
Course Student
Studies

Credits
S_Address *C_ID

C_ID C_Name Credits S_ID S_Name S_Address *C_ID


CS07 File Structure 80 1 Ahmed Ali Tanta IS02
IS02 System Analysis 70 2 Heba Samir Shebin IT05
CS06 Operating System 80 3 Aya Omar Tanta CS06
IT05 Image Processing 80 4 Amr Emad Shebin IS02

Course database table Student database table


Elements of an ERD: (1) Entity
 Entity
• is the basic building block for a data model (e.g., ERD)
• Such as a person, place, event, or thing which data is collected
about .

 Entities
• represent something for which there exist multiple instances,
or occurrences.
• E.g., Adel Mahmoud could be an instance of the customer entity.

• How to represent it in ERD? Entity name Student

Entity symbol Entity example


Elements of an ERD: (1) Entity
Entity types:

Normal

(Intersection Entity) only exists between


two entities
Elements of an ERD: (2) Attributes
 An attribute is some type of information that
is captured about an entity.
– For example, last name, address, and e-mail address are all attributes
of a customer.

 How to represent it in ERD? Name Address

Attribute symbol Attribute example

 One or more attributes can serve as the identifier:


– Identifier: one that uniquely identifies instances of an entity.
– Concatenated identifier: several attributes are combined to uniquely
identify an instance.
Elements of an ERD: (3) Relationships

 Relationships
* are associations between entities
* should be labeled with verbs
* have (1) cardinality and (2) degree
 Cardinality:
– determine the number of instances associated
from one entity to the other and vice versa
– Can be: (1) One-to-One, (2) One-to-Many, (3)
Many-to-Many
 How to represent relationships?
Elements of an ERD: (3) Relationships

 Relationships

 A single vertical line represents one.


 A circle represents zero or none.
 A crows foot represents many.
Elements of an ERD: (3) Relationships
 Example:
Elements of an ERD: (3) Relationships
 Example:
Elements of an ERD: (3) Relationships

Degree of relationships:
– is the number of entities that participate in the
relationship
– three most common relationships degrees are
1. Binary
2. Unary
3. Ternary
Elements of an ERD: (3) Relationships

Degree of relationships:-
– Binary
Elements of an ERD: (3) Relationships

Degree of relationships:-
– Unary
Elements of an ERD: (3) Relationships

Degree of relationships:-
– Ternary
Summary of ERD Elements
How to create the ERD?
• Drawing the ERD is an iterative process of trial
and revision

• The basic steps in building an ERD:


1. Identify the entities
2. Add the appropriate attributes to each entity
3. Draw relationships among entities

6-18
Step 1: Identify the Entities
• Guidelines:

• The entities should represent the major


categories of information that you need to
store in your system.

• If the DFDs are available, look at the data


stores, external entities, and data flows.

6-19
Step 2: Add Attributes and Assign Identifiers

• The information that describes each entity


becomes its attributes.
– Use requirements elicitation techniques (e.g., interview or
DFD).

• One or more of the attributes will become the


entity’s identifier.
– The identifier must be an attribute(s) that is able
to uniquely identify a single instance of the entity.
6-20
Step3: Identify Relationships
• Each relationship is labeled, and
cardinality is assigned

• To determine the cardinality for a


relationship
– we ask ourselves: “How many instances of one
entity are associated with an instance of the other
and vice versa?”

6-21
Example 1
1. A department employs many employees, but
each employee is employed by one
department. Some employees, known as
"rovers," are not assigned to any
department. One of the employees manages
each department.
employs
Department Employee
is employed by
Example 1 (cont.)
2. A division operates many departments, but
each department is operated by one division.
employs
Department Employee
is employed by
is operated by
operates

Division
Example 1 (cont.)
3. An employee may be assigned to many projects and
a project may have many employees assigned to it.
A project must have at least one employee assigned
to it.
employs
Department Employee
is employed by
is operated by

Is assigned to
operates

Error !!!!!!
Many to Many
Relationship

Division Project
Example 1 (cont.)
employs
Department Employee
is operated by is employed by
operates

EMP_PRO

Division

Project
ERD Example 2 (patient treatment)
Name
address Phone
Specialty

Ph_ID Physician Product- description


Name
PPhone is taken Date
care by treats

PName
experiences
Patient treatment
is given to
Paddress

Prescription
visitDate insures subscribes belongs includes -Name
to to
CName
Insurance Carrier Prescription Dosage
Caddress
CPlan Amount
Example 3
• Draw the ERD for the following situations.
Show the needed attributes.
– A college course may have one or more scheduled
sections, or may not have a scheduled section.
Attributes of COURSE include Course_ID, name,
and Credits. Attributes of SECTION include
Section_ID, and Semester_ID (A composite
attribute consisting of Semester and Year).
Solution of Example 3

*Course_ID Name *Section_ID Course_ID

has
Course Section

Credits Semester_ID

Semester Year
Example 4
• Draw ERD for the following company system:
– A company has a number of employees. The attributes of
EMPLOYEE are Employee_ID, Name and birthdate. The
company also has several projects. Attributes of PROJECT
are Project_ID, Project_name, and Start_Date. Each
employee may be assigned to one or more projects, or
may not be assigned to a project. A project must have at
least one employee assigned to it, and may have many
employees assigned to it. An employee’s billing rate may
vary by project, and the company wishes to record the
applicable billing rate (Billing_Rate) for each employee
when assigned to a particular project.
Solution of Example 4

*Emp_ID Name *Proj_ID Proj_Name

assigned to
Employee Project

Birthdate Billing_Rate Start_Date


Solution of Example 4

*Emp_ID Name *Proj_ID Proj_Name

Employee Assignment Project

Birthdate Billing_Rate Start_Date


Solution of Example 4

*Emp_ID Name *Emp_ID *Proj_ID *Proj_ID Proj_Name

Employee Assignment Project

Birthdate Billing_Rate Start_Date


Example 5
• Draw ERD for the following bakery system:-
– A commercial bakery makes many different products.
These include breads, desserts, specialty cakes, and many
other baked goods. Ingredients such as flour, spices, milk,
and so on are purchased from vendors. Sometimes an
ingredient is purchased from a single vendor and other
times an ingredient is purchased from many vendors. The
bakery has commercial customers, such as schools and
restaurants, that regularly place orders for baked goods.
Each baked good has a specialist that oversees the setup
of the bake operation and inspects the finished product.
Solution of Example 5

Specialist Product Customer

Ingredient Vendor
Task 1
• Draw ERD for the following system:-
– A group of taxi owners decided to set up a database system to
help their business. Several control centers are to be spread
around the city to receive calls made by customers requesting
the services of a taxi. Each control center is formed by a number
of taxi owners, while each owner may have one or more taxi.
Taxi drivers are hired by individual control centers. After a driver
has been hired, the driver will be assigned to drive a particular
taxi. There are two working shifts for taxi drivers. A taxi driver
works only either in the morning shift or the evening shift
normally. When a driver is unable to attend work, another taxi
driver who usually works in the other shift will replace him. The
replacement driver is pre-determined by the control center.
Task 1 (Cont)
– Each control center will have several control desks to
receive calls from customers. Every call is bound to the
control desk that responded to it. One does not associate
any call with more customers than the one who made it.
Once the control desk finds a suitable driver to serve to
the call, it sends that driver and that one only. Further,
customers information are kept in the database once they
are being attended to. That is to say, after a taxi is sent to
the location of the call, the record of the call and of the
customer who made it are logged. To simplify accounting
purposes, taxi drivers will only report to and receive
commands from one control desk.
Solution of Task 1
Task 2
• Please draw ERD about book and reader, if necessary, add
associative entity to represent the relationship between
book and reader.
– A library has many books and many readers. one reader can
borrow many books, one book can be borrowed by many
readers at different times. If a book is lent to a reader, the
lending date and return date must be recorded. Attributes about
book and reader are given below:
– Book: book number, book name, author, price, publishing date,
status.
– Reader: card number, reader name, gender, address, phone
number.
Task 3
• Draw the following binary relationships and indicate
min and max cardinalities, degree of each
relationship.
1. A hospital consists of different departments, each
department provides services to only one hospital.
2. Each team member can work on several IT projects
simultaneously; each IT projects involves different team
members.
3. Each invoice corresponds to a particular order, the
invoice is created only if order is accepted and finalized.
Task 4
• Based on the following description, draw an ER diagram of a
walk-in clinic information system than will keep track of patients,
doctors, appointments and medications.
– A patient comes to doctor by appointment. Each patient has a unique
number, name, address, date of birth, date and time of appointments
with doctors. A patient may receive medications, which are assigned by
a doctor. Each medication is described by a unique number, name,
manufacturer name. Each doctor is characterized by employee id
number, name, phone and specialization.
1. Indicate min and max cardinalities and degree of each
relationship.
2. Show the attributes of each data entity.
3. If required, present a solution to avoid many-to-many
relationships.
Task 5
• Given the following data attributes and
entities, indicate which attributes could be
identifiers for each of the entities. You may
have to combine attributes or even add some
attributes that are not listed. Map all of the
attributes to their appropriate entity.
Remember, each attribute should describe
one and only one entity. Draw a rough draft
entity relationship diagram.
Task 5 (cont)
• Entities:
Seller House Closing
Buyer OfferShowing
Listing Property Room

• Attributes:
Seller name Square foot size Seller address
House style Closing location Listing price
Number of bathrooms Garage size Showing date
Garage location Buyer name Basement size
House heating method Offer amount Listing date
Property descriptionOffer dateRoom type
Property size Showing time Room size
Elementary school zone Buyer phone number Closing date
Sales terms
Required
• Complete your project:
1. Draw the ERD of your project

You might also like