In any big business like Insurance,Finance and Banking, the need of data happened in particular time period is required.
The business time indicates the period during which the data is accurate with respect to the world. The system time indicates the period during which the data is stored in the database.
Business Time:Business time is applicable to only certain types of data that change over time, and the validity of the data is relevant to the application and users.
System Time:System time, also referred to as transaction time, denotes the time when the fact became current in the database. System time can be used to track the insertion and modification history of the data.
Check an example Query:
CREATE TABLE COURSE
(COURSENO INTEGER NOT NULL,
TITLE VARCHAR(20) NOT NULL,
CREDITS SMALLINT NOT NULL WITH DEFAULT 3,
PRICE DECIMAL(7,2) NOT NULL,
BUS_START DATE NOT NULL,
BUS_END DATE NOT NULL,
PERIOD BUSINESS_TIME(BUS_START, BUS_END),
PRIMARY KEY(COURSENO, BUSINESS_TIME WITHOUT OVERLAPS)
Period Business_time, denotes time period.
Business_time without overlaps , it checks time overlap
The functions are:
- FOR BUSINESS_TIME AS OF
FOR BUSINESS_TIME FROM
FOR BUSINESS_TIME BETWEEN
In my next post I will give more details on how to use these functions.
- DB2 V10-On-Line Schema Changes (srinimf.com)
- DB2 V10-New Access Method~Hashing (1 of 2) (srinimf.com)
- DB2 Connect-Interfacing with distributed systems (srinimf.com)