Outline: Data model Decision tables Checking the logical design Test Strategy Purpose: As we Model the logical system to meet the requirements, we have several techniques to use. Several modelling tools that can be used: Use case model Data flow diagrams Data model Decision tables Data Model: Put requirements gathered needed for the system, put these into a Case Model Need to analyse requirements from fact finding eg interviews Need to model the data stores outline what does in them Whats in a DATA STORE: Anything we need ti know (must be relevant) o Things the processes work on o Books o Dinner orders o Railway ticket requests
2
Info needed by processes: o Title, author, desc, price etc o Order number, table number, menu items etc o Passenger name, start station, dest
These are all requirements from analysis
Data Modelling Overview: o Data modelling gives us shape of what goes in Data Stores o Data stores in a computer system are the tables of its database
Questions to Ask when modelling the Data: o What things is the system dealing with? o What do we know about the things? o How are the things linked together?
What things is the system dealing with? The things the system deals with are the things that are relevant: o Books, Modules, Status o Ticket requests, tickets, passengers o Vehicles, drivers, service records They become the entities in a data model and the tables in a Database: o Books, Modules, Status o Request, Ticket, Passenger o Vehicle, Driver, Service
What do we know about the things? Characteristics or details we record o Title, author, module name, module code o Ticket number, date travel, request date, address o Vehicle number, make, driver name, service date
3
Characteristics we call attributes, they become fields or columns in a Database table o Title, Author, ModuleName, ModuleCode o TicketNo, TravelDate, RequestDate, Address o VehicleNo, Make, Driver, ServiceDate How are the things linked together? o How do they relate? o Books link modules o Books link to status o Vehicles link to drivers o Vehicle link to services o Passengers link to requests o Tickets link to requests o The links are called Relationships o Help the system to find the right info in right Database
Data Model for System: Consists or ERD
.. and the Tables to be used in the database o Table names and attributes o Book (BookNo, Title, Author, Description, Price)
MODULE STATUS BOOK 4
Data model summary: o Data model is part of the logical for system o Shows things that are relevant to the system, called entities o Shows what details are needed about the things, called attributes
Structures English: o One way of describing steps in carrying out a process o Can be used as part of Use Case Description o Describes the logic of a business process o Looks similar to pseudocode o Pseudocode describes the logic in a piece of code o Clear and unambiguous
Structured English BASICS: o Threes rules o Use the four constructs Sequence Selection Iteration Case o Indent to make it clear which statements go together o Limit the vocabulary Standard words and commands Names of entities and attributes from data model Structured English SUMMARY o Describes logic of business process o Simple language constructs o Clear and Unambiguous
Decision Tables: o Shows what actions should be taken in different combinations of circumstances o Clear and unambiguous way of specifying what to do o Can be used as part of use case description Not always needed o Very useful when complex decisions need to be made and acted on
5
Decision tables BASICS o Conditions o One-or-other questions o EG YES / NO o Rules o Combinations of answers to Questions o Actions o What will happen each case o Decisions o Which actions apply to which rules ie in which circumstances Decision tables BUILDING To build Decisions Table: o ID Conditions Write most important one first o ID possible actions Write most frequent one first o Work out the rules ie combinations of conditions Combinations of Y/N 2 conditions give 4 rules, 3 conditions give 8 rules etc o Record which actions are relevant to each rule Put an X in that box of the decision table o Check you have all the rules Combinations of Y/N Decision tables EXAMPLE To calculate ticket fares Conditions: Concession (child, senior), return ticket Actions: No discount, 10% discount, 50% discount
Concession Y N Y N Return N Y Y N No Discount X 10% Discount X 50% Discount X X
6
Decision tables SUMMARY o Decision table summaries what happens in combinations of circumstances o Shows o Conditions o Actions o Rules o Decisions Checking the logical model: o We have now put together the logical model o Use Case Model for Process outline o Data flow diagrams for process breakdown o Data model for data requirements o Structures English for process logic o Decision table for combinations of circumstances How to check the logical model: o Go back to people you talked to when doing the detailed fact finding o Bring requirements specification along o Go through all the diagrams and models with them o Check understanding o Get any corrections o Revise diagrams and models o This can take time but worth it o Any mistakes found at this stage can be easily corrected o Anything found later is harder to correct
Designing the test strategy: o One logical model approved, test strategy can be designed o Users may be involved for testing o System testing o User acceptance testing
7
o Agree with users o Who will write cases o Who will write test scripts / expected results o Who will carry out tests o Who will analyse test results o Joint effort between devs and users Inputs to test strategy: o Test Strategy based on: o Requirements o Use case model o Data flow Diagrams o Data Model o Structured English o Decision Tables o End-to-end operation o A System can process info from initial input to final output o Eg input a book and follow it through it purchase
Unit Testing: o Unit testing part of System Construction o Tests program code and access Database o Unit tests plans typically written when program logic being developed o Task for developers o Users do not get involved Test Strategy Summary: o Test strategy and test cases written based on logical system design o Tests are carried out after system has been developed o Testing is Team Effort with Developers and Users