IP Library Granted Patent US 12,405,947
Granted Patent B2
US 12,405,947 · App. 18/428,583 · Granted Sep 2, 2025

Statement-level instead-of database triggers

Inventors: Abhijith Anilkumar (San Francisco, CA); Douglas Doole (Livermore, CA); Simon Y. Wong (San Carlos, CA); Randy Philip Spalten (Benicia, CA)
Assignee: Salesforce, Inc.
G06F16/2435G06F16/2282G06F16/2365G06F16/2393G06F16/24565
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,405,947
App. No.
18/428,583
Filed
Jan 31, 2024
Granted
Sep 2, 2025
Kind
B2
Art Unit
2162
USPC
707/769
Abstract

Techniques are disclosed relating to implementing a statement-level INSTEAD OF trigger. In one embodiment a computer system stores trigger information associated with a statement-level database trigger executable to initiate execution of at least one trigger instruction for a database instead of performing a particular database operation, on a database view, specified by a database operation statement. The computer system receives a first database operation statement specifying performance of the particular database operation on the database view and identifies a set of target rows, within the database view, targeted by the first database operation statement. In addition, the computer system generates a reference table associated with the database view, where the reference table includes rows corresponding to the target rows. The computer system executes the statement-level database trigger instead of executing the database operation statement, where executing the statement-level database trigger includes accessing the reference table.

Claims (51)

1. A method, comprising:

storing, by a computer system, trigger information associated with a first statement-level database trigger executable to initiate execution of at least one first trigger instruction for a database instead of performing a particular database operation, on a first database view of selected data from the database, specified by a database operation statement;

receiving, by the computer system, a first database operation statement specifying performance of the particular database operation on the first database view;

identifying, by the computer system, a set of first target rows, within the first database view, targeted by the first database operation statement;

generating, by the computer system, a first reference table associated with the first database view, wherein the first reference table includes rows corresponding to the first target rows; and

executing, by the computer system, the first statement-level database trigger instead of executing, rather than before or after executing, the first database operation statement, wherein executing the first statement-level database trigger includes accessing the first reference table and wherein a single execution of the first statement-level database trigger is performed instead of execution of the first database operation statement for multiple of the first target rows.

2. The method of claim 1 , wherein a given row, in the first reference table, corresponding to a given first target row includes original data values reflecting a state of the given first target row without performing the particular database operation.

3. The method of claim 1 , wherein a given row, in the first reference table, corresponding to a given first target row includes updated data values reflecting a state of the given first target row if the particular database operation is performed.

4. The method of claim 1 , wherein a given row, in the first reference table, corresponding to a given first target row includes both original data values reflecting a state of the given first target row without performing the particular database operation and updated data values reflecting a state of the given first target row if the particular database operation is performed.

5. The method of claim 1 , further comprising:

storing, by the computer system, trigger information associated with a second statement-level database trigger executable to initiate execution of at least one second trigger instruction for the database instead of performing the particular database operation on the first database view; and

executing, by the computer system, the second statement-level database trigger instead of executing the first database operation statement, wherein executing the second statement-level database trigger includes accessing the first reference table.

6. The method of claim 1 , wherein the first database operation statement further specifies a second database view of selected data from the database, and further comprising:

identifying, by the computer system, a set of second target rows, within the second database view, targeted by the first database operation statement; and

generating, by the computer system, a second reference table associated with the second database view, wherein the second reference table includes rows corresponding to the second target rows.

7. A non-transitory computer readable medium having program instructions stored thereon that are capable of causing a computer system to perform operations comprising:

storing trigger information associated with a first statement-level database trigger executable to initiate execution of at least one first trigger instruction for a database instead of performing a particular database operation, on a first database view of selected data from the database, specified by a database operation statement;

receiving a first database operation statement specifying performance of the particular database operation on the first database view;

identifying a set of first target rows, within the first database view, targeted by the first database operation statement;

generating a first reference table associated with the first database view, wherein the first reference table includes rows corresponding to the first target rows; and

executing the first statement-level database trigger instead of executing, rather than before or after executing, the first database operation statement, wherein executing the first statement-level database trigger includes accessing the first reference table and wherein a single execution of the first statement-level database trigger is performed instead of execution of the first database operation statement for multiple of the first target rows.

8. The computer readable medium of claim 7 , wherein a given row, in the first reference table, corresponding to a given first target row includes original data values reflecting a state of the given first target row without performing the particular database operation.

9. The computer readable medium of claim 7 , wherein a given row, in the first reference table, corresponding to a given first target row includes updated data values reflecting a state of the given first target row if the particular database operation is performed.

10. The computer readable medium of claim 7 , wherein a given row, in the first reference table, corresponding to a given first target row includes both original data values reflecting a state of the given first target row without performing the particular database operation and updated data values reflecting a state of the given first target row if the particular database operation is performed.

11. The computer readable medium of claim 7 , wherein the operations further comprise:

storing trigger information associated with a second statement-level database trigger executable to initiate execution of at least one second trigger instruction for the database instead of performing the particular database operation on the first database view; and

executing the second statement-level database trigger instead of executing the first database operation statement, wherein executing the second statement-level database trigger includes accessing the first reference table.

12. The computer readable medium of claim 7 , wherein the first database operation statement further specifies a second database view of selected data from the database, and the operations further comprise:

identifying a set of second target rows, within the second database view, targeted by the first database operation statement; and

generating a second reference table associated with the second database view, wherein the second reference table includes rows corresponding to the second target rows.

13. A system, comprising:

at least one processor; and

memory having program instructions stored thereon that are executable by the at least one processor to cause the system to perform operations comprising:

storing trigger information associated with a first statement-level database trigger executable to initiate execution of at least one first trigger instruction for a database instead of performing a particular database operation, on a first target arrangement, into rows and columns, of data from the database, specified by a database operation statement;

receiving a first database operation statement specifying performance of the particular database operation on the first target arrangement;

identifying a set of first target rows, within the first target arrangement, targeted by the first database operation statement;

generating a first reference table associated with the first target arrangement, wherein the first reference table includes rows corresponding to the first target rows; and

executing the first statement-level database trigger instead of executing, rather than before or after executing, the first database operation statement, wherein executing the first statement-level database trigger includes accessing the first reference table and wherein a single execution of the first statement-level database trigger is performed instead of execution of the first database operation statement for multiple of the first target rows.

14. The system of claim 13 , wherein the first target arrangement is a database view specified by a query of the database.

15. The system of claim 13 , wherein a given row, in the first reference table, corresponding to a given first target row includes original data values reflecting a state of the given first target row without performing the particular database operation.

16. The system of claim 13 , wherein a given row, in the first reference table, corresponding to a given first target row includes updated data values reflecting a state of the given first target row if the particular database operation is performed.

17. The system of claim 13 , wherein a given row, in the first reference table, corresponding to a given first target row includes both original data values reflecting a state of the given first target row without performing the particular database operation and updated data values reflecting a state of the given first target row if the particular database operation is performed.

18. The system of claim 13 , wherein the operations further comprise:

storing trigger information associated with a second statement-level database trigger executable to initiate execution of at least one second trigger instruction for the database instead of performing the particular database operation on the first target arrangement; and

executing the second statement-level database trigger instead of executing the first database operation statement, wherein executing the second statement-level database trigger includes accessing the first reference table.

19. The system of claim 13 , wherein the first database operation statement further specifies a second target arrangement of rows and columns from the database, and the operations further comprise:

identifying a set of second target rows, within the second target arrangement, targeted by the first database operation statement; and

generating a second reference table associated with the second target arrangement, wherein the second reference table includes rows corresponding to the second target rows.

20. The system of claim 19 , wherein the operations further comprise:

storing trigger information associated with a second statement-level database trigger executable to initiate execution of at least one second trigger instruction for the database instead of performing the particular database operation on the second target arrangement; and

executing the second statement-level database trigger instead of executing the first database operation statement, wherein executing the second statement-level database trigger includes accessing the second reference table.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 5, 2024
From: ANILKUMAR, ABHIJITH; DOOLE, DOUGLAS; WONG, SIMON Y.; SPALTEN, RANDY PHILIP
To: SALESFORCE, INC.
Reel/Frame 066383/0216 →
Continuity (1)
Related Publication 20250245217A1 · Jul 31, 2025
References Cited (38)
US 5546576A · Cochrane · 1996 [cited by examiner]
US 5873075A · Cochrane · 1999 [cited by examiner]
US 6185577B1 · Nainani · 2001 [cited by examiner]
US 6233585B1 · Gupta · 2001 [cited by examiner]
US 6698010B1 · Yamanouchi et al. · 2004 [cited by applicant]
US 7512631B2 · Medicke et al. · 2009 [cited by applicant]
US 8447745B2 · Ahuja et al. · 2013 [cited by applicant]
US 8548952B2 · Weissman et al. · 2013 [cited by applicant]
US 8738590B2 · Bezar et al. · 2014 [cited by applicant]
US 8874593B2 · Unger et al. · 2014 [cited by applicant]
US 8918361B2 · Wong et al. · 2014 [cited by applicant]
US 8930322B2 · Weissman et al. · 2015 [cited by applicant]
US 9053231B2 · Agrawal et al. · 2015 [cited by applicant]
US 9367431B2 · Unger et al. · 2016 [cited by applicant]
US 9501516B2 · Driesen · 2016 [cited by applicant]
US 10649987B2 · Wong et al. · 2020 [cited by applicant]
US 11397714B2 · Rielau et al. · 2022 [cited by applicant]
US 20020184207A1 · Anderson et al. · 2002 [cited by applicant]
US 20030115178A1 · Doole et al. · 2003 [cited by applicant]
US 20030154197A1 · Millet · 2003 [cited by examiner]
US 20030200214A1 · Doole et al. · 2003 [cited by applicant]
US 20050097149A1 · Vaitzblit · 2005 [cited by examiner]
US 20050114827A1 · Lane et al. · 2005 [cited by applicant]
US 20050125371A1 · Bhide et al. · 2005 [cited by applicant]
US 20080086479A1 · Fry · 2008 [cited by examiner]
US 20080270368A1 · Cotner et al. · 2008 [cited by applicant]
US 20100070480A1 · Ahuja et al. · 2010 [cited by applicant]
US 20110016202A1 · Ye et al. · 2011 [cited by applicant]
US 20130007069A1 · Chaliparambil · 2013 [cited by examiner]
US 20140025642A1 · Wong et al. · 2014 [cited by applicant]
US 20140172889A1 · Adam et al. · 2014 [cited by applicant]
US 20150278320A1 · Bhatnagar et al. · 2015 [cited by applicant]
US 20170116321A1 · Jain et al. · 2017 [cited by applicant]
US 20210342322A1 · Rielau et al. · 2021 [cited by applicant]
WO 2008042980A3 · 2008 [cited by applicant]
WO 2021225646A1 · 2021 [cited by applicant]
Sanjit K. Kaul et al., “Status Updates Through Queues,” IEEE; 2012; pp. 1-6. [cited by applicant]
Yoongu Kim et al., “Flipping Bits in Memory Without Accessing Them: An Experimental Study of DRAM Disturbance Errors,” 2014, IEEE; pp. 361-372. [cited by applicant]