Temporal And Other DB2 10 For Z Os Highlights
-
Upload
laura-hood -
Category
Technology
-
view
1.840 -
download
0
description
Transcript of Temporal And Other DB2 10 For Z Os Highlights
Temporal Data and other
The Information Management Specialists
Temporal Data and other
DB2 10 for z/OS Highlights
Topics
• Introduction
• DB2 10 for z/OS Overview
The Information Management Specialists
• DB2 10 for z/OS Overview
• Temporal Data Support
• Further Reading
• Summary
Introduction
• Director and Principal Consultant at Triton Consulting
• 23 years DB2 experience, 18 as a consultant working with
customers in UK, Europe and the US
The Information Management Specialists
customers in UK, Europe and the US
• IBM Gold Consultant since 1999
• IBM Information Champion
• Former IDUG (International DB2 User Group) President
• Author of IBM Redbooks, white papers and more recently
“flashbooks”
Topics
• Introduction
• DB2 10 for z/OS Overview
The Information Management Specialists
• DB2 10 for z/OS Overview
• Temporal Data Support
• Further Reading
• Summary
DB2 10 for z/OS
• Extensive beta program running throughout
2009/10, with customers from all around the world
The Information Management Specialists
• Generally available since October 2010
• Upgrade path provided from DB2 8 or DB2 9
• Many customers are currently planning their DB2 10
upgrades, to begin in the next 12-24 months
� DB2 8 for z/OS End of Support in April 2012
Top New Features
• CPU/Performance Improvements
• Temporal Data
• Virtual Storage Enhancements
• High performance DBATs
• In-memory object support
• Optimiser enhancements
• MEMBER CLUSTER for UTS
• Backup and recovery
The Information Management Specialists
• High performance DBATs
• Security Extensions
• Improved Catalog Concurrency
• Access Path Management
• pureXML enhancements
• Currently Committed semantics
• Automated statistics
• Dynamic schema change enhancements
• Backup and recovery enhancements
• Enhanced audit
• Include additional index columns
• Enhanced SQL OLAP functions
• Skip Migration
• And many more….
Topics
• Introduction
• DB2 10 for z/OS Overview
The Information Management Specialists
• DB2 10 for z/OS Overview
• Temporal Data Support
• Further Reading
• Summary
Why Temporal Data?
• Most IT systems need to keep historical as well as current information
• Industry regulations and competitive pressures are
The Information Management Specialists
• Industry regulations and competitive pressures are prompting IT managers to maintain even more data for longer periods of time
• Most warehousing / analytics applications require a historical perspective of data
• Implementation requires lots of effort by DBA and developer to design, test and implement� Lots of “reinventing the wheel”
Why Temporal Data?
• DB2 10 provides this functionality as part of the database engine – the first major RDBMS vendor to do so
� Improve DBAs and developer productivity
The Information Management Specialists
� Improve DBAs and developer productivity
� Reduce errors in application code
� Reduce time-to-market for new applications
� Improve performance by driving function into the database engine
� Improve application consistency
� Support compliance / audit requirements
Temporal Data Concepts
• Temporal Table - a table that supports “data versioning” to allow point-in-time queries to be executed
The Information Management Specialists
executed� Multiple versions of each row are kept by DB2 as they
change over time
� Additional metadata is kept, recording the period in time when a given version of the row was valid
� Contrast to traditional non-temporal tables, where only the current version of a row is available unless developer/DBA have taken steps to support historical perspective
Temporal Data Concepts
• Period – the time during which a given version of a row is/was valid
� Period is defined by special start timestamp and end
The Information Management Specialists
� Period is defined by special start timestamp and end timestamp columns in the temporal table
� Note that in current DB2 implementation start timestamp is inclusive (>=), but end timestamp is not inclusive (<)
CustNo … Start_TS End_TS
123 … 2011-05-01 11:03 2011-05-26 23:51
123 … 2011-05-26 23:51 9999-12-31 23:59
Period #1
Period #2
Temporal Data Concepts
• Business Temporal Table – a temporal table that uses business-defined periods to record row history
� Associated with a business event such as a change of
The Information Management Specialists
� Associated with a business event such as a change of address
� Useful for tracking business events over time
� History is maintained in the base table
� Application has control over start and end timestamp for a given period
Temporal Data Concepts
• System Temporal Table – a temporal table that uses DB2 system-defined periods to record row history� Associated with a DB2 system event (INSERT / UPDATE /
DELETE) against table – all changes captured
The Information Management Specialists
� Associated with a DB2 system event (INSERT / UPDATE / DELETE) against table – all changes captured
� DB2 automatically sets start and end timestamp for a period
� History is maintained in a separate table
� Useful for audit/compliance requirements
• Bi-Temporal Table – a temporal table that supports both business and system time periods� Two sets of start/end timestamps defined
Implementing Temporal Tables
• DBA indicates which tables need temporal support at CREATE/ALTER time� Includes special start and end timestamp columns for recording
validity period for each row
The Information Management Specialists
� Includes special start and end timestamp columns for recording validity period for each row
• For system temporal or bi-temporal tables� DBA also creates separate history table with identical definition
to base table
� DB2 automatically copies old version of row to history table whenever row in main table is changed via DELETE or UPDATE
• Elegant extensions to SELECT statement allow historical perspective to be seen via standard SQL
Example – Business Temporal
Business Event
Policy 102 created
(address = A3)Policy 102 updated
(address = A4)
The Information Management Specialists
TimeT1 T3
SELECT ADDRESSFROM TABLE1
FOR BUSINESS TIME AS OF T2WHERE POLICY=102
T2
Policy Address Start_TS End_TS
101 A2 T0 31-12-9999
102 A3 T1 31-12-9999Main Table
Policy Address Start_TS End_TS
101 A2 T0 31-12-9999
102 A3 T1 T3
102 A4 T3 31-12-9999
= A3
SELECT ADDRESSFROM TABLE1WHERE POLICY=102
= A4
Example – System TemporalSystem Event
TimeT1 T3T2
INSERT INTO EMP
VALUES (321, 20000)
UPDATE EMP
WHERE EMPNO = 321
SET SALARY = 25000
The Information Management Specialists
EmpNo Salary Start_TS End_TS
300 10000 T0 31-12-9999
321 20000 T1 31-12-9999
Main Table
EmpNo Salary Start_TS End_TS
300 10000 T0 31-12-9999
321 25000 T3 31-12-9999
EmpNo Salary Start_TS End_TS
321 20000 T1 T3
History TableSELECT SALARYFROM EMP
FOR SYSTEM TIME AS OF T2WHERE EMPNO = 321
= 20000
SELECT SALARYFROM EMPWHERE EMPNO = 321
= 25000
Topics
• Introduction
• DB2 10 for z/OS Overview
The Information Management Specialists
• DB2 10 for z/OS Overview
• Temporal Data Support
• Further Reading
• Summary
Further Reading
• IBM DB2 10 Home Page
� http://www-01.ibm.com/software/data/db2/zos/db2-10/
• White Paper – DB2 10: A Smarter Database for a Smarter Planet
The Information Management Specialists
• White Paper – DB2 10: A Smarter Database for a Smarter Planet
� https://www14.software.ibm.com/webapp/iwm/web/signup.do?source=sw-infomgt&S_PKG=wp-z-db2-smarter
� Also available as part of a “flashbook” - ISBN: 1583473610
• DB2 10 for z/OS Performance Topics Redbook (SG24-7942) coming soon
• IDUG – International DB2 User Group
� http://www.idug.org/
IDUG DB2 10 Migration Experiences Forum
• A new IDUG forum dedicated specifically to DB2 10 for z/OS migration experiences
� Regular updates and surveys on DB2 10 migration topics
The Information Management Specialists
� Regular updates and surveys on DB2 10 migration topics
� Share and discuss your upgrade plans and experiences with your peers and IBM and other industry experts
� Links to valuable DB2 10 technical information from IBM, IDUG and other sources
• Forum can be found at http://www.linkedin.com/groups?gid=3797589
Topics
• Introduction
• DB2 10 for z/OS Overview
The Information Management Specialists
• DB2 10 for z/OS Overview
• Temporal Data Support
• Further Reading
• Summary
Summary
• DB2 10 contains a long list of significant enhancements to improve performance, scalability and productivity
• Temporal support is an industry first, and offers some compelling advantages for new applications than need a historical data
The Information Management Specialists
advantages for new applications than need a historical data perspective � Improve DBAs and developer productivity
� Reduce errors in application code
� Reduce time-to-market for new applications
� Improve performance by driving function into the database engine
� Improve application consistency
� Support compliance / audit requirements
Contact us
Web – www.triton.co.uk
Email – [email protected]
The Information Management Specialists
Email – [email protected]
Phone - +44 870 2411 550