Matakuliah : M0034 /Informasi dan Proses Bisnis Tahun Versi : 2005 : 01/05 Pertemuan 12 Systems Analysis and Design of a Business Event Driven System Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : • Menjelaskan tahapan dalam menganalisa dan merancang aplikasi TI Outline Materi • Model-model tahapan Analisis & Perancangan Sistem Informasi – Data Flow Diagrams – Kamus Data – Logical Models – Data Modeling Lanjutan Dari Pertemuan 11 STEP I-B: Systems Analysis - Structuring Systems Requirements Using Process Modeling Some analysis methods create several versions of data flow diagrams, including context data flow diagrams, data flow diagrams of the current physical system, data flow diagrams of the current logical system, and data flow diagrams of the proposed logical system. Often, each data flow diagram includes a thorough description of each data flow. Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Exhibit 4-4 Christopher Inc., Context Diagram Order A context O diagramDesired the circle represents shows the sources and Shipping/Bill Information Sales / Decision computer processing Customers destinations of the data that collection Makers are outside the boundaries system Payment or scope of the system Finally, Christopher Inc.’s Christopher Inc. needs a system being analyzed. that Christopher Inc. needs a enables communication with systems should allow Shipping Data You do not showsystem the that allows them to customers times during access byseveral internal agents data stores and datathe flows send shipping data to their process (e.g., customers send (such as management and in order wellreceive as payment within the boundaries of data asand carriers Carriers Confirmation otheranddecision-makers) to data, Christopher Inc. sends the system. shipment confirmations criticalsales, data billing, and and back shipping, from their carriers. payment data). information. Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Exhibit 4-5 Christopher, Inc. Level 0 Data Flow Diagram 1.0 Process customer orders Shipping request data Bill Customers 2.0 Process shipments to customers Desired information Decision makers Payments due data 3.0 Process payments from customers Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Exhibit 4-6 Christopher Inc., Level 1 Data Flow Diagram Order 1.1 Approve and record customer order data Shipping Request Data Irwin/McGraw-Hill Customer order data Approved Order Order data 1.2 Generate informatio n about orders Desired information The McGraw-Hill Companies, Inc., 2000 Context Dictionary Some analysts like to add more detail to context and other data flow diagrams, by providing the data elements that comprise the data flows on the diagram. We will refer to these data flow details as the context dictionary. Each entry in the context dictionary is separated from its definition by an equal sign (=) and is defined using the following set of symbols: – + – {} Irwin/McGraw-Hill To connect elements of the definition To identify repeating elements of the definition The McGraw-Hill Companies, Inc., 2000 Sample Context Dictionary Entries Sales-Invoice = Invoice # + Sale-Date + Register # + Customer Name + Salesperson Name + {Merchandise Name + Qty-Sold + Price + Item-Total} + Sale-Total Customer-Profile = Report-Date + Name + State + Birth date + Telephone + {Merchandise Description + Qty-Sold} Product-Sales = Report-Date + {Merchandise # + Merchandise Description + Qty-Sold + %Margin + $ Contribution} Accounting-Revenue = Report-Date + Reporting-Period + Revenue for Reporting-Period Sales-by-Salesperson = Report-Date + {Salesperson Name + {Merchandise-Description + Qty-Sold + $ Contribution} + Total Sales + Total Contribution Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Additional Prototyping Steps When you are creating data flow diagrams or work-flows for The number of reporting required for anmany application is a a business process,processes how do you know how recording, function of the number views required by information maintaining, andofreporting processes you need customers. for an IT You will need one reporting process for each required output view. To application? help you plan, determine how many of the following three types of Yououtput can use youryour REAL model and the context diagram as a reporting views information customers need: guide. - Source documents: printed electronic transmission of event data documentation •contextordiagram - Preformated reports: •inflows andrecording outflowsprocess to You need one ininyour ITIT application forfor Youreports need one maintenance process your application that are regularly informationREAL customers Record event dataused each business event object in thebyapplication’s model each resource, agent, and location object in the application’s -Ad hoc reports: Maintain resource, agent, location data REAL model reports that information customers queries, design and request to provide Report source documents, reports a new view or a view that is rarely used Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 McKell's Retail Sale Store Case Checkpoint Reporting toexample, handle key functions: Four processes Usingmaintenance our processes retail sale themanagement IT application ••Maintain Sales Invoice - the customer's bill; Customer Data, would have: ••Maintain CustomerMerchandise Profile - a report that provides information Data, •One recording process (i.e., Record Sale Data) to about customers and their purchasing habits; •Maintain and record theSalesperson one event ofData, interest • Product Sales - a report that provides the margin and •Maintain Register Data contribution for each merchandise items type sold; to keep our resource, agent, and location data up to • Accounting Revenue - a report that provides a calculation date andrevenue valid for a specific period; of sales • Sales by Salesperson - a report that details the merchandise and contribution to sales revenue for each salesperson) Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Step 1-C Structuring Systems Requirements Using Logical Models After completing data flow diagrams that graphically show the flow of data to fulfill the system requirements, many analysts use logic models to represent the logic of the information processes denoted in the data flow diagram(s). Their objective is to produce structured descriptions and diagrams that enumerate the logic contained in each process denoted in the data flow diagram(s). Techniques used during this step include structured English, decision tables, decision trees, and state-transition diagrams or tables. We will overview just one of these techniques: Structured English. Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Structured English Structured English is used to plan and document the steps of a computer instruction set (a program) without using a programming language. Structured English is used to define the detailed logic of each information process (Exhibit 4-7). Structured English focuses on conciseness and clarity to document the essence of an information process and eliminates: Adjectives. Adverbs. Compound sentences. Non-imperative expressions. All but a limited set of conditional and logic structures. Most punctuation. Footnote type details. Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Exhibit 4-7 Structured English Example Data Input Process Output Irwin/McGraw-Hill For each Customer-Order do the following: 1. Search for Customer-Name if found Confirm customer info with customer if not found Enter customer data 2. Check for availability of inventory requested if available Confirm ship-to-information if not available Inform customer with Order-Confirmation 3. Provide customer with Order-Confirmation 4. Send notification to packing agents The McGraw-Hill Companies, Inc., 2000 Business Event Risks In addition to including the logic for completing a desired task, this step provides an opportunity for thinking about ways information technology can be used to help reduce business and information risks An operating event occurring at the wrong time or sequence. An operating event occurring without proper authorization. An operating event involving the wrong internal agent. An operating event involving the wrong external agent. An operating event involving the wrong resource. An operating event involving the resource amount. An operating event occurring at the wrong location. Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Information Event Risks Information event risks include the risks associated with incomplete, inaccurate, or unauthorized recording, maintaining, and reporting information activities: Recording risks - Recording risks include recording incomplete, inaccurate, or invalid data about an operating event. Incomplete data results in not recording all of the relevant characteristics about an operating event in the data stores. Inaccuracies arise from recording data that does not accurately represent the event. Invalid refers to data that are recorded about a fabricated event. Maintaining risks - Maintaining risks are essentially the same as recording risks. The only difference is that the data maintained relates to resources, agents, and locations rather than operating events. Reporting risks - Reporting risks include data that are improperly classified, improperly summarized, provided to unauthorized parties, or not provided in a timely manner. Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 STEP I-D: Systems Analysis: Structuring Systems Requirements Using Conceptual Data Modeling To focus on the specific data you want to capture to describe reality and generate needed outputs we use a conceptual data model. Conceptual data models represent the entities or objects you want to collect data about, and rules about the meaning and interrelationships among these data objects. To complete this step, most analysts use one of two modeling techniques: Entity-Relationship (E-R) or Object Oriented (OO). Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 ERD Data Entity anything, real or abstract, about which we want to store data. synonyms include entity type, entity class or object Entity Name Data relationship a natural association that exists between one or more entities business activities or events that link one or more entities Irwin/McGraw-Hill Relationship Name The McGraw-Hill Companies, Inc., 2000 Example Customer Places/ or Is Placed By Orders Contains or Is Contained By Supplies Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Entities AGENTS Entities that describe roles played in a system. They usually represent people or organizations. ACCOUNT, AGENCY, ANIMAL, APPLICANT, BORROWER, CHILD, CLASS, CLIENT, CONTRACTOR, CREDITOR, DEPARTMENT, EMPLOYEE, EMPLOYER, INSTRUCTOR, MANAGER, OFFICE, SALESPERSON, SUPPLIER, TEAM, VENDOR Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Entities RESOURCES Entities that describe tangible things. Most tangible things are easy to identify because you can see them. BOOK, CHEMICAL, COURSE, DISK, EQUIPMENT, MACHINE, MATERIAL, METAL ,PART, PRODUCT, PROGRAM, SERVICE, SUBSTANCE, VEHICLE Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Entities EVENTS Most events are easy to identify because the business records data on forms or files. Events are characterized by the fact that they happen or have duration AGREEMENT, APPLICATION, APPOINTMENT, ASSIGNMENT, BACKORDER, BUDGET, CLAIM, CONTRACT, DEPOSIT, DISBURSEMENT, FORECAST, INVOICE, JOB, LICENSE, PAYMENT, PURCHASE ORDER, REGISTRATION, RESERVATION, RESUME, SEMESTER, SHIPMENT, STEP, TASK, TEST, WORK ORDER Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Entities LOCATIONS Entities that describe locations BRANCH, BUILDING, CAMPUS, CITY, COUNTRY, COUNTY, ROOM, ROUTE, SALES REGION, SCHOOL ZONE, PROVINCE, STORAGE BIN, VOTER DISTRICT, WAREHOUSE ZONE Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Entities and Entity Classes or Groups Entities of a given type are grouped into an entity class Thus, the EMPLOYEE entity class is the collection of all EMPLOYEE entities Entity classes are described by their structure An instance of an entity is the representation of a particular entity such as Customer 1234 and is described by its values of the attributes Name entities with nouns that describe above (singular) INVOICE Instances of the entity are referred to in the plural - Invoices Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Attributes Data attributes are characteristics that are common to all or most all instances of a particular entity. Synonyms include: properties, data elements, descriptors, and fields Attributes take on values for each occurrence of an entity. An attribute must have more than one legitimate value otherwise it is a constant. Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Identifier Identifier is an attribute or combination of attributes that uniquely identifies one, and only one occurrence of an entity. Synonyms include key or primary key For example, Employee instances could be identified by a SocialInsuranceNumber, EmployeeNumber or EmployeeName Identifiers of an entity instance consists of one or more of the entity’s attributes An identifier may be either unique or non-unique Identifiers that consist of two or more attributes are called composite identifiers Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Relationships Entities can be associated with one another in relationships. A relationship can include many entities; and the number of entities in a relationship is a degree of the relationship. Degree 2 relationships are common and are called binary relationships 1:1 one to one AUTO-ASSIGNMENT 1:N one to many DORM-OCCUPANT N:M many to many STUDENT-CLUB Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Relationship Degree SALESPERSON FATHER MOTHER PARENT SP-ORDER Irwin/McGraw-Hill ORDER CHILD Degree 2 Degree 3 The McGraw-Hill Companies, Inc., 2000 Three Types of Binary Relationships may or may not These are often called HAS A relationships EMPLOYEE 1:1 AUTO AUTO-ASSIGNMENT must exist DORMITORY 1:N STUDENT DORM-OCCUPANT Shows MAXIMUM cardinality STUDENT N:M CLUB STUDENT-CLUB Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Other relationships Minimum cardinality DORMITORY 1:N STUDENT DORM-OCCUPANT Recursive relationship STUDENT 1:N ROOMS-WITH Weak Relationships EMPLOYEE ID Dependent entity Irwin/McGraw-Hill BUILDING 1:N DEPENDENT 1:N APARTMENT The McGraw-Hill Companies, Inc., 2000 ERD: Semantic Object Model (SALSA) CUSTOMER SALESPERSON N:1 I:N SALES-ORDER I:N LINEITEM I:N ITEM Access Database Relationships Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 REAL Diagram (1,1) Product-Item (Resource) (0,*) (1,1) List Items Ordered (Event) (0,*) Take Order (Event) (0,*) (1,*) Customer (Agent) (0,*) SalesPerson (1,1) (Agent) CUSTOMER SALESPERSON (Customer#, CustomerName, Street, City, State, Zip) ITEM (Item#, Name, Description) (SalesPerson#, SalesPersonName) SALES-ORDER (Order#, Date, [Customer#], [SalesPerson#],Subtotal, Tax, Total) ITEMS-ORDERED (LineItem#, [Order#],Quantity, [Item#], ExtendedPrice) Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Exhibit 4-8 Recursive Relationship Example Employee Irwin/McGraw-Hill manages Employee manages The McGraw-Hill Companies, Inc., 2000 Relationships Described by verbs or verb phrases Multiple relationships are possible between two entities Is Being Taken by COURSE STUDENT Was Taken by Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Ordinality Defines whether the relationship between entities is mandatory or optional. Ordinality determines the minimum number of occurrences of one entity relative to another. Ordinality must be defined in both directions Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Cardinality Defines the maximum number of occurrences of one entity for a single occurrence of the related entity This is the number to the right of the colon below. Ordinality is the number to the left of the colon. 0:M Order Customer 1:1 Places Irwin/McGraw-Hill 0:M Products Contains 1:M The McGraw-Hill Companies, Inc., 2000 Relationships That Can Be Described by Data Normally relationships are not described by data attributes However if Cardinality is many in both directions, the relationship itself is frequently described by data attributes. “Many to Many” relationship An associative entity is a data entity whose attributes describe a relationship between two or more fundamental entities Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Many to Many Service 1:M Shipment Requested Service Is Placed For 0:M 0:M 1:1 OR Order AND 1:1 1:M Product Irwin/McGraw-Hill Ordered Product 0:M Is Placed For 0:M Invoice The McGraw-Hill Companies, Inc., 2000 Linking Objects with Many to Many (*:*) Relationships Create a separate table that includes the key attributes from both object tables. Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Linking Objects with One to One (1:1) Relationships Create a separate table that includes the key attributes from both objects OR Put the key attribute of either object in the table of the other When you are linking two events with a 1:1 relationship, either put the key of the prior event table into the subsequent event table or create a third table. Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Linking Objects with One to Many (1:*) or Many to One (*:1) Relationships Post the key attribute of the object with the 1 side of the cardinality into the table of the many (*) side of the cardinality. If you follow the specified rule and find that you would post the key of the event that occurs second into the table of the event that occurs first, create a separate table that includes the key attributes from both event tables. Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Exhibit 4-9 Christopher Inc. REAL Model Resources Agents Events (1,1) (1,*) (0,*) Inventory (1,*) Receive customer order (0,*) (1,1) (0,*) (0,*) Ship Order (0,*) (0,*) (0,*) (1,*) Bank is kept at (1,1) (0,*) Customer (1,1) (1,1) (0,*) increases Cash (1,1) (0,*) Collect payment (0,*) Shipping personnel Shipping firm sends (0,*) (1,1) Irwin/McGraw-Hill (1,1) (1,1) (1,1) (0,*) Order personnel Cashier The McGraw-Hill Companies, Inc., 2000 Exhibit 4-10 Different Notations to Represent Relationships Cardinalities (1,1) (1,*) (0,1) (0,*) Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Exhibit 4-11 Entity Attributes in an ER diagram Inventory Item # Inventory Item # Inventory Item # Inventory Item # Irwin/McGraw-Hill Inventory Item # Inventory Inventory Item # Inventory Item # The McGraw-Hill Companies, Inc., 2000 Exhibit 4-12 Example Relational Database Table Customer Table Customer # Last Name 1001 Mays 1002 McCovey 1003 Bonds Irwin/McGraw-Hill First Name Willie Willie Bobby Address Telephone 112 Say Hey Ave. 147 Fencebuster Way 301 Out-of-here Blvd. 242-4242 999-9999 123-4567 The McGraw-Hill Companies, Inc., 2000 SALES table (without a separate table for the sale-inventory *:* relationship): Sales Event # Terms of Sale Salesperson Customer Inventory Inventory Price ID ID Item # Quantity each Date 1 2/5 2 10, net 30 4 3654 987 5 2.50 1 2/5 2 10, net 30 4 3654 785 4 1.75 1 2/5 2 10, net 30 4 3654 562 15 1.99 2 2/5 2 10, net 30 6 746 998 27 2.95 2 2/5 2 10, net 30 6 746 624 94 1.05 3 2/5 COD 8 2956 847 18 9.99 3 2/5 COD 8 2956 112 29 5.75 3 2/5 COD 8 2956 413 8 3.00 3 2/5 COD 8 2956 335 57 7.50 Sales Event Table Sales Event # 1 2 3 Date 2/5 2/5 2/5 Salesperson Terms ID 2 10, net 30 4 2 10, net 30 6 COD 8 Customer ID 3654 746 2956 (*:*) Sale-Inventory Table Sales Event # 1 1 1 2 2 3 3 3 3 Inventory Item # 987 785 562 998 624 847 112 413 335 Inventory Quantity 5 4 15 27 94 18 29 8 57 Price each 2.50 1.75 1.99 2.95 1.05 49.99 15.75 16.00 17.50 Exhibit 4-13 Christopher Inc. Event Logical Structures - Order Taking CUSTOMER Customer #, Name, Street Address, City, State, Zip, Telephone# Credit Rating, Credit Limit EMPLOYEE, Employee #, Name, Address Telephone #, BirthDate Start date, Salary, Irwin/McGraw-Hill RECEIVE CUSTOMER ORDER Sales Order #, [Customer #], [Customer Order Representative Employee #], Date, Time, Instructions, Cancel by Date, Location or order ORDER/INVENTORY [Sales Order #], [Inventory item #], Quantity Ordered INVENTORY Inventory Item #, Description, Product Specification, Reorder Point, Current Price, Beginning Quantity, Beginning Quantity Date Legend RELATION Primary Key [Foreign Key] The McGraw-Hill Companies, Inc., 2000 Exhibit 4-13 Christopher Inc. Event Logical Structures - Shipping Sales Order Customer Employee SHIPPING FIRM, Shipping Firm ID#, Shipping Firm Name, Address Telephone #, Contact Person Rate Information Irwin/McGraw-Hill SHIP ORDER Invoice #, [Sales Order #], [Customer #], [Shipping Personnel Employee #], [Shipping Firm ID #], Date, Time, Shipment tracking #, Sales Tax SHIP/INVENTORY [Invoice #], [Inventory Item #], Quantity Shipped, Price Each Inventory The McGraw-Hill Companies, Inc., 2000 Exhibit 4-13 Christopher Inc. Event Logical Structures - Cash Collection BANK CASH Bank #, Bank Name, Address Cash Account #, [Bank #], Type of Account Beginning Balance Date Shipping Order COLLECT PAYMENT [Invoice #], [Cash Receipt #], Amount applied to this Invoice Customer Employee Irwin/McGraw-Hill Cash Receipt #, [Cash Account #], [Customer #], [Cashier Employee #], Date, Time, Amount Received, Electronic Funds Transfer # SHIP/COLLECT PAYMENT The McGraw-Hill Companies, Inc., 2000 Exhibit 4-14 Linking the Order Recording Process with the Data Repository INVENTORY ORDER Order-Data Record Sale CUSTOMER ORDER PERSONNEL ORDER-INVENTORY Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Exhibit 4-15 Sample Maintenance Processes and Data Access Register-Data Customer-Data Salesperson-Data Merchandise-Data Irwin/McGraw-Hill Update Bank Data BANK Update Customer Data CUSTOMER Update Shipping firm Data SHIPPING FIRM Update Inventory Data INVENTORY The McGraw-Hill Companies, Inc., 2000 Exhibit 4-16 Example fo Generating a Sales-by-Salesperson Report MERCHANDISE Request Sales-bySalesperson report Sales-bySalesperson SALE Report Sale SALESPERSON SALE-MERCHANDISE Sales-by-Salesperson = Report-Date + {Salesperson Name + {Merchandise-Description + Qty-Sold + $ Contribution} Total Sales + Total Contribution Irwin/McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Tugas Agar perkuliahan pada pertemuan 14 bisa berjalan dengan lancar, Setiap mahasiswa diwajibkan untuk mendownload dan mencetak kasus pada pertemuan 14 Berlanjut ke Pertemuan 13