Many IT systems require historical data to be kept, in addition to the current status information. Db2 10 for z/OS introduced temporal data support to provide this functionality, whereby the historical data is automatically maintained. This intensive course provides an in-depth look at how temporal tables may be created and exploited. This course also covers the concept and usage of archive tables, as introduced with Db2 11 for z/OS.
The need for historical data; traditional methods for handling historical data; temporal table support; system-period temporal tables; application-period temporal tables.
Defining System-Period Temporal TablesCreating system-period temporal tables; Defining the system-period temporal table; ROW BEGIN, ROW END & TRANSACTION START ID columns; Defining the history table; Enabling system-period data versioning; Enabling an existing table for system-period data versioning; System-period data versioning example; Catalog tables.
Defining Application-Period Temporal TablesDefining the application-period temporal table; Overlapping data; BUSINESS_TIME WITHOUT OVERLAPS; Modifying existing tables; Index creation; Catalog tables.
SQL Extensions for Temporal TablesSYSTEM_TIME period-specification; FOR SYSTEM_TIME AS OF . . .; FOR SYSTEM_TIME FROM . . . TO . . .; FOR SYSTEM_TIME BETWEEN . . . AND . . .; BUSINESS_TIME period specification; FOR BUSINESS_TIME AS OF . .; FOR PORTION OF BUSINESS_TIME; Traditional UPDATE; UPDATE for time period - qualifying rows; Row category and behaviour; Row behaviour example (UPDATE); Row behaviour example (DELETE); Reasons to be cautious!!; Special registers and BIND options (DB2 11).
Archive TablesArchiving old data; Archive tables (Db2 11 for z/OS); Defining archive tables; NSERT, UPDATE & MERGE behaviour; SELECT behaviour.
Db2 Utility Options for Temporal TablesUtility restrictions; LISTDEF additions; LISTDEF behaviour examples; RECOVER utility; LOAD utility.
Practical ExercisesDefining temporal tables; manipulating and reporting data in temporal tables.
Join our public courses in our Sweden facilities. Private class trainings will be organized at the location of your preference, according to your schedule.