Risks to Database Activities



Similar documents
How To Connect A Java To A Microsoft Database To An Ibm.Com Database On A Microsq Server On A Blackberry (Windows) Computer (Windows 2000) On A Powerpoint (Windows 5) On An Ubio.Com

1 File Processing Systems

An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases

AVALANCHE MC 5.3 AND DATABASE MANAGEMENT SYSTEMS

HP Quality Center. Upgrade Preparation Guide

AWS Schema Conversion Tool. User Guide Version 1.0

CSC 370 Database Systems Summer 2004 Assignment No. 2

Pattern Insight Clone Detection

Geodatabase Programming with SQL

HP Vertica Integration with SAP Business Objects: Tips and Techniques. HP Vertica Analytic Database

How to Use PIPS Access to/from SQL Database Utility Program. By PIPSUS Support Team Dr. Chouikha

Increasing Driver Performance

FileMaker 13. ODBC and JDBC Guide

Plug-In for Informatica Guide

MySQL for Beginners Ed 3

How To Create A Large Data Storage System

DBGEN- Database (Test) GENerator - An Automated Framework for Database Application Testing

UltraQuest Cloud Server. White Paper Version 1.0

FileMaker 11. ODBC and JDBC Guide

A Brief Introduction to MySQL

Chapter 4 Accessing Data

High-Performance Oracle: Proven Methods for Achieving Optimum Performance and Availability

CS 377 Database Systems SQL Programming. Li Xiong Department of Mathematics and Computer Science Emory University

How to Improve Database Connectivity With the Data Tools Platform. John Graham (Sybase Data Tooling) Brian Payton (IBM Information Management)

Introduction. Introduction: Database management system. Introduction: DBS concepts & architecture. Introduction: DBS versus File system

Applications of JAVA programming language to database management

DBMoto 6.5 Setup Guide for SQL Server Transactional Replications

Introduction: Database management system

Oracle Data Integrator: Administration and Development

Physical Database Design and Tuning

FileMaker 12. ODBC and JDBC Guide

Configuring an Alternative Database for SAS Web Infrastructure Platform Services

Database Access from a Programming Language: Database Access from a Programming Language

Database Access from a Programming Language:

1. Physical Database Design in Relational Databases (1)

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

SQL Injection Protection by Variable Normalization of SQL Statement

Oracle Essbase Integration Services. Readme. Release

EVENT LOG MANAGEMENT...

Chapter 2 Database System Concepts and Architecture

HR Onboarding Solution

SQL Server Replication Guide

HareDB HBase Client Web Version USER MANUAL HAREDB TEAM

FileMaker 8. Installing FileMaker 8 ODBC and JDBC Client Drivers

Generating XML from Relational Tables using ORACLE. by Selim Mimaroglu Supervisor: Betty O NeilO

Spring,2015. Apache Hive BY NATIA MAMAIASHVILI, LASHA AMASHUKELI & ALEKO CHAKHVASHVILI SUPERVAIZOR: PROF. NODAR MOMTSELIDZE

Knocker main application User manual

Chapter 9 Java and SQL. Wang Yang wyang@njnet.edu.cn

Oracle8/ SQLJ Programming

PUBLIC Installation: SAP Mobile Platform Server for Linux

The process of database development. Logical model: relational DBMS. Relation

D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to:

McAfee Agent Handler

Postgres Plus xdb Replication Server with Multi-Master User s Guide

Advantage Database Server

JD Edwards World. Database Audit Manager Release A9.3 E

Abstract. Introduction. Web Technology and Thin Clients. What s New in Java Version 1.1

Testing of the data access layer and the database itself

SAP Business Objects Business Intelligence platform Document Version: 4.1 Support Package Data Federation Administration Tool Guide

Teradata SQL Assistant Version 13.0 (.Net) Enhancements and Differences. Mike Dempsey

Two new DB2 Web Query options expand Microsoft integration As printed in the September 2009 edition of the IBM Systems Magazine

Copying data from SQL Server database to an Oracle Schema. White Paper

Moving the Web Security Log Database

Microsoft SQL Server Features that can be used with the IBM i

Supplement IV.D: Tutorial for MS Access. For Introduction to Java Programming By Y. Daniel Liang

CS/CE 2336 Computer Science II

IBM DB2 XML support. How to Configure the IBM DB2 Support in oxygen

A Practical Method to Diagnose Memory Leaks in Java Application Alan Yu

Moving the TRITON Reporting Databases

ICAB4136B Use structured query language to create database structures and manipulate data

Infinitel HotSpotWeb User Manual

In-memory Tables Technology overview and solutions

Implementing and Maintaining Microsoft SQL Server 2008 Integration Services

Oracle Database 12c Enables Quad Graphics to Quickly Migrate from Sybase to Oracle Exadata

LSINF1124 Projet de programmation

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

SharePoint Server 2010 Capacity Management: Software Boundaries and Limits

WatchGuard Dimension v1.1 Update 1 Release Notes

A database can simply be defined as a structured set of data

Live Event Count Issue

When upgrading your TAPIT software make sure that all call accounting data has been exported before you begin the installation process.

DBMS / Business Intelligence, SQL Server

DBX. SQL database extension for Splunk. Siegfried Puchbauer

Dell Statistica Statistica Enterprise Installation Instructions

PROCESSES LOADER 9.0 SETTING. Requirements and Assumptions: I. Requirements for the batch process:

Developing Solutions for Microsoft Dynamics AX in a Shared AOS Development Environment

Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms

Optimizing the Performance of the Oracle BI Applications using Oracle Datawarehousing Features and Oracle DAC

Sage Intelligence Financial Reporting for Sage ERP X3 Version 6.5 Installation Guide

NetBeans Profiler is an

GP REPORTS VIEWER USER GUIDE

MADOCA II Data Logging System Using NoSQL Database for SPring-8

SpagoBI exo Tomcat Installation Manual

IBM Campaign and IBM Silverpop Engage Version 1 Release 2 August 31, Integration Guide IBM

Transcription:

The Measured Performance of Department of Computer Science Allegheny College http://cs.allegheny.edu/~gkapfham/ University of Pittsburgh, 2007 In Conjunction with Mary Lou Soffa (UVa/CS), Panos Chrysanthis (Pitt/CS), Bruce Childers (Pitt/CS)

Outline Introduction to Database Applications Motivation What is a Database Application? 1 Introduction to Database Applications Motivation What is a Database Application? 2 Traditional Software Testing A New Testing Paradigm 3 Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes 4 Experiment Design Instrumentation Costs Coverage Monitoring Costs

An Interesting Defect Report Motivation What is a Database Application? Database Server Crashes When you run a complex query against Microsoft SQL Server 2000, the SQL Server scheduler may stop responding. Additionally, you receive an error message that resembles the following: Date Time server Error: 17883 Severity: 1, State: 0 Date Time server Process 52:0 (94c)... An Input-Dependent Defect This problem occurs when one or more of the following conditions are true: The query contains a U N I O N clause or a U N I O N A L L clause that affects many columns. The query contains several J O I N statements. The query has a large estimated cost. BUG 473858 (SQL Server 8.0)

An Interesting Defect Report Motivation What is a Database Application? Database Server Crashes When you run a complex query against Microsoft SQL Server 2000, the SQL Server scheduler may stop responding. Additionally, you receive an error message that resembles the following: Date Time server Error: 17883 Severity: 1, State: 0 Date Time server Process 52:0 (94c)... An Input-Dependent Defect This problem occurs when one or more of the following conditions are true: The query contains a U N I O N clause or a U N I O N A L L clause that affects many columns. The query contains several J O I N statements. The query has a large estimated cost. BUG 473858 (SQL Server 8.0)

Real World Example Motivation What is a Database Application? A Severe Defect The Risks Digest, Volume 22, Issue 64, 2003 Jeppesen reports airspace boundary problems About 350 airspace boundaries contained in Jeppesen NavData are incorrect, the FAA has warned. The error occurred at Jeppesen after a software upgrade when information was pulled from a database containing 20,000 airspace boundaries worldwide for the March NavData update, which takes effect March 20. An Important Point Practically all use of databases occurs from within application programs [Silberschatz et al., 2006, pg. 311].

Real World Example Motivation What is a Database Application? A Severe Defect The Risks Digest, Volume 22, Issue 64, 2003 Jeppesen reports airspace boundary problems About 350 airspace boundaries contained in Jeppesen NavData are incorrect, the FAA has warned. The error occurred at Jeppesen after a software upgrade when information was pulled from a database containing 20,000 airspace boundaries worldwide for the March NavData update, which takes effect March 20. An Important Point Practically all use of databases occurs from within application programs [Silberschatz et al., 2006, pg. 311].

Motivation What is a Database Application? Program and Database Interactions P select update m insert delete Basic Operation Program P creates SQL statements in order to view and/or modify the state of the relational database D1 De

Database Interaction Granularity P Motivation What is a Database Application? R 1 A B C D m i D k R 2 E F G H m j D l I R 3 J K L Database Interactions Program P interacts with two relational databases D k and D l at different levels of granularity (relation, record, attribute,...)

Types of Applications Motivation What is a Database Application? Database Centric Applications Interaction Approach Program Location Embedded Interface Inside DBMS Outside DBMS Testing framework relevant to all types of applications Current tool support focuses on Interface-Outside applications Example: Java application that submits SQL Strings to an HSQLDB relational database using a JDBC driver

Outline Introduction to Database Applications Traditional Software Testing A New Testing Paradigm 1 Introduction to Database Applications Motivation What is a Database Application? 2 Traditional Software Testing A New Testing Paradigm 3 Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes 4 Experiment Design Instrumentation Costs Coverage Monitoring Costs

Traditional Software Testing A New Testing Paradigm Focus on Testing Individual Components P Input Output a 5 print... exit Final Result: 45 Byte Code Database Virtual Machine File System Graphical Interface Operating System Traditional Assumption Defects may exist in program P and/or P s execution environment

Traditional Software Testing A New Testing Paradigm Various Approaches to Software Testing Structural Testing Random Testing Input Space Software Reliability MTTF(P) = k Freq Input Specification Testing Techniques and Supporting Tools Structural testing requires a test coverage monitor!

Testing Environment Interactions Input P Traditional Software Testing A New Testing Paradigm Output a 5 print... exit Final Result: 45 Database Virtual Machine File System Operating System A New Direction in Software Testing Defects may exist in P s interaction with its environment. This suggests the need for a database-aware test coverage monitor!

Outline Introduction to Database Applications Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes 1 Introduction to Database Applications Motivation What is a Database Application? 2 Traditional Software Testing A New Testing Paradigm 3 Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes 4 Experiment Design Instrumentation Costs Coverage Monitoring Costs

Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes Coverage Criteria for Database Applications P m i 3 delete from R where A > 100 define(r) 6 select * from R use(r) Candidates for Coverage Monitoring Find defects in the database interactions by ensuring that the test suite covers all of the possible def-use associations and/or calling contexts

Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes Challenges of Database-Aware Monitoring Id... 25 26... Test Case (testlistfiles) 1. Signature Method Under Test (listfiles) 2. SQL Select Path... /usr/bin/bibtex /usr/bin/bison... 4. Path(s) 3. Result Set Files Relation SQL Statement select Path from Files where ucase(path) like %/usr/bin/bi% Testing Challenges Traditional coverage monitoring does not reveal how the test case causes the method to interact with the database

Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes Overview of the Coverage Monitoring Process Test Suite Adequacy Criterion Program Instrumentation Database Instrumented Program Instrumented Test Suite Test Coverage Monitoring Test Requirements Coverage Results Adequacy Calculation Current Considerations Focus on the design, implementation, and performance evaluation of the instrumentation and coverage monitoring components Adequacy Measurements

Database-Aware Coverage Trees Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes Test Case Method Invocation Database Interaction Point Database Relation Attribute Record Attribute Value Instrumentation Probes Use static and dynamic (load-time) instrumentation techniques to insert coverage monitoring probes Coverage Trees Store the coverage results in a tree in order to support the calculation of many types of coverage (e.g., data flow or call tree)

Comparing the Coverage Trees Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes Tree Characteristics Tree DB? Context Probe Time Tree Space CCT Partial Low - Moderate Low DCT Full Low Moderate - High DI-CCT Partial Moderate Moderate DI-DCT Full Moderate High Table Legend Database? {, } Context {Partial, Full} Probe Time Overhead {Low, Moderate, High} Tree Space Overhead {Low, Moderate, High}

Database-Aware Instrumentation Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes Test Coverage Monitoring Instrumentation Interaction Location Interaction Type Program Test Suite Defining Using Defining-Using Important Goal Efficiently monitor coverage of database state and structure without changing the behavior of the program under test

Phases of Coverage Monitoring Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes Coverage Tree Initialization Start Testing Before Update Probe Database Interaction After Probe End Testing Coverage Tree Storage Update Coverage Tree Coverage Tree Monitoring Operations Database-aware probes: Capture the SQL String Consult the database schema and result set meta-data Extract and analyze portions of the database state Update the coverage tree

Relational Differencing Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes 2 rel j 3 A 2 2 rel j t 1 t 2 t 3 A 1 1 2 2 3 3 4 Before t 1 t 2 t 3 A 1 A 2 1 2 4 2 4 3 4 After Handling Database Modifications The probes use relational differencing to determine that record t 2 and attribute value t 2 [2] were modified by the SQL U P D A T E command

Outline Introduction to Database Applications Experiment Design Instrumentation Costs Coverage Monitoring Costs 1 Introduction to Database Applications Motivation What is a Database Application? 2 Traditional Software Testing A New Testing Paradigm 3 Coverage Monitoring Basics Fundamentals of Coverage Monitoring Instrumentation Probes 4 Experiment Design Instrumentation Costs Coverage Monitoring Costs

Experiment Design Instrumentation Costs Coverage Monitoring Costs Characterizing the Case Study Applications Test Suites Application # Tests Test NCSS / Total NCSS R M 13 227/548 = 50.5% F F 16 330/558 = 59.1% P I 15 203/579 = 35.1% S T 25 365/620 = 58.9% T M 27 355/748 = 47.5% G B 51 769/1455 = 52.8%

Experiment Design Instrumentation Costs Coverage Monitoring Costs Details about the Database Interactions Interaction Counts Application executeupdate executequery Total R M 3 4 7 F F 3 4 7 P I 3 2 5 S T 4 3 7 T M 36 9 45 G B 11 23 34

Static Instrumentation Costs Experiment Design Instrumentation Costs Coverage Monitoring Costs FF PI RM ST TM GB All 10 Static Instrumentation Time sec 8 6 4 2 4.391 4.404 4.396 4.394 5.169 5.583 8.687 FF PI RM ST TM GB All Application Attach probes to all of the applications in less than nine seconds Statically inserting probes increases space overhead

Experiment Design Instrumentation Costs Coverage Monitoring Costs Coverage Monitoring Time: Static Versus Dynamic Time Overhead Instr Tree TCM Time (sec) Per Incr (%) Static CCT 7.44 12.5 Static DCT 8.35 26.1 Dynamic CCT 10.17 53.0 Dynamic DCT 11.0 66.0 Discussion Static has poor space overhead but leads to a minimal increase in testing time. Static is less flexible than dynamic.

Experiment Design Instrumentation Costs Coverage Monitoring Costs Further Comparison of Static Versus Dynamic 14 Norm Sta CCT Sta DCT Dyn CCT Dyn DCT 12 11.084 11.435 10 TCM Time sec 8 6 6.939 7.626 8.026 4 2 Discussion Norm Sta CCT Sta DCT Dyn CCT Dyn DCT Instrumentation Technique Tree Type GB Static is faster than dynamic / CCT is faster than DCT

Experiment Design Instrumentation Costs Coverage Monitoring Costs Varying Database Interaction Granularity Discussion Time Overhead DB Level TCM Time (sec) Per Incr (%) Program 7.44 12.39 Database 7.51 13.44 Relation 7.56 14.20 Attribute 8.91 34.59 Record 8.90 34.44 Attribute Value 10.14 53.17 Static supports efficient monitoring since there is a 53% increase in testing time at the finest level of interaction

Conclusions and Future Work Experiment Design Instrumentation Costs Coverage Monitoring Costs Concluding Remarks A new perspective on software testing and an efficient and effective database-aware test coverage monitor Future Work Perform demand-driven instrumentation Use the coverage tree to reduce or prioritize a test suite Conduct experiments with larger database applications Resources http://cs.allegheny.edu/~gkapfham/research/diatoms/