Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modification Statements in TSQL2 INSERT INTO Prescription %Executed on 1993-09-30 VALUES ('Melanie','Dr. Beren','Proventil','30 mg', INTERVAL '8:00' MINUTE)

Similar presentations


Presentation on theme: "Modification Statements in TSQL2 INSERT INTO Prescription %Executed on 1993-09-30 VALUES ('Melanie','Dr. Beren','Proventil','30 mg', INTERVAL '8:00' MINUTE)"— Presentation transcript:

1 Modification Statements in TSQL2 INSERT INTO Prescription %Executed on 1993-09-30 VALUES ('Melanie','Dr. Beren','Proventil','30 mg', INTERVAL '8:00' MINUTE) VALID PERIOD '[1993/01/01 ­ 1993/06/30]‘ VALID PERIOD(CURRENT_TIMESTAMP, NOBIND(TIMESTAMP 'now')) DELETE FROM Prescription WHERE Name = 'Melanie‘ %Executed on 1994-01-30 VALID PERIOD '[1993­03­01 ­ 1993­05­31]‘ VALID PERIOD '[1993­09­01 ­ 1994­04­30]‘ UPDATE Prescription %Executed on 1994-04-01 SET Dosage TO '50 mg‘ WHERE Name = 'Melanie‘ AND Drug = 'Proventil‘ UPDATE Prescription SET Dosage TO '50 mg‘ %Executed on 1994-05-01 VALID PERIOD'[1993­02­01 ­ 1993­07­30]‘ WHERE Name = 'Melanie‘ AND Drug = 'Proventil'

2 Timeline 50 30 50 Original DELETE yields UPDATE yields UPDATE with valid time yields now

3 Content of the bitemporal DB 'Melanie',...,'30 mg','8:00', 1993/01/01 ­ 1993/06/30, 1993-09-30-- UC,1994-01-30 'Melanie',...,'30 mg','8:00', 1993/09/30 ­ now, 1993-09-30-- UC,1994-01-30 'Melanie',...,'30 mg','8:00', 1993/01/01 ­ 1993/03/01, 1994-01-30-- UC,1994-05-01 'Melanie',...,'30 mg','8:00', 1993/05/31 ­ 1993/06/30, 1994-01-30-- UC, 1994-05-01 'Melanie',..., '30 mg','8:00', 1994/04/30 - now, 1994-01-30-- UC 1994-04-01 'Melanie',..., '50 mg','8:00', 1994/04/30- now, 1994-04-01--UC 'Melanie',...,'30 mg','8:00', 1993/01/01 ­ 1993/02/01, 1994-05-01-- UC 'Melanie',...,'50 mg','8:00', 1993/02/01 ­ 1993/03/01, 1994-05-01-- UC 'Melanie',...,'50 mg','8:00', 1993/05/31 ­ 1993/06/30, 1994-05-01-- UC


Download ppt "Modification Statements in TSQL2 INSERT INTO Prescription %Executed on 1993-09-30 VALUES ('Melanie','Dr. Beren','Proventil','30 mg', INTERVAL '8:00' MINUTE)"

Similar presentations


Ads by Google