Managing Ever Increasing Amounts of Data with DB2 for Z/OS

Managing Ever Increasing Amounts of Data with DB2 for Z/OS

Front cover Managing Ever-Increasing Amounts of Data with IBM DB2 for z/OS Using Temporal Data Management, Archive Transparency, and the DB2 Analytics Accelerator Mehmet Cuneyt Goksu Claire McFeely Craig McKellar Xiao Hui Wang Redbooks International Technical Support Organization Managing Ever-Increasing Amounts of Data with IBM DB2 for z/OS September 2015 SG24-8316-00 Note: Before using this information and the product it supports, read the information in “Notices” on page vii. First Edition (September 2015) This edition applies to DB2 11 for z/OS and DB2 10 for z/OS. © Copyright International Business Machines Corporation 2015. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . vii Trademarks . viii IBM Redbooks promotions . ix Preface . xi Authors. xii Now you can become a published author, too! . xiv Comments welcome. xiv Stay connected to IBM Redbooks . xiv Part 1. Temporal data management . 1 Chapter 1. Temporal data management overview . 3 1.1 Overview . 4 1.1.1 Periods . 5 1.1.2 System-period temporal tables . 6 1.1.3 Application-period temporal tables . 9 1.1.4 Bitemporal tables . 11 1.1.5 Choosing the right type of temporal table . 11 Chapter 2. System-period temporal tables . 13 2.1 Overview . 14 2.2 Relationship of a system-period temporal table to the associated history table . 14 2.3 Moving from traditional to system-period temporal tables. 16 2.3.1 Creating new tables . 16 2.3.2 The history table and version enabling . 17 2.3.3 Enabling versioning for an existing non-temporal table . 18 2.3.4 Querying a system-period temporal table . 20 2.3.5 Enabling versioning for an application managed temporal table. 21 2.3.6 Other scenarios for migrating to system-period temporal tables. 26 2.4 The who, what, and how of my row (audit columns) . 26 2.4.1 Additional considerations for audit information and delete operations . 27 2.4.2 The “who”, “what”, and “how” in action . 27 2.5 Querying a system-period temporal table . 29 2.5.1 System-period temporal table query examples. 31 2.6 General restrictions with system-period data versioning . 37 2.7 Utilities. 37 2.7.1 LISTDEF . 37 2.7.2 UNLOAD . 38 2.7.3 LOAD . 38 2.8 Recovery . 39 Chapter 3. Application-period temporal tables . 41 3.1 Overview and benefits. 42 3.2 Using application-period temporal tables . 42 3.2.1 New concept of a BUSINESS_TIME period . 42 3.2.2 Defining a BUSINESS_TIME period . 43 3.2.3 Extensions to primary keys, unique constraints, and unique indexes. 44 © Copyright IBM Corp. 2015. All rights reserved. iii 3.2.4 Temporal UPDATE and DELETE rules. 45 3.2.5 Queries for application-period temporal tables . 49 3.2.6 BUSINESS_TIME period restrictions . 50 3.2.7 Utilities . 50 3.3 Case study: an application-period table in action . 50 3.3.1 Create an application-period temporal table . 50 3.3.2 Step-by-step usage scenarios . 51 Chapter 4. Bitemporal tables . 57 4.1 Overview . 58 4.2 Where application-period meets system-period temporal. 58 4.2.1 Using bitemporal tables in data manipulation statements. 59 4.3 Extending an application-period temporal table to become a bitemporal table . 60 4.4 Bitemporal tables in action . 61 4.4.1 Create a bitemporal table . 61 4.4.2 Step-by-step usage scenarios . 63 4.4.3 Bitemporal queries . 71 Chapter 5. Additional considerations . 73 5.1 Temporal support for views. 74 5.1.1 Queries . 74 5.1.2 Data change operations on views. 74 5.1.3 Query of a view using a period specification for SYSTEM_TIME . 75 5.1.4 Query on a view using a period specification for BUSINESS_TIME . 75 5.1.5 Data change operations on temporal views . 76 5.2 Time travel: Temporal special registers . 76 5.2.1 Two temporal special registers . 77 5.2.2 Enabling or disabling the temporal special registers. 77 5.2.3 How temporal registers affect queries. 78 5.2.4 How temporal affects UPDATE and DELETE statements . 79 5.2.5 How temporal special registers affect statements in user-defined functions . 81 5.3 Auditing with temporal tables . 82 5.3.1 Overview and benefit . 82 5.3.2 Using non-deterministic generated expression columns. 83 5.3.3 Detailed explanation of the preceding example . 85 5.4 Performance . 86 5.4.1 CURRENT TEMPORAL SYSTEM_TIME special register . 86 5.4.2 Performance summary on temporal support. 87 Part 2. IBM DB2 archive transparency . 89 Chapter 6. DB2 archive transparency overview ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    204 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us