36
Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University http://www.mscs.mu.edu/~praveen/

Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Embed Size (px)

Citation preview

Page 1: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Software Design/Database DesignSoftware Design/Database Design

Dr. Praveen Madiraju

Department of Mathematics, Statistics, and Computer Science

Marquette University

http://www.mscs.mu.edu/~praveen/

Page 2: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

What is Design?What is Design?

Page 3: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

What is Design? (cont’d)What is Design? (cont’d)

What is involved in Design Process?What is involved in Design Process?

Goals, IdeasKnowledge, RepresentationsLanguages, ToolsActivities

Software is somewhat uniqueSoftware is somewhat unique

disparate projectschanging toolsmany advances are in programming languages

Page 4: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

eCase Review Management SystemeCase Review Management System

Insurance

Companies

Incoming

Case

Case

Review

Case

TranscriptionBilling

eCase Management System

Page 5: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Software Development ProcessSoftware Development Process

Page 6: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Software Development Process (cont’d)Software Development Process (cont’d)

Page 7: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

SCRUM : Agile Software DevelopmentSCRUM : Agile Software Development

SCRUM is an agile, lightweight process for managing and controlling software and product development in rapidly changing environments.

Iterative, incremental process Team-based approach developing systems/ products with rapidly changing requirements Improve communication and maximize cooperation A way to maximize productivity

Page 8: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

SCRUM (cont’d)SCRUM (cont’d)

Components of Scrum Roles : Scrum Master, Team, Product Owner Process : Sprint Planning, Sprint, Daily Scrum, Sprint Review

Meeting

Page 9: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Requirements Discovery ProcessRequirements Discovery Process

Interviews with clientsGather functional and non-functional requirementsSometimes a quick prototype helps

Page 10: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Requirements Discovery Process (cont’d)Requirements Discovery Process (cont’d)

Capturing Requirements using Use-Case Modeling

Case Receptionist

*

*

Enter PatientDetails

Enter EmployerDetails

Enter ProviderDetails

* **

*

Case Reviewer

Case Transcriptionist

Page 11: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Requirements AnalysisRequirements Analysis

Page 12: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Software DesignSoftware Design

System design describes what the software system should do

• focuses more on desirability typically captures the overall, essential framing of the solution Includes database design as well specific technology and database independent

Implementation design describes what the implementer should do

• focuses more on feasibility typically represents a final “completed design” typically captures a fully detailed roadmap

Page 13: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

UML Class Diagram ExampleUML Class Diagram Example

The company is organized into DEPARTMENTs. Each department has a name, unique number and an employee who manages the department. We keep track of the start date of the department manager. Each department controls a number of PROJECTs. Each project has a name, unique number and a location. We store each EMPLOYEE’s social security number, address, salary, sex, and birthdate. Each employee works for one department but may work on several projects. We keep track of the number of hours per week that an employee currently works on each project. We also keep track of the direct supervisor of each employee.

Page 14: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Database DesignDatabase Design

SSN FName DNO

123 John 1

234 Leela 2

DNO DName

1 Accounting

2 Administration

EMPLOYEE DEPARTMENT

Row Column

Primary Key Table NameForeign Key

Basic Concepts of DatabaseBasic Concepts of Database

Table : Row, Column, Primary Key, Foreign Key, Index

Page 15: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Database Design (cont’d)Database Design (cont’d)

Main Phases of Database Design

Page 16: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

ER (Entity Relationship) ModelingER (Entity Relationship) Modeling

Conceptual design phase; result is a conceptual schemaER consists of : entities, attributes, and relationships

Example: Company Database System.“We store each EMPLOYEE’s social security number, address, salary, sex, and birthdate. Each employee works for one department but may work on several projects…”

Entity : EMPLOYEE, DEPARTMENT, …Attributes : SSN, Address, Sex, BirthdateRelationship: WORKS_FOR, …

Higher Level Requirements

Page 17: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

ER Modeling (cont'd)ER Modeling (cont'd)

EMPLOYEE WORKS_FOR DEPARTMENT

SSN Name

FName LName

MIDNO DName

N 1

DOB

AgePhone

Sex

Page 18: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

ER Modeling (cont'd)ER Modeling (cont'd)

Types of Relationships:1:1; 1:N (previous slide)

EMPLOYEE MANAGES DEPARTMENT1 1

M:N

EMPLOYEE WORKS_ON PROJECTM N

Hours PNO PName

Strong Participation

Page 19: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

ER to Relational SchemaER to Relational Schema

Entities Tables Attributes Columns

SSN FName LName MI

DOB Age Sex

123 John Smith A … … M

234 Leela B … … F

EMPLOYEE

SSN Phone

123 414-111-…

123 262-000

EMPLOYEE_PHONE

Page 20: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Database ToolsDatabase Tools

ER Modeling Tools/TechnologiesER Modeling Tools/Technologies

Microsoft VisioOracle DesignerRational RoseERWin, …

Database VendorsDatabase Vendors

Commercial : Oracle, IBM DB2, Microsoft SQL Server, …Free Ware : MySQL, SQLLite, PostgresSQL, …

Database LanguagesDatabase Languages

Structured Query Language (SQL), PL/SQL

Page 21: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Application Design ModelsApplication Design Models

Data Flow DiagramsPseudo codeAlgorithmsObject-Oriented Analysis and Modeling using UML (Unified Modeling Language)

Page 22: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

UMLUML

Use Case DiagramsActivity DiagramsSequence DiagramsClass Diagrams

Page 23: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Component ReuseComponent Reuse

If a component already exists, why re invent the wheel?There exists components for almost anything these daysRisks associated with free or third party components

Page 24: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

User Interface DiagramsUser Interface Diagrams

Mock-ups, Sketches, User interaction Diagrams, Prototype Demos, Browser

Page 25: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

User Interface Diagrams (cont’d)User Interface Diagrams (cont’d)

Wireframe

Page 26: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Application Design ToolsApplication Design Tools

UML ToolsRational Software Modeler, Microsoft Visio, Eclipse-Omondo, Dia (free ware), …

User Interface ToolsYour favorite browser, Microsoft .NET framework, Java Swing, Visio, WireframeSketcher, …

Page 27: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

ImplementationImplementation

Small stand alone applications Java, Microsoft .NET, …

Web based applications Java Servlets, Microsoft .NET, PHP-MySQL,

Enterprise Resource Planning Applications SAP, Oracle Apps, …

Page 28: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Multi-tier Application ArchitectureMulti-tier Application Architecture

Client

(Presentation Logic)

(Business Logic)

(Data Access Logic)

Server

(Business Logic)

(Data Access Logic)

Two-tier Architecture

Web Server

(Business Logic)

(Data Access Logic)

Data Resources

Three-tier Architecture

Page 29: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Multi-tier Application Architecture (cont’d)Multi-tier Application Architecture (cont’d)

Page 30: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Construction and TestingConstruction and Testing

Unit testingSystem testing

Page 31: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Installation and DeliveryInstallation and Delivery

Training Manual

Page 32: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

System Operation and MaintenanceSystem Operation and Maintenance

Program Back up, Recovery and MaintenanceTechnical SupportFurther System EnhancementsHopefully no bugs

Page 33: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

Thank youThank you

Questions?

Page 34: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

ER to Relational Schema (cont’d)ER to Relational Schema (cont’d)

Dealing with Relationships – 1:1Dealing with Relationships – 1:1

EMPLOYEE MANAGES DEPARTMENT1 1

SSNDNO

FNameDName

StartDate

SSN FName

123 John

234 Leela

DNO DName MgrSSN MgrStartDate

1 Account..

234 …

TRANSLATES TO

EMPLOYEEDEPARTMENT

Page 35: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

ER to Relational Schema (cont’d)ER to Relational Schema (cont’d)

Dealing with Relationships – 1:NDealing with Relationships – 1:N

EMPLOYEE WORKS_FOR DEPARTMENTN 1

SSNDNO

FNameDName

SSN FName DNO

123 John 1

234 Leela 1

DNO DName

1 Account..

2 Admin…

TRANSLATES TO

DEPARTMENTEMPLOYEE

Page 36: Software Design/Database Design Dr. Praveen Madiraju Department of Mathematics, Statistics, and Computer Science Marquette University praveen

ER to Relational Schema (cont’d)ER to Relational Schema (cont’d)

Dealing with Relationships – M:NDealing with Relationships – M:N

SSN FName

SSN FName

123 John

234 Leela

PNO PName

1001 OceanBlue

1002 EverGreen

PROJECTEMPLOYEE

EMPLOYEE WORKS_ON PROJECTM N

Hours PNO PName

SSN PNO Hours

123 1001 20

123 1002 20

WORKS_ON