Boston University MET CS 673 Software Engineering Financial Data Warehouse System Software Design Specification Version 1.0 Software Design Specification Approvals P.Aldrich __Philip Aldrich___Date:__07/08/04__ R.Balter ___Ryan Balter_____Date: __07/08/04__ J. Guan ___John Guan______Date: __07/08/04__ G.Santhanam _Gowtham Santhanam__ Date: __07/08/04__ C. Soto__Carlos Soto______ Date: __07/08/04__ AP Kantinan ___Apisit Kantinan____ Date: __07/08/04__ J. Quian__ Zhiming Quian_ Date: __07/08/04__ PK Parameswaran _PK Parameswaran_ Date: __07/08/04__ Revision History Date Author Description 06/24/04 Zhiming Qian Initial Draft 07/07/04 Gowtham Santhanam Updated document after discussing with project team Software Design Specification TABLE OF CONTENTS 1. INTRODUCTION ............................................................................................................................... 4 1.1 1.2 1.3 PURPOSE ....................................................................................................................................... 4 SCOPE ........................................................................................................................................... 4 DEFINITIONS, ACRONYMS, AND ABBREVIATIONS ......................................................................... 4 2. REFERENCES .................................................................................................................................... 4 3. DECOMPOSITION DESCRIPTION ................................................................................................ 5 3.1 3.2 3.3 3.4 3.5 4. DEPENDENCY DESCRIPTION ....................................................................................................... 8 4.1 4.2 4.3 4.4 4.5 5. INTER-MODULE DEPENDENCIES (OBJECT MODEL) ....................................................................... 9 INTER-PROCESS DEPENDENCIES .................................................................................................... 9 DATA DEPENDENCIES.................................................................................................................... 9 STATE DEPENDENCIES................................................................................................................... 9 LAYER DEPENDENCIES .................................................................................................................. 9 INTERFACE DESCRIPTION ........................................................................................................... 9 5.1 5.2 6. MODULE DECOMPOSITION ............................................................................................................ 5 CONCURRENT PROCESS DECOMPOSITION ..................................................................................... 6 DATA DECOMPOSITION ................................................................................................................. 6 STATE MODEL DECOMPOSITION ................................................................................................... 6 USE CASE MODEL DECOMPOSITION ............................................................................................. 8 MODULE INTERFACES ................................................................................................................... 9 PROCESS INTERFACE ..................................................................................................................... 9 DETAILED DESIGN OF FDW PACKAGE .................................................................................. 10 6.1 THE DATAWAREHOUSE PACKAGE.............................................................................................. 11 Class UserManager ............................................................................................................................. 11 Class ScreenFlowManager.................................................................................................................. 12 Class FDWBaseServlet ........................................................................................................................ 12 Class ReportServlet ............................................................................................................................. 13 Class RptByBusinessUnit .................................................................................................................... 13 Class RptByTime ................................................................................................................................. 14 Class RptByFund ................................................................................................................................. 15 Class RptExecutiveSummary ............................................................................................................... 15 6.2 SEQUENCE DIAGRAMS ................................................................................................................ 16 sequence diagram for use case valid login .......................................................................................... 16 sequence diagram for Invalid log in use case...................................................................................... 16 sequence diagram for report by time ................................................................................................... 17 sequence diagram for use case report by business unit ....................................................................... 17 sequence diagram for report by fund................................................................................................... 18 sequence diagram for use case non-managed executive summary ...................................................... 19 sequence diagram for searching .......................................................................................................... 19 6.3 DATA DETAILED DESIGN ............................................................................................................ 20 6.3.1 Table: tblBusinessUnit ............................................................................................................... 20 6.3.2 Table: tblFund ............................................................................................................................ 20 6.3.3 Table: tblSalesAndAssets ............................................................................................................ 21 6.3.4 View: vRptByBusinessUnit ......................................................................................................... 21 Software Design Specification 6.3.5 view: vRptByFund....................................................................................................................... 21 6.3.6 View: vRptNonManagedExecutiveSummary .............................................................................. 21 6.3.7 View: vRptManagedExecutiveSummary ..................................................................................... 22 6.3.8 View: vRptByTime ...................................................................................................................... 22 6.3.9 Table: tblUsers ........................................................................................................................... 22 1. Introduction 1.1 Purpose This document describes the database architecture and application architecture for the Financial Data Warehouse project. 1.2 Scope This document covers the design specifications for release 1.0 of Financial Data Warehouse. This document encompasses system design, which deals with the overall organization of the system, also referred to as the system architecture, as well as object design, which deals with the definition of the classes used in the implementation. The classes come from the application domain analysis. The purpose of this document is to guide developers in the implementation of the Financial Data Warehouse system. 1.3 Definitions, Acronyms, and Abbreviations Acronym or Term FDW GUI RDBMS SDS SRS TBD Definition Financial Data Warehouse System Graphical User Interface Relational Database Management System Software Design Specification Software Requirements Specification To Be Determined 2. References Software Configuration Management Plan (SCMP) for FDW version 1.0 Software Project Management Plan (SPMP) for FDW version 1.0 Software Requirements Specification (SRS) for FDW version 1.0 Software Quality Assurance Plan (SQAP) for FDW version 1.0 Software Test Documentation (STD) for FDW version 1.0 Software Design Specification Braude, E. J., Software Engineering: an Object-oriented perspective 3. Decomposition Description 3.1 Module Decomposition FDW will only have one package – the Data Warehouse Package. Figure 3.1 shows the layered architecture selected for the FDW. The client layer sends a reporting request to the application layer. When the application layer receives a request, it sends a query to the database layer. The database layer executes the query and returns the result back to the application layer. The application layer generates a dynamic report based on the result. Figure 3.1 System Architecture Data in a data warehouse is organized to support analysis rather than to process real-time transactions as in online transaction processing systems. Organizations collect data in the normal course of business operations. The purpose of a data warehouse is to consolidate and organize this data so it can be analyzed and used to support business decisions. Figure 3.2 shows the architecture of the database systems. In general enterprise data are highly heterogeneous in format. This system supports the various data sources in the following format: Oracle database, SQL Server database, Access Jet Database, Excel data file, plain text data file with predefined formats (comma separated file, or tab separated file etc.) Microsoft supports numerous drivers for collecting heterogeneous data. For simplicity this project will use flat text file for demonstration, but the system is designed to be flexible enough, and is not limited to flat file data source. The uploading of the data into data warehouse database is supported by Data Transition Service, bcp utility or bulk insert T-SQL statements. Database Software Design Specification developer or administrator may choose one or any combination of these uploading mechanisms according his/her needs. In order to facilitate analysis of enterprise data, database table are reorganized by dimensions such as time, product, business unit, etc. Stored procedures and predefined queries (views) are created on database. Figure 3.2 Database Architecture 3.2 Concurrent Process Decomposition The FDW will not have concurrent processes. Multiple user clients may use the system at the same time since the DBMS will ensure exclusive accesses. 3.3 Data Decomposition The data structures flowing among the package are defined by the RptByBusinessUnit, RptByFund, RptByTime, and RptExecutiveSummary classes 3.4 State Model Decomposition State Transition Diagram for Financial data warehouse Software Design Specification Log In( Authorized User ) Logged In Navigate to reports Software Design Specification View/Search Business Unit and Fund Reports 3.5 Use Case Model Decomposition Valid Login Invalid Login Non Managed Report Business Unit Report User Fund Report Fund by Time Report Search 4. Dependency Description Software Design Specification This section describes the dependencies for the various decompositions described in section 3. 4.1 Inter-module Dependencies (Object Model) The dependencies among package interfaces are shown in figure 6.0. 4.2 Inter-process dependencies NA 4.3 Data dependencies NA 4.4 State dependencies NA 4.5 Layer dependencies NA 5. Interface Description This section describes the interfaces for the object model. 5.1 Module interfaces NA 5.2 Process interface NA Software Design Specification 6. Detailed Design of FDW Package The overall architecture of the package described in this section can be found in the figure below Figure 6.0 Software Design Specification 6.1 The DataWarehouse Package Class UserManager The design of this class satisfies requirement 2.2.2 and 3.2.2.LO in the SRS Class UserManager Should be implemented as a Singleton pattern Attributes: UserHash - a HashTable storing which users are logged on the system. Methods: Public bool validate(String username, String password){ /* check database tblUsers for username and password if it matches, return true; add userID to UserHash else return false; */ } public bool isLoggedOn(username){ /* check if the username is in userHash return true/false; */ } public Static UserManager getInstance(){ //return a unique instance } Software Design Specification Class ScreenFlowManager The design of this class satisfies requirement 2.2.3 – 2.2.8 and 3.2.2BU, 3.2.2FU in the SRS Class ScreenFlowManager Should be implemented as a singleton. Public Class ScreenFlowManager{} Methods: Public String getNextPage(String action){ /* forward to next jsp/ servelet according to the action user requested if action = “LOGIN” then return executive summary report page if action = “BYTIME then return byTime report page if action = “BYBUSINESSUNIT” then return … etc. */ } public Static ScreenFlowManager getInstance() { //return a unique instance } Class FDWBaseServlet Public Class FDWBaseServlet extends HttpServlet Attributes: Private Connection conn; Methods: Protected void getConnection(){ Conn = DriverManager.getConnection(jdbc:odbc:datasoureName, username, pwd); … } Software Design Specification Class ReportServlet The design of this class satisfies requirement 2.2.3 – 2.2.8 and 3.2.2BU, 3.2.2FU in the SRS Public abstract Class ReportServlet extends FDWBaseServlet Attributes: Private String reportName; Private int intNumColumns; Private int intNumRows; Private ResultSet resultSet; Private ResultSetMetaData resultSetMetaData; Private String strQuery; Methods: public void executeQuery(){ //execute query } public abstract void displayResult(){ //display the query result to screen } Public void service(HttpServletRequest req, HttpServletResponse rep){ ExecuteQuery(); DisplayResult(); …; } ReportServlet and detailed implementation of 5 reports should be implemented by design pattern Factory Method. Class RptByBusinessUnit The design of this class satisfies requirement 2.2.3 – 2.2.5, 2.2.8 and 3.2.2BU in the SRS Software Design Specification public Class RptByBusinessUnit extends ReportServlet{} Attributes: Private String strQuery = “select … ” //predefined query string for this specific report Methods: Public void displayResult(){} /*this methods overrides the method in base class. Displays the query result in format for this report */ } Class RptByTime The design of this class satisfies requirement 2.2.78 and 3.2.2FU in the SRS public Class RptByTime extends ReportServlet{} Attributes: Private String strQuery = “select … ” //predefined query string for this specific report Methods: Public void displayResult(){} /*this methods overrides the method in base class. Displays the query result in format for this report */ } Software Design Specification Class RptByFund The design of this class satisfies requirement 2.2.6, 2.2.8 and 3.2.2FU in the SRS public Class RptByFund extends ReportServlet{} Attributes: Private String strQuery = “select … ” //predefined query string for this specific report Methods: Public void displayResult(){} /*this methods overrides the method in base class. Displays the query result in format for this report */ Class RptExecutiveSummary The design of this class satisfies requirement 2.2.3 – 2.2.5, 2.2.8 and 3.2.2BU in the SRS Public Class RptExecutive Summary extends ReportServlet{} Attributes: Private String strQuery = “select … ” //predefined query string for this specific report Methods: Public void displayResult(){} /*this methods overrides the method in base class. Displays the query result in format for this report */ Software Design Specification 6.2 Sequence Diagrams sequence diagram for use case valid login This sequence diagram satisfies requirement 2.2.1 in the SRS sequence diagram for Invalid log in use case This sequence diagram satisfies requirement 2.2.2 in the SRS Software Design Specification sequence diagram for report by time This sequence diagram satisfies requirement 2.2.6 in the SRS sequence diagram for use case report by business unit This sequence diagram satisfies requirement 2.2.4 in the SRS Software Design Specification sequence diagram for report by fund This sequence diagram satisfies requirement 2.2.5 in the SRS Software Design Specification sequence diagram for summary use case non-managed This sequence diagram satisfies requirement 2.2.3 in the SRS sequence diagram for searching This sequence diagram satisfies requirement 2.2.7 in the SRS Software Design Specification executive 6.3 Data Detailed Design The following are the designs for the database tables and views that are used in the FDW system. These tables are for input data: tblBusinessUnit, tblFund, tblSalesAndAssets; These views are query results for reporting to screen: vRptByBusinessUnit, vRptByTime, vRptByFund, vRptManagedExecutiveSummary, vRptNonManagedExecutiveSummary 6.3.1 Table: tblBusinessUnit 6.3.2 Table: tblFund Software Design Specification 6.3.3 Table: tblSalesAndAssets 6.3.4 View: vRptByBusinessUnit 6.3.5 view: vRptByFund 6.3.6 View: vRptNonManagedExecutiveSummary Software Design Specification 6.3.7 View: vRptManagedExecutiveSummary 6.3.8 View: vRptByTime 6.3.9 Table: tblUsers Software Design Specification