IT2005 System Analysis & Design

Slides:



Advertisements
Similar presentations
ER Modeling Case Studies
Advertisements

Chapter 6: Entity-Relationship Model (part I)
Database Design The process of finding user requirement
Entity-Relationship (ER) Modeling
Copyright 2001 Prentice-Hall, Inc. Object Oriented Aproach to System Requirements: Process Modeling 7.1 Chapter 7.
Chapter 4 Enterprise Modeling.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Entity Relationship (ER) Modeling
Text-Book Chapters (7 and 8) Entity-Relationship Model
System Analysis - Data Modeling
Systems Analysis Requirements structuring Process Modeling Logic Modeling Data Modeling  Represents the contents and structure of the DFD’s data flows.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
PROCESS MODELING Transform Description. A model is a representation of reality. Just as a picture is worth a thousand words, most models are pictorial.
DT211 Stage 2 Software Engineering
The (min,max) notation (1,1) (0,1) (1,N) (1,1). SUMMARY OF ER-DIAGRAM NOTATION FOR ER SCHEMAS Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING.
Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – ER Model.
SYSTEMS ANALYSIS. Chapter Five Systems Analysis Define systems analysis Describe the preliminary investigation, problem analysis, requirements analysis,
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Chapter 7 Structuring System Process Requirements
CS 405G Introduction to Database Systems
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Data Modeling Using the Entity-Relationship Model
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Data Modeling Using the Entity-Relationship Model
Computer System Analysis Chapter 10 Structuring System Requirements: Conceptual Data Modeling Dr. Sana’a Wafa Al-Sayegh 1 st quadmaster University of Palestine.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
DFD examples.
PHASE 2: SYSTEMS ANALYSIS
Instructor :Huda Al-Omair
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 6 Structuring.
BIS 360 – Lecture Six (Part 2) Conceptual Data Modeling (Chapter 10 and partial Chapter 12)
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
ER Data Models Ctd. CSET 3300.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
UNIT 2.
Chapter 7 Database Design and The E–R Model. 2 Goals n Facilitate DB design and represent the overall logical structure of the DB. n Definition Entities.
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
Entity – Relationship Model (E-R Model)
The Hong Kong University of Science and Technology COMP3311 Spring 2013 Tutorial 1 ER Diagrams.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
COMP231 Tutorial 1 ER Model and ER to Relational Schema.
Weak Entity Sets A weak entity is an entity that cannot exist in a database unless another type of entity also exists in that database. Weak entity meets.
Data Modelling Using Entity-Relationship (ER) Model
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Introduction to Database Systems
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
1 Information System Analysis Topic-3. 2 Entity Relationship Diagram \ Definition An entity-relationship (ER) diagram is a specialized graphic that illustrates.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
DATA FLOW DIAGRAMS.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Data Modeling Using the Entity- Relationship (ER) Model
COP Introduction to Database Structures
Contents Design Process Modeling Constraints E-R Diagram Design Issues
Business System Development
Data Modeling Using the Entity- Relationship (ER) Model
Identifying Data Flows
E-R Diagram (Cont.) Draw ER Diagram for the following scenario:
Entity-Relationship Model
Outline of the ER Model By S.Saha
Lecture3: Data Modeling Using the Entity-Relationship Model.
بسم الله الرحمن الرحيم.
DFD Example : Bus Garage Repairs
Database Systems: Design, Implementation, and Management Tenth Edition
Database Modeling using Entity Relationship Model (E-R Model)
ER Modeling Case Studies
Chapter 7: Entity-Relationship Model
Presentation transcript:

IT2005 System Analysis & Design Week 10 -System Design

Model Model is a presentation of reality. Just a picture is worth a thousand of words, most system models are pictorial representations of reality.

Modelling Methods A set of techniques used to implement a Methodology • Data Flow Diagrams - – A process model – Depict the flow of data through a system and the work performed by the system • Entity Relationship Diagrams – – A data model – Depict data in terms of entities and relationships described by the data – Consists of several notations • Structure Charts etc.

Logical and physical data flow design Logical DFDs- that illustrate what occurs without showing how it occurs are known as logical DFDs. Physical DFDs- DFDs that show how things happen, or the physical components are called physical DFDs

Process Modeling Is a technique for organizing and documenting the Process Requirements and Design for a system. Data Flow Diagram : Popular Process Modeling Technique. Shows the flow of data through the system and the processing performed by the system.

Data Flow Diagrams • Systems Analyst (SA) - may first draw Data Flow Diagram - may first draw Document Flow Diagram - Depends on the Methodology

ATI System

Data Flows Data flow model the passage of data in the system and are represented by lines joining system components. Flows of data in the system can take place: Between two processes From a data store to a process From a process to a data store From entities to a process From process to a entities

Context diagram A common way to begin is to model, the whole system by one process. It shows all the external entities that interact with the system and the data flow between these external entities and the system.

Context Diagram defines the scope of the system by identifying the system boundary contains: one process (which represents the entire system) all sources/sinks (external entities) data flows linking the process to the sources and sinks (external entities)

Constructing a Context Diagram identify and list sources/sinks (external entities) identify and list inputs to and outputs from sources/sinks (external entities) create context diagram

Library System

Level-0 Diagram describes the overall processing of the system show one process for each major processing step or functional requirement can draw duplicate sources, sinks and data stores to increase legibility

Drawing a Level-0 Diagram list the major data stores list major business steps draw a segment for each business step assemble into single DFD re-organize until satisfied number processes

DFD context level diagram

DFD level 0 diagram Decomposition

DFD level 1 diagram

Other Questions about Lower level diagrams 1. How deep? (how many levels?) if the process has only one input or one output, probably cannot partition further; can you describe the process in English in about 1/2 page? 2. How broad? (how many processes on a level?) 7 ± two is a reasonable may temporarily place much of the system on a single diagram then re-draw into separate levels

Quality Guidelines Completeness Consistency Timing considerations all components included & in project dictionary Consistency between levels: balancing, leveling Timing considerations assume system never starts and never stops Iterative nature revisions are common Drawing primitives (lowest level) when to stop?

Budget monitoring system

Top-level DFD diagram

Expansion of classify expenditure process

DFD Example: Bus Garage Repairs Buses come to a garage for repairs. A mechanic and helper perform the repair, record the reason for the repair and record the total cost of all parts used on a Shop Repair Order. Information on labor, parts and repair outcome is used for billing by the Accounting Department, parts monitoring by the inventory management computer system and a performance review by the supervisor.

DFD Example: Bus Garage Repairs (cont’d) External Entities: Bus, Mechanic, Helper, Supervisor, Inventory Management System, Accounting Department, etc. Key process (“the system”): performing repairs and storing information related to repairs Processes: Record Bus ID and reason for repair Determine parts needed Perform repair Calculate parts extended and total cost Record labor hours, cost

DFD Example: Bus Garage Repairs (cont’d) Data stores: Personnel file Repairs file Bus master list Parts list Data flows: Repair order Bus record Parts record Employee timecard Invoices

Bus Garage Context Diagram Mechanical problem to be repaired Fixed mechanical problems Supervisor Helper Bus Repair Process System Repair summary Labor List of parts used Inventory Management System Labor Labor, parts cost details Mechanic Accounting

Logical and physical data flow design Logical DFDs- that illustrate what occurs without showing how it occurs are known as logical DFDs. Physical DFDs- DFDs that show how things happen, or the physical components are called physical DFDs

What is a good data flow diagram? The absence of flowchart structures protection of data Good naming conventions

Differences between flowcharts and data flow diagrams DFDs are not program flow chats and should not include control elements. A good DFD should; Have no data flows that split up into a number of other data flows. Have no crossing lines

Not include flowchart loops of control elements (process “compare” has outgoing data flows that are labeled by the conditions under which a data flow occurs, rather than by the contents of the data flow.) Control Signals From a process Loops

Not include data flows that act as signals to activate processes Input signal ( end of month)

Method of describing the process Structured English Decision tree Decision Table

SUMMARY OF ER-DIAGRAM NOTATION FOR ER SCHEMAS Symbol Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING RELATIONSHIP TYPE ATTRIBUTE KEY ATTRIBUTE MULTIVALUED ATTRIBUTE COMPOSITE ATTRIBUTE DERIVED ATTRIBUTE TOTAL PARTICIPATION OF E2 IN R CARDINALITY RATIO 1:N FOR E1:E2 IN R STRUCTURAL CONSTRAINT (min, max) ON PARTICIPATION OF E IN R E1 R E2 N E1 R E2 (min,max) R E

Questions What is the different between super key and candidate key Explain the distinctions among the terms primary key, candidate key, and super key.

answer A super key is a set of columns that uniquely identifies a row. A Candidate key would be a MINIMAL set of columns that uniquely identifies a row. So essentially a Super key is a Candidate key with extra unnecessary columns in it.

Draw notation to the followings Entity Attribute Relationship Key Attribute Multivalued attributes Derived Attribute Weak Entity Identifying Relationship

Conceptual Design Notations Entity Relationship Attribute

Conceptual Design Attribute Key Attribute Multivalued attributes Derived Attribute Weak Entity Identifying Relationship

Explain the term ‘Degree’ Number of participating entity types. Unary Relationship A relationship between the instances of a single entity type e.g. Person is married to a Person Employee manages Employees Binary Relationship A relationship between the instances of two entity types e.g. An employee works for a department Employee manages Works-for Employee Department

Degree of Relationship Type Ternary Relationship A simultaneous relationship among the instances of three entity types Supplier s supplies part p to project j Part Supplier Supplies Project

Explain term ‘Cardinality’ Cardinality Ratios for Binary Relationships Specify the number of instances of one entity that can (or must) be associated with each instance of another entity. The possible cardinality ratios for binary relationship types are 1:1 1:N M:N

Phases of Database Design Miniworld Requirements collection and Analysis Functional Requirements Data Requirements Functional Analysis Conceptual design High-level transaction Specification Conceptual Schema DBMS-independent Logical design DBMS-specific Logical (Conceptual) Schema Application Program design Physical Design Transaction Implementation Internal Schema Application Programs

Entity Types Strong (Regular) Entity An entity that exists independently of other entity types Employee Weak Entity An entity types whose existence depends on some other entity Dependent

Entity Types Identifying Owner The entity type on which the weak entity type depends e.g. Employee is the Owner of Dependent Identifying Relationship A relationship between a weak entity type and its owner has

Attributes Multi-valued Attribute Composite Attribute An attribute that may take on more than one value for a given entity instance e.g. Employee Skills, Qualifications Composite Attribute An attribute that can be broken down into component parts e.g. Address (Street, City, State, Postal Code) Name (First Name, Middle Initials, Last Name)

Key Attribute (Identifier) An attribute (or combination of attributes) that uniquely identifiers individual instances of an entity type e.g. Emp No Composite Identifier An identifier that consists of a composite attribute e.g. Flight Id (Flight No, Date)

Explain ‘Associative entities’ The presence of one or more attributes on a relationship suggests that the relationship may be represented as an entity type. An associative entity is an entity type that associates the instances of one or more entity types and contains attributes that are relevant to the relationship between those entity instances. The associative entity type CERTIFICATE is represented with the diamond relationship symbol enclosed within the entity rectangle.

Attributes on relationships Date Completed Emp id Emp Name Course id Course Title Completes Course Employee

A university registrar's office maintains data about the following entities: courses, including number, title, credits, syllabus, and prerequisites; Course offerings, including course number, year, semester, section number, instructor(s), timings, and classroom; students, including student-id, name, and program; instructors, including identification number, name, department, and title. Further, the enrollment of students in courses and grades awarded to students in each course they are enrolled for must be appropriately modeled. Construct an E-R diagram for the registrar’s office. Document all assumptions that you make about the mapping constraints.

Consider a university database for the scheduling of classrooms for final exams. This database could be modeled as the single entity set exam, with attributes course-name, section-number, room-number, and time. Alternatively, one or more additional entity sets could be modeled, along with relationship sets to replace some of the attributes of the exam entity set, as course with attributes name, department, and c-number section with attributes s-number and enrollment, and dependent as a weak entity set on course room with attributes r-number, capacity, and building a. Show an E-R diagram illustrating the use of all three additional entity sets listed.

University registrar’s tables: student (student-id, name, program) course (courseno, title, syllabus, credits) course-offering (courseno, secno, year, semester, time, room) instructor (instructor-id, name, dept, title) enrolls (student-id, courseno, secno, semester, year, grade) teaches (courseno, secno, semester, year, instructor-id)

Construct an E-R diagram for a car-insurance company whose customers own one or more cars each. Each car has associated with it zero to any number of recorded accidents.

1 m 1 0..*

person (driver-id, name, address) car (license, year, model) accident (report-number, date, location) participated(driver-id, license, report-number, damage-amount)

Construct an E-R diagram for a hospital with a set of patients and a set of medical doctors. Associate with each patient a log of the various tests and examinations conducted.

Hospital tables: patients (patient-id, name, insurance, date-admitted, date-checked-out) doctors (doctor-id, name, specialization) test (testid, testname, date, time, result) doctor-patient (patient-id, doctor-id) test-log (testid, patient-id) performed-by (testid, doctor-id)

Explain the difference between a weak and a strong entity set. Answer: A strong entity set has a primary key. All tuples in the set are distinguishable by that key. A weak entity set has no primary key unless attributes of the strong entity set on which it depends are included.

ER DIAGRAM – Entity Types are: EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT

Designing an ER Diagram Consider the following set of requirements for a University database. Design an ER diagram for this application: The university keeps track of each student's name, student number, social security number, current address and phone number, permanent address and phone number, birthdate, sex, class (freshman, graduate), major department, minor department (if any), degree program (B.A., B.S., ... Ph.D.).  Some user applications need to refer to the city, state, and zip code of the student's permanent address and to the student's last name.  Both social security number and student number are unique for each student. All students will have at least a major department. Each department is described by a name, department code, office number, office phone, and college.  Both the name and code have unique values for each department. Each course has a course name, description, course number, number of credits, level and offering department.  The course number is unique for each course. Each section has an instructor, semester, year, course, and section number.  The section number distinguishes sections of the same course that are taught during the same semester/year; its value is an integer (1, 2, 3, ... up to the number of sections taught during each semester). A grade report must be generated for each student that lists the section, letter grade, and numeric grade (0,1,2,3, or 4) for each student and calculates his or her average GPA.

University ER Diagram Department Student Course Section Degree Major In Department DName DCode OfficeNumber OfficePhone College Name StudentID SSN Birth date Student Sex Minor In Class Address Offer City State Zip Grade_Report Course CName CourseDesc CNumber Credits Letter Grade Instructor Year GPA Belong_To Numeric Grade Section SectionNumber Semester

Structured English IF credit limit exceeded THEN IF customer has bad payment history THEN refuse credit ELSE IF purchase above Rs. 1000/= ELSE refer to manager ELSE allow credit

Structured English used to Explain the conditions which occurs in a process. Identify the decisions which makes these conditions occur. Find alternative actions to be taken The process is defined by using three types of statements Sequence structure Decision structure Iteration structure

System design Approaches Modern structured design Information engineering Prototyping JAD RAD Object-oriented