Popular in Course
Popular in Information technology
This 90 page Class Notes was uploaded by Trever Kuhic on Monday October 26, 2015. The Class Notes belongs to INFSCI2510 at University of Pittsburgh taught by Staff in Fall. Since its upload, it has received 36 views. For similar materials see /class/229372/infsci2510-university-of-pittsburgh in Information technology at University of Pittsburgh.
Reviews for INFORMATIONSYSTEMSANALYSIS
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/26/15
InfSci 2510 Information System Analysis and Design Lecture 7 10212002 Assignment 5 Cash Machine Data Flow Diagram 0 Assignment 5 Process 2 Logic Cash Request QP PP N gt1 Initiated by Account in Data Store Dl Present User Interface to get Cash Amount Get Cash Request from Customer Verify that there is sufficient cash in the machine Make Cash Withdrawal to Bank Central DB IF Withdrawal Completed OK THEN Issue Cash Print Receipt for withdrawal ELSE Withdrawal Refused Print Receipt with reason for denial Assignment 5 Cash Machine Account r4 1 l l v u casn RequestDenIed Request Approved casn Issued TO Print Receipt Sumclemor Amount orcasn Insumclem cash In this request Data Flow Diagram 2 cash amountlett Amount available Amount avanabl m CasnAmount Assignment 5 Process 21 L0 ic Process Withdraw request 1 Initiated by Account in Data Store D1 2 Get Cash Amount of Request from Customer 3 Invoke 22 to verify cash amount in machine 4 IF insufficient THEN Print Receipt for refusal ELSE Invoke 23 to make Cash Withdrawal from bank IF Withdrawal Completed OK THEN Invoke 24 to Issue cash and update available amount Print Receipt for withdrawal ELSE Withdrawal Refused Print Receipt with reason for denial END IF END IF Assignment 5 Process 22 Logic Verify for sufficient cash 1 Get Cash Amount of Request from 21 2 Get Cash Amount available from Data Store D2 3 Report back to 21 whether or not there is sufficient cash for the request Assignment 5 Process 23 Logic Withdraw from Bank DB 1 Get Cash Request ie Account and Cash Amount from 21 Send Withdraw Request to Bank s Central DB Get result approval or refusal back from Bank s Central DB Report back to 21 whether the withdraw request was approved and done or refused Assignment 5 Process 24 Logic Issue cash 1 959 Get Cash Amount from 21 Issue the amount of cash from machine Get amount of cash available from Store D2 Calculate amount of cash remaining Update amount of cash available in Store D2 Topics 0 ISAD so far ill Review 0 Information Gathering 0 Requirements Analysis Use Cases System Development Life Cycle Identify problems or opportunities Determine the requirements Analyze the existing system Design a solution the intended system Develop the new system Test functional correctness and performance Implement deploy the system MaintenanceEvaluation fixesenhancements Information System Analysis amp Design Two important tools for analysis and design Data Flow Diagram analysis and design of the information ow utilizing hierarchical functional decomposition to model the business in a system EntityRelationship Model analysis and design of information structure used in a system Data Flow Analysis Analyze the functional requirements Design a solution the intended system functions Primarily an analysis technique focusing on the business processes and the information ow between these processes Build a model to understand how business is done in the application domain Also extends into a design tool to reason about how the business processes may be reorganized Physical DFD a tool to organize the software system which would automate the business processes EntityRelationship Modeling Analyze the information structure Design a solution the intended system database Primarily an analysis technique focusing on the information structures which support the way business is done in the application domain Also extends into a design technique Works with DFD to come up with the details of the data stores and the data ows Provides the basic steps for the design and implementation of database part of an information system More Details in Data Flow Analysis Specify every Data Flow Specify every Data Structure Specify every Data Element Specify every Data Store in Data Dictionary Specify every Process type of process process logic in Process Description The Data Dictionary relevant to the Data Flow Diagrams Data Flow Diagram Data Dictionary gt Data F law Data Stare Process Specification from the Data Flow Diagrams Process Description Data Flow Diagram Structured Decisions Fm MK Speci cation of Process Logic Structured Decisions Structured English Decision Table Decision Tree SemiStructured Decisions 0 Decision Support System Structured English Structured English Type Example W gimmn Mean an 39 i W mileem mam c39 ion ctu IF Condition A is true Only IF a condition is true complete THEN take Action 1 the following statements otherwise ELSE takegAc o39n 2 jump to the ELSE ENDIF39 i F IA WEN ake Mme an age gamma WEW take fusion L W5 In summon THREE ning 5mm 25 13MB 39Itera on DO WH LE condition Block 39of statements that are repeated takeAction 39until done END DO Deuslon Table Note the four quadrants and how the logic moves clockwise beginning from upper left Alternatives 5 h combinationslisted in m i g 2quot columns madam 1A iii n i ii take Decision Table Example The store s policy about customer checkout process Alternatives Moniker Y Y N N 2332 Wmsmth 111D Y N Y N deem N Y N Y Actions mr b t e Ring up sale 7 Verify credit card record Call supervisor for approval Call bank for credit authorization Decision Tree Condition 1 Condition 2 0 IF condition 391 THEN action Decision Tree Example Ring up sale Call bank for credit authorization Choosing the right form Use structured English when 7 there are many repeated actions OR 7 communication to end users is important Use decision table when 7 complex combinations of conditions actions need detailed analysis 7 we need to effectively avoid impossible situations redundancies and contradictions Use decision tree when 7 The sequence of conditions and actions is important OR 7 Not every condition andor action is relevant they only appear in some of the branches Use combinations of the above Process Specification from the Data Flow Diagrams Process Description Structured Decisions process Structured Decision 39ecision Data Flow Diagram Description English Table Tree XXX XXX Prdcess SemiStructured Decisions Logic Z Decision xxxv Support SYStem ltgt 7 Decision Support System in comparison to structured decisions in M15 Input data Reports Action lgt Igt Igt Problem or Opportunity Decisions I Opportunities Questions Alternatives Choices Input data Igt Phases of Problem Solving Intelligence awareness of the problem or opportunity an active awareness of the changes in the environment that call for action 0 Design formulation of a problem and generation of possible alternative solutions 0 Choice choosing a solution and taking action to implement the solution The Shape ofAutomation forM en and Management H Simon 1965 Speci cation of Process Logic Structured Decisions Structured English 0 Decision Table 0 Decision Tree SemiStructured Decisions Decision Support System intelligence phase support design phase support choice phase suppOIt Decision Support System Intelligence Phase 7 highlight potential problems making them explicit 7 present information through various models and views Design Phase 7 generation and identi cation of alternatives 7 comparison to past practices rules of thumb applied 7 whatif scenarios Choice Phase 7 choosing a solution to the problem 7 comparison and contrast solutions in multiple criteria System Development Life Cycle the process of Information System Analysis and Design Identify problems or opportunities Determine the requirements Analyze the existing system Design a solution the intended system Develop the new system Test functional correctness and performance Implement deploy the system MaintenanceEvaluation fixesenhancements Analysis of The Existing System If there is an existing system Develop the Data Flow Diagrams to understand the current system use the DFDs to convey and communicate your understanding Develop the EntityRelationship Model to discover the information structure which supports the way business is done in the current system The DFD and ERM should demonstrate to be consistent with each other Toward Proposing a New System Use the DFD as a design tool to reason about how we may improve the current system For the proposed changes develop a new Logical DFD for the proposed system Based on the new Logical DFD develop the revised ERM using the old ERM as reference With the data stores and data ows sorted out in details develop the Physical DFD for the new system Identify the processes which should be automated Partition the physical DFD into software subsystems to work out the design details of each subsystem Developing a New System Develop Logical DFD for the new system applying hierarchical functional decomposition to reach the details with a topdown design approach Based on the Logical DFD gather the functional requirements of the system This becomes the basis to write a contract for system development Develop the ERM to meet the data requirements With the detailed design of the data stores and data ows develop Physical DFD for the new system Identify the processes which should be automated Partition the physical DFD into software subsystems to work out the design details of each subsystem Topics 0 ISAD so far in Review 0 Information Gathering 0 Requirements Analysis Use Cases Reading Chapter 3 Sampling and Investigating Hard Data Chapter 4 Interviewing Chapter 5 Using Questionnaires Chapter 6 Observing DecisionMaker Behavior and the Office Environment Sampling Where to gather information Documents Reports forms memos printouts webpages People Interview questionnaires to observe Why do we need to sample We must sample to contain cost to improve efficiency and effectiveness to reduce bias Sampling Strategy Systematic Sampling Random sampling such as every k h person every kth day easy but many pitfalls Stratified Sampling Identify subgroups strata to select a sample which cuts across strata Cluster Sampling Select groups which seem typical Work ow Analysis Tracing the life cycle of documentsforms where are the blank forms available who owns them blank forms who fill them out who else work with the lled forms where are they filled forms archived who owns them filled forms Interviewing Five steps in planning the interview 0 Read background material 0 Establish interview objectives 0 Decide whom to interview 0 Prepare the interviewee 0 Decide on Question Types and Structure Question Types Openended Questions easy relaxed spontaneous What s your opinion about the current state of internet business in your rm How well do you think are the customers being served What are some common dataentry errors made Closed Questions precise ef cient controlled How many calls does the call center receive on an average day Which of the following is most effective in your view 7 phone order including fax 7 order submitted via the web 7 customer who come to the store to order What is your top priority if we are going to improve the IT infrastructure 20 Structure of Questions from Specific to General pyramid Already prepared by prior communication go right to the point in getting specific answers with closed questions but make it general to solicit feelings and opinions in other relevant aspect from General to Specific funnel Need to warm up in first soliciting general feelings leading to closed questions for specific answers may need multiple goals prepared with specific questions from Specific to General and back to Specific diamond Often the best approach Pyramid Example 1 What specifically is the problem you are experiencing with your rewall 2 Have you considered other methods to improve security of corporate data 3 What do you think would make security more effective here 4 In general how do you feel about security of data versus the importance of intemet access 21 Funnel Example What are you reactions to the new webbased procurement system What other departments are involved in implementing the system What items will be available for purchase on this site Is there any essential item that has been excluded from the web site Diamond Example What five kinds of information are tracked by the free web site usage service you use What are the promotional activities you feature on your web site in exchange for using this service What is the value of the usage information to you as a webmaster What are two surprising items concerning enduser behavior on your site that you have discovered by using this service Are cookies a better way to measure enduser site usage 22 Joint Application Design known as JAD developed by IBM from 8 to 12 people ideally to cut time and cost required by personal interviews to engender more user identification with the new information system as a result of their participation in the process to allow user involvement in the ISAD process Joint Application Design known as JAD 0 Session leader does not need to be an eXpert System Analyst Instead we need the session leader to be an excellent communicator to facilitate appropriate interaction 0 We do need one or two observers in the JAD session to be eXpert System Analysts to mark important and relevant information from the session 23 Topics 0 ISAD so far in Review 0 Information Gathering Equirements Analy Use Cases Requirements Description of needs and desires 0 Define requirements unambiguously so that risk areas can be identi ed In the requirements phase we want to at least state the following clearly 7 and have that documented Overall Project Statement Identify the customer who are we serving What are the goals System functions what the system should do System attributes quality characteristics of the system functions 24 Requirements Document Taking the PointOfSale POS system as case study Overall Project Statement The purpose of this project is to design and develop a pointofsale POS system for use in the retail stores The stake holders Giant Eagle for use by cashiers Goals 7 quick check out for customers 7 fast and accurate sales analysis 7 automatic inventory control Requirements Document System Functions The system should do process retail sale while keeping inventory immediately uptodate with accurate sales analysis always available List them in a table table of functional requirements System Attributes For each of the system functions describe the quality characteristics required credit checking must respond within 10 seconds payment logged to accounts receivable within 24 hours Incorporate these into the table of functional requirements 25 Functional Requirements System Functions Describe What the system should do in a table Function Categories State how important is that function Evident system should do this and obvious to users that the system must do this Hidden system should do this but not Visible to users Hidden functions are often missed Frill optional nice to have and it is not costly Functional Requirements List the System Functions in a table Ref Function Description Category R1 1 Record the current sale the items purchased evident R1 2 Calculate current total sale including tax and evident coupons R13 Capture purchase item information from its bar evident code or use use manually entered UPC R1 4 Update inventory quantities when a sale is made hidden R1 5 Log every completed sale hidden R1 6 Cashier must log in with employee ID and evident password to use the system R1 7 Provide a persistent storage system hidden 26 Functional Requirements Organize by functional aspects payments Ref Function Description Category R2l Handle cash payments capturing amount tendered and calculate balance due evident R22 Handle credit card payment capturing credit information from card reader or by manual entry and authorize payment with the store s credit 39 39 39 service via modem connection evident Handle check payment capturing driver s license information by manual entry and authorize payment by verifying the personal check s payment record kept inhouse evident R24 Log credit payments to accounts receivable system for subsequent resolution with credit authorization service hidden FURPS Requirements checklist Functional features capabilities security Usability human factors help documentation Reliability frequency of failure recoverability predictability Performance response time throughput accuracy availability resource usage Supportability adaptability maintainability configurability 27 FURPS Requirements checklist Implementation resource limitations languages and tools hardware Interface constraints imposed by interfacing with external systems Operations system management in its operational setting Packaging the means for deploying the system Legal licensing charges propagation System Attrlbutes The quality characteristics of the system ease of use fault tolerance response time interface metaphor in use retail cost maximum load of users afforded performance versus load platforms 28 System Attributes The quality characteristics of the system as exhibited in the performance of functions incorporate into the table of functional requirements Ref Function Cat Attribute Notes Cat R19 Display description and evident response max 5 sec must price of item recorded time interface form based must metaphor colorful want R24 Log credit payments to hidden fault must log to must accounts receivable foerance accounts system for subsequent receivable 9553mm W Cred within 24 hours servrce response max 10 sec must time Topics 0 ISAD so far in Review 0 Information Gathering 0 Requirements Analysis Use Cases Use Cases 0 Reference Applying UML and Patterns 2nd edition Craig Larman Prentice Hall 2002 on reserved in IS Library Chapter 6 UseCase Model Writing Requirements in Context Use Cases Originally developed by Ivar Jacobson 1992 accepted as a good method in ISAD to see the functional requirements of a system Well received in the ObjectOriented Analysis and Design community although Use Cases are not themselves rooted in obj ect oriented approach Use Cases Diagram 1994 adopted as part ofUlVlL the Unified Modeling Language for OOAD Use Cases and Requirements 0 Traditionally the requirements are stipulated in a contractual document between the developer and the customer 0 A use case is a narrative documentation in text that describes the sequence of events of an actor an external agent using a system to complete a process Use Case describing a process Use case name the use case with a descriptive name Primary Actor name the role of the external party interacting with the system Purpose the intention of the use case Other stakeholders other parties who may have an interest here Pre conditions situations assumed to be true to start with Post conditions situations guaranteed to be true upon completion Type brief casual full References reference numbers of related requirements Use Case Example POS Use case buy items with cash Primary Actor cashier Purpose to capture the sale of items purchased with cash Other stakeholders customer desires to make the purchase store owner capture sale and account for it Pre conditions cashier already logged on Post conditions cash collected and inventory updated Type brief References R21 Coming up With the Use Cases How can we find the Use Cases ActorBased who EventBased external events Domain Process business processes from start to finish The use cases can then point us to the functional requirements for the system Use Case Diagram Treating the system to be built as a black box the use case diagram defines the system boundary and the actors external parties interacting with the system The use case diagram presents a set of use cases in the context of the external actors as to how they would use the system U59quot aise 1 The System Use Case Diagram POS System Cashier 7 Buy Items p eaccounts receivable 7 n 39 Sgtisaal rPric L 39 sales 4 Refundipurchased quot re o Items P0int0fSale System Manager Use Case type brief Use case name the use case with a descriptive name Primary Actor name the role of the external party interacting with the system Purpose the intention of the use case Other stakeholders other parties who may have an interest here Preconditions situations assumed to be true to start with Posteonditions situations guaranteed to be true upon completion Type brief References reference numbers of related requirements Use Case type casual full 0 Casual use case that is expressed in an ideal form remaining relatively free of technology and implementation details Casual Use Case may then consist of a more elaborate description of the Typical Course of Events Full concretely describes the process in terms of its real current design committed to specific technologies for implementation with full details consistent with the preconditions and postconditions Use Case type Casual Use case buy items with cash Primary Actor GaShier Purpose to capture the sale of items purchased with cash Other stakeholders customer desires to make the purchase store owner capture sale and account for it Preconditions cashier already logged on Post conditions cash collected and inventory updated Type casual Typical Course of Events Actor Action System Response 1 Cashier sees customer approaching to buy items 2 Cashier records each item and quantity 3 D etermines the item price and charge and adds item into current sale transaction 4 Use Case type Casual Use case Typical Course of Events Buy Items with Cash Actor Action System Response 1 Customer approaches Cashier to checkout 2 u 1 u 1 A L and adds item into 3 current sale transaction 4 Indicate comp1etion ofitem entries 5 Computes and presents sales tota1 o Cashier te11s customer how much to pay 7 Customer pays cash a Cashier records cash tendered 9 presents ba1ance due back to customer 10 Cashier gives the ba1ance due back 11 Logs the comp1eted sa1e 12 Updates inventory 1eve1s 13 Generates a receipt 14 Cashier gives receipt to customer Use Case type Casual Typical Course of Events Actor Action System Response 1 Customer approaches Cashier to checkout 2 L A L A 3 M and adds item into current sale transaction 4 Indicate completion ofitem entries 5 Computes and presents sales total o Cashier tells customer how much to pay 7 Customer pays cash a Cashier records cash tendered 9 presents balance due back to customer 10 Cashier gives the balance due back 11 Logs the completed sale 12 Updates inventory levels 13 Generates a receipt 14 Cashier gives receipt to customer Alternative Courses 7 Customer does not have enough cash Cashier cancels sale 10 Cashier L L a lit a quot L diiici l Essential Use Case multiple sections Buy Items I I Use case Typical Course of Events Actor Action System Response 1 Customer approaches Cashier to checkout 7 Lfcustomer pays cash go to Cash Payment If credit card go to Credit Card Payment If check go to Payment by Check Cash Payment Section Actor Action I System Response I I 1 Customer makes a cash payment I I Credit Card Payment Section Actor Action System Response I I 1 Customer produces credit card I Full Use Case The Use Case generally describes the use case from a functional point of View treating the system as a black box The full Use Case includes detailed description of the user interface and how the external actor interacts with the system 0 In system analysis we should defer full Use Cases as far as possible until design time Full use cases should always be in the fully expanded form Use Cases Diagram Use cases may be related one to another ltlt includes gtgt the course of action in Use Case 1 may call upon Use Case 11 also ltlt uses gtgt ltlt extends gtgt Use Case 20 is an extension of Use Case 1 may or may not call on Use Case 1 x n ltlt extends gtgt Actor The System Use Cases Diagram ltlt includes gtgt or ltlt uses gtgt Buy with Cash use case may upon Apply Coupons use case if the customer has any coupons ltlt extends gtgt Buy with Cash use case extends into Buy items use case Customer Cash ier P0int0fSale System Use Cases Diagram stick figure 0 Subset also applies to actors to the system 0 not particularly useful in common practice Employee M a g 9quot Cashier Assignment 6 due next Monday in class groups of up to 4 people but 1 person OK Use Cases Diagram Pick one important Use Case justify Why it is considered important and write the use case description in casual eXpanded form InfSci 2510 Information System Analysis and Design Lecture 2 992002 from our previous lecture Types of Information Systems The roles of the System AnalystDesigner System development life cycle SDLC System and Organization Project planning ggerN Term projects System Development Life Cycle Identify problems or opportunities Determine the requirements Analyze the system needs Design a solution the intended system Develop the system Test functional correctness and performance Implement deploy the system Maintenance Evaluation fixesenhancements Term Project get started early In groups up to 4 persons OK to do by yourself but no special consideration for credit One page proposal goal and scope review Final Report about up to 40 pages Presentation in class with questions discussion Small project analysisdesign to implementation Large project analysis andor design InfSci 2510 Information System Analysis and Design Fundamentals of EntityRelationship Modeling Reading Reference Book 0 Silberschatz Korth and Sudarshan Database System Concepts Chapter 2 Sections 21 26 on the fundamentals of data modeling Topics Data Modeling in the context of ISAD Basic Concepts Entities and Attributes Relationships and Roles Design Issues Structural Constraints Uniqueness and Key Attributes Weak Entity Set Assignment 1 Our View of Information System 0 People using software programs to access and interrogate data u 1 I i 0 Many people using many software programs but one set of data Our View of Information System 0 While the software programs provide the functions which the users need the information in use must have a stable structure The system designer must discover a structure to integrate the different userfunctional views 0 Such an information structure is called the conceptual schema for ISAD the development cycle 0 Identify problems or opportunities Determine the requirements Analyze the system needs 0 Design a solution the intended system 0 Develop the system 0 Test functional correctness and performance 0 Implement deploy the system MaintenanceEvaluation fixesenhancements for ISAD the development cycle For analysis we focus on Determine the requirements Analyze the system needs first for the DATA we are interested in39 then for the software programs applications to provide the FUNCTIONS we need Data Modeling in ISAD To determine the DATA requirements 0 To discover the inherent information structure 0 To integrate the different views of different users 0 To design a unified view hopefully stable 0 To formulate a model of the information we will use in the system that is a conceptual schema independent of the specific software or platform we may use EntityRelationship Modeling To designformulate a conceptual schema There were many different techniques the one commonly applied today for relational databases is EntityRelationship Modeling ER modeling 0 The ER modeling was first introduced in 1976 by Peter Chen as a logical design methodology to analyze data requirements 0 The ER modeling method has since been extended in many different ways EntityRelationship Model Brie y introduced 0 Entity thing 0 Relationship nature of association between things entities EntityRelationship Modeling a way to model the real world as things and how the things are associated together EntityRelationship Diagrams we present our models graphically EntityRelationship Model Entity a specific thing physical or conceptual Example the sun the number one the color red the man Adam Attributes and Values to model an entity by its properties Relationship the way speci c things are associated together by the nature of the relationship Example Adam and Eve as husband and Wife The related entities together constitute a relationship instance EntityRelationship Diagram Example I SAD for the university registrar There are these entities courses and instructors Each instructor has a name and a phone number Each course has course number and title Instructors teach courses instructor course Illustration the data Instructor P Wu phone X9420 teaches the course IS2511 Information System Analysis and Design Instructor M Spring phone X9429 teaches the course IS2770 Document Processing number 251 1 title Info Sys AD number 2770 title Doc Proc number 2910 title EBusiness courses name M Spring phone x9429 name P Wu phone x9420 name phone XXXXX instructors teaches Topics Data Modeling in the context of ISAD Basic Concepts Entities and Attributes Relationships and Roles Design Issues Structural Constraints Uniqueness and Key Attributes Weak Entity Set Assignment 1 Basic Concept Entity An entity is a specific thing in the world physical or conceptual 7 physical we can touch occupying space 7 conceptual cannot touch but can still be identi ed The keyword here is speci c so that it can be identified physical or conceptual We use the model of an entity to understand how business is done in an information system whether or not it may involve a computerized engine Entity Type and Entity Set An entity is a specific thing but we also need to refer to entities in groups 0 An entity type is a proposition logical statement about the entity which may be true or false dependmg on the speCI c entlty 0 An entity set is a collection of entities for which the entlty type statement 1s true Instances of the entity type Mathematically Entity Set entity e Pe 39 Entity Type the propositional statement Pe Pe usually refers to a collection of attributes and the set of values accepted for the attributes Examples Entity Type teacher of DIST Entity Set Hirtle Karimi Spring Wu Entity Type car in Pittsburgh Entity Set Honda Acura Ford Mustang Entity Set truck van sedan hatchback convertible Entity Set Entity Type car made and model Entity Set Toyota Lexus Honda Civic Ford Taurus Entity Type color Entity Type Red Green Blue Yellow Entity Type book Entity Set SAD by KK DSC by SKS UML by CL Entity Set Entity Set in ER Model 0 An entity type de nes an entity set 0 Graphically we use a rectangle to represent the entity set a set of entities Entity think of it as a deck of cards each representing an entity of that type each identi es a speci c entity in the set Examples Entity Set in ER Model teacher inDBT BOOK The set of teachers in DIST Each entity in the set is a speci c teacher The set ofbooks Each entity in the set is a speci c book 7 but do we really mean a copy of the book Examples Entity Set in ER Model Springwu Kar1m1 teacher of DIST Hirtle UML by CL Database by SKS book System A amp D Question are we talking by K and K about a book published or a copy printed Basic concept Attributes and Values How do we represent an entity in our model specific with the appropriate values to a set of attributes about the entity one value for each attribute A teacher is an entity We model each teacher with two attributes name phone Every specific teacher is modeled by the specific values to the attributes name and phone name M Spring phone x9429 Basic concept Attributes and Values Note that difference between attribute and value An attribute is like a property or characteristic attributes of a course title course number Each attribute is identified by a name Entity Set course Attributes title course number Entities of the same Entity Set have the same attributes Each course should have atitle and a course number Each entity may have different values for the attributes For a specific course ie entity in the Entity Set course the attribute name is title the value is Information Systems the attribute name is course number the value is 2510 Entity Set with Attributes An entity type describes an entity set 0 Graphically we use a rectangle to represent the entity set and use an oval to represent each attribute we are interested in Entity Set with Attributes Example Entity Type course describes an entity set 0 Every course entity in the entity set course has two attributes title and number COUFSG 0 Each specific course has specific values for each of the two attributes The title is a text string the number is a 4 digit decimal number Example Entity Set with Attributes course course course e doc proc title intro to is mber 2770 number 2000 title info system number 2510 think of each entity set as a deck of cards Each card is labeled with entity type and the same attributes being of the same type Each card has its own specific values for each of the attributes representing a speci c entity Attributes and Value Sets 0 An attribute is a property or characteristic of an entity For example the title of a course the name of an instructor For an entity an attribute takes a speci c value For example this specific course has the title Information System Analysis and Design An attribute should have a data type which indicates the set of values it can take For example the title of a course is a text string Attributes and Value Sets 0 An attribute may be very limited in terms of the values it can take For example color of phones on sale can only be black or White Then we say that value set is Black White h color Black White p one on sale Entity and Attribute formally For an entity set E we are interested in the attributes A1A2An ofits entities e E E Each attribute A l is a function Ai E gtDl where Di is the value set for Ai Every entity e E E is represented by the values corresponding to its attributes A 1 A 2 A such that d1d2dn eDlxsz an The entity type is a statement Pe about e that is the attribute values the entity set is therefore E e as d1d2dn EDIXDZX gtltDn Pe Entity and Attribute formally For an entity set E we are interested in the attributes A1A2An ofits entities e E E Each attribute Al is a function Ai E gtDl where Di is the value set for Ai Every entity e E E is represented by the values corresponding to its attributes A1 A 2 A such that d1d2dn EDIXDZX an The entity type is a statement Pe about e that is the attribute values the entity set is therefore E e as d1d2dn EDIXDZX gtltDn Pe Attributes and Value Sets An attribute may be simplecomposite different parts of an attribute each being an attribute on its own student Attributes and Value Sets An attribute may be 0 Optional the attribute may or may not have a value for some entities student A student may or 0 may not have locker assigned Attributes and Value Sets An attribute may be singlevaluedmultivalued the attribute takes more than one value student A student may have taken many courses Attributes and Value Sets An attribute may be storedderived the attribute is computed from other attribute values student x freshman sophomore junior senior Entity and Attributes ER Diagram 0 An Entity Set and its Attributes simple attribute composite Entity amibute simple attribute multivalued attribute k ttr bt 391 derived a attribute j Topics Data Modeling in the context of ISAD Basic Concepts Entities and Attributes Relationships and Roles Design Issues Structural Constraints Uniqueness and Key Attributes Weak Entity Set Assignment 1 Relationship and Roles Entities may be related to one another each entity takes a role in the relationship Example a course a teacher and a student may be related 7 the student is taking the course taught by the teacher The number of roles therefore entities involved is called the degree of the relationship In our ER modeling we will focus on relationships of a fixed degree relationships of degree 2 binary relationships Justification sufficient and readily implementable 20 Relationship Type Relationship Set A relationship type is a generic description of the nature of a relationship between the entity types An instance of the relationship type an ordered tuple of the related entities called a relationship instance A relationship set is the collection of all such instances of the relationship type Example an instructor teaches a coarse is the generic description Wu 2510 Spring 2770 are two instances of the relationship type Relationship Se Wu2510 Spring2770 Relationship Instances 39 course course title intro to IS title Info system number 2000 number 2510 t eaghes MaSpring zoo o 4 i y PWu72510 j teacher I I Relationship Set name MSpring teaCher phone X 9420 name PWu phone X 9427 Relationship Set in ER Model 0 A relationship set is represented as a diamond in the ER diagram connecting entity sets 0 We may label the roles along the connecting lines If there are 42 students and there is only one course offered in the program and all the students take that course how many relationship instances are there in the relationship set takes 22 Relationship Set Relationship Instances student course There are 42 students and there two courses offered 30 students take one course and 25 students take the other course How many relationship instances are there in the relationship set takes Relationship Type Relationship Set A relationship type is a generic description of the nature of a relationship between the entity types A relationship instance brings together the specific entities which are related by the relationship A relationship set is the collection of all the relationship instances of the relationship type student 23 Relationship and Attributes A Relationship Type can have attributes too Identifies a property or characteristic of each instance of the relationship type The due date is an attribute in each instance of a patron taking out a book on loan Relationship and Attributes Men and Women members of a skating club are going to pair up in a competition Woman 24 Relationship and Attributes Each competitor will compete and get rated by a panel of judges each giving a score Judge Compe or Relationship and Roles The same entity set can be related to the same relationship set note the different roles prerequisite is a prerequisitefari CO urse 25 Relationship and Roles The same two entity sets can be related to each other in two different relationship sets teaches taught by faculty student a 4amp9 Topics Data Modeling in the context of ISAD Basic Concepts Entities and Attributes Relationships and Roles Design Issues and common mistakes Structural Constraints Uniqueness and Key Attributes Weak Entity Set Assignment 1 26 Design Issues what is a good model Conceptual Design o to focus on the correctness of representation 0 to understand business in application domain 0 do not have to worry about performance issues 0 still there are issues left unclear sometimes requiring our judgment Example attribute or entity But the employees may be moved around to different offices and phone numbers are fixed for each office We have of ce as an attribute of each employee employee 6666 27 Example attribute or entity We want to build a directory info system for a company We may model office as an entity employee office Example Implied Relationship To make office assignments we may add these attributes implying the relationship between the entities But this is not desirable we want to model relationship explicitly office employee 28 Example Explicit Relationship We should model relationship explicitly and avoid using attributes to imply a relationship employee office w Example Explicit Relationship So that we may also keep track of changes in the near future Within our database employee d te office e ebtiy Example relationship or entity Men and Women members of a skating club are going to pair up in a competition Woman Example relationship or entity Each pair will compete and get rated by three judges each giving a score Judge Pair Example relationship to relationship 0 A relationship is the association of entities should not be that of other relationships Judge Example relationship to entities Man Paw Judge mmman pair number ER Modeling Design Rules Each entity is specific and can be identi ed Each relationship instance relates specific entities and therefore can also be identified The attributes and values of an entity must NOT imply a relationship with other entities relationship should be explicit in the model A relationship set may relate entity sets NOT other relationship sets It is preferred for relationship set to relate only two entity sets binary relationships only Q Relationship with Relationship Graphically in the ER Diagram it means that we connect a diamond to another diamond and this is NOT allowed Why 0 The answer to this may be difficult now we will try to understand more about ER model and hopefully it will become clearer Let us study the constraints on a relationship Topics Data Modeling in the context of ISAD Basic Concepts Entities and Attributes Relationships and Roles Design Issues Structural Constraints Uniqueness and Key Attributes Weak Entity Set Assignment 1 Structural Constraints The information structure depicted in our ER model may have certain constraints pertaining to the nature of the relationships in the model Participation Constraint about how the entity sets are participating in the relationship Cardinality Constraint about the ratio of the number of entities in each entity sets being related Collectively these are known as the structural constraints of the EntityRelationship model Participation Constraint When an entity set participates in a relationship it may participate partially or totally Partial Participation some entities of the set do not participate in any relationship instance Total Participation every entity of the set participate in at least one relationship instance Partial Participation Example of partial participation some employees may not work on any project The entity set Employee participates partially in the relationship works on But we may not allow a project with no employees Employee workson Project Total Participation 0 Every project must have at least one employee 0 The entity set Project participates totally in the works on relationship a double connection line Employee works on Project Cardinality Ratio When an entity set participates in a binary relationship the cardinality ratio speci es the ratio between number of related entities in the relationship For example at most one manager for every department and a manager manages no more than one department one to one Employee Department manage s 1 Cardinality Ratios There may be other forms of ratios We label only these forms 11 1N N1 MN Many employees may serve the same department but each employee may not serve more than one department Employee serves Department Department Cardinality Ratios An example of MN ratio an employee may work on more than one project any project may have more than one employee working on it M toN Project Employee works on Cardinality Ratio and Participation Two different dimensions of the constraints on a relationship any combination is possible Employee workson Project Employee Cardinality and Participation Every department must have at least one employee Every employee must serve exactly one department There may be many employees serving one department Employee serves Department Depaitment Structural Constraints minmax notation We may label participation in a relationship minmaX to speci the range for each entity in the participation minmax is an integer value or an arbitrary number Employee Department SEI VGS Department Structural Constraints minmax notation An employee may serve no department min0 0 An employee may serve at most one department max1 A department must have at least one employee min1 A department may have up to any number of employees max Employee Department SEI VGS Department Two notations are related The min value of 0 implies partial participation The min value of 1 or larger implies total participation What can we say about the max values and cardinality ratios Employee Department serves 13 Department Topics Data Modeling in the context of ISAD Basic Concepts Entities and Attributes Relationships and Roles Design Issues Structural Constraints Unigueness and Key Attributes Weak Entity Set Assignment 1 Uniqueness Constraint An entity set consists of a collection of entities EntityRelationship modeling requires each entity to be uniquely identi ed course course course e doc proc title Intro to IS mber 2770 number 2000 title info system number 2510 Each card entity must somehow be different from any of the other cards ie other entities Key Attributes We should be able to uniquely identify each entity 0 How can we distinguish each entity from others 0 Every entity in the set is characterized by the collection of its attribute values 0 If e1 and e2 are two different entities they must differ in value in at least one of the attributes 0 A student has name and SSN the name alone may be insufficient to identify each student 40 Key Attributes Examples 0 In a small study group we can use first names but sometime we need to also use last name 0 In a larger class it may be sufficient to use the full name last and first 0 In school we quite often use the SSN What is the minimal set of attributes necessary to uniquely identify each entity in an entity set Key Attributes definitions In an entity set the collection of attributes which is sufficient to identify each entity is call a superkey a set of attributes such that any two entities in the set must differ in value in at least one of those attributes A minimal superkey is a set of attributes such that any proper subset would make it insufficient to serve as a superkey 41 Key Attributes ER Model Designer should choose a minimal set of attributes to be the key attributes and indicate the choice underline the key attribute names course offered classroom Key Attributes Not every set of key attributes makes a good choice course offered classroom 42 Key Attributes The designer should choose a minimal key attribute set and indicate the choice course offered classroom Q Key attributes for a relationship 0 A relationship may have attributes But a relationship should NOT have key attributes Why 0 Should the relationship instances each be uniquely identi ed 0 How can each relationship instance be uniquely identi ed 43 Topics Data Modeling in the context of ISAD Basic Concepts Entities and Attributes Relationships and Roles Design Issues Structural Constraints Uniqueness and Key Attributes Weak Entity Set Assignment 1 Weak Entity Set Every normal entity set should have a set of key attributes specified It is called the uniqueness contraint required in an entity set so that we can identify each specific entity However sometimes we allow an entity set to have NO key attributes but only Partial key attributes it is called a Weak Entity Set An entity set with key attributes speci ed is therefore sometimes called a Strong Entity Set 44 Weak Entity Set A strong entity set should have at least one set of key attributes so that every entity can be uniquely identi ed fulfilling the uniqueness constraint A weak entity set does not have a set of key attributes may have partial key attributes but the uniqueness constraint still requires every entity to be uniquely identified A weak entity set must participate totally in at least one dependency relationship and if necessary have a set of partial key attributes to fulfill the uniqueness constraint Weak Entity Set Example 0 Consider modeling the information in a library We have the entity set Book for books Book 9666 45 Weak Entity Set Example Members of the library may borrow books we have a relationship between Book and Member PROBLEM due date Can we have two different members borrowing the same book More accurately stated two different copies of the same book Weak Entity Set Example 0 The Book entity set does each entity represent a book OR a copy of a book Need copy number Book Copy Call N0 Copy No 46 Weak Entity Set Example 0 We need to deal with two different concepts in the library book and copy of a book Book Copy Weak Entity Set Example With both Book and Book Copy we can properly model the relationships with Member 47 Weak Entity Set Example 0 We duplicate a good deal of information in the entity sets Book and Book Copy the two should be related implied relationship Weak Entity Set Example We will allow a weak entity set for Book Copy with partial key copy no underlined by dash and a de endenc relationshi copies to a strong entity set Weak Entity Set Example 0 Each book copy entity in a weak entity set is then uniquely identified by the copy no partial key for each book strong entity it depends on Weak Entity Set A weak entity set must participate totally in at least one 1t01 or Nt01 relationship which is the dependency relationship 0 A weak entity set may have a set of partial key attributes Each is underlined by dashed line 0 The partial key must be sufficient to identify each entity in the weak entity set within each group of N related to the same entity through the dependency relationship fulfilling the uniqueness constraint 49 Weak Entity Set Example To model dependents of company employees we model children in family units as entities in an entity set child Each child has a rst name may or may not have a social security number therefore the attributes are not sufficient to identify each child except within the family A Weak Entity Set has a double rectangle and the attributes for a partial key underlined in dash child social security no Weak Entity Set Example 0 The weak entity set depends on the relationship with a strong entity set to identify each entity in the set It is called a dependency relationship Topics 0 Data Modeling in the context of ISAD 0 Basic Concepts Entities and Attributes Relationships and Roles Design Issues 0 Structural Constraints Uniqueness and Key Attributes Weak Entity Set 0 Assignment 1 Assignment 1 Due Monday next week in class OK to work in groups up to 4 persons submit only one copy bearing all the names Requirements spelled out in natural language such as English may be fuzzy sometimes use common sense assumptions May draw diagrams using Power Point Visio or Word Corel Draw hand drawn diagram OK too as long as they are readable but please do not use pencil