System and method for optimizing database transaction termination
Abstract
Embodiments of the invention are generally directed to a system and method for optimizing transaction termination. A database interface receives an indication to terminate a transaction. The database interface decides whether to send a command to the underlying database server to terminate the transaction. If the database interface does send a command to the database server, it determines which command is appropriate to send.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 4 · Forward citations: 0.
Claims (10)
- Claim 1Independent Claim
A method for terminating a physical database connection to a database server, the method comprising: determining a current transaction state associated with the physical database connection, wherein the current transaction state is one of: a first state indicating that a database resource is not allocated for a database transaction, a second state indicating that the database resource is allocated for the database transaction, and a third state indicating that data on the database is to be modified; receiving at a database interface a request to terminate a transaction associated with the physical database connection; determining to send the transaction termination request to the database server based on the current transaction state being one of the second and the third state but not the first state; and sending the termination request to the database server when the current transaction state is one of the second state and the third state.
- Claim 2Depends on #1
The method of claim 1 , further comprising; receiving an indication to adjust the transaction state of the physical database connection by one or more of: receiving a call to a prepare statement method of the physical database connection; and receiving a call to an execute method of a statement object derived from physical the database connection.
- Claim 3Depends on #2
The method of claim 2 , further comprising: determining a database statement type based, on the received indication to adjust the transaction state of the physical database connection, the determining comprises determining that the statement type is one of: an INSERT statement; an UPDATE statement; a DELETE statement; a SELECT_FOR_UPDATE statement; and a SELECT statement.
- Claim 4Depends on #3
The method of claim 3 , further comprising, if the statement type is a SELECT statement, determining whether the SELECT statement is one of the following: a SELECT statement that does not cause the database server to allocate a resource based, on a current transaction isolation level; and a SELECT statement that causes the database server to allocate a resource based, on the current transaction isolation level.
- Claim 5Depends on #4
The method of claim 4 , further comprising: transitioning to one of plurality of transaction states based, on the determined database statement type, the transitioning comprises one of: transitioning to the first state, if the SELECT statement does not cause the database server to allocate the resource; transitioning to the second state, if the SELECT statement causes the database server to allocate the resource; and transitioning to the second state, if the database statement type is a SELECT_FOR_UPDATE statement.
- Claim 6Depends on #5
The method of claim 5 , wherein the resource is a database lock.
- Claim 7Depends on #5
The method of claim 5 , wherein receiving the indication to terminate the transaction comprises one or more of: receiving a call to a commit method; receiving a call to a rollback method; receiving a call to enable an auto-commit mode of the transaction; and receiving a call to a close method.
- Claim 8Depends on #5
The method of claim 5 wherein transitioning to one of the plurality of transaction states based, on the determined database statement type comprises transitioning to the third transaction state if the database statement type is one of: an INSERT statement; an UPDATE statement; and a DELETE statement.
- Claim 9Depends on #8
The method of claim 8 , wherein receiving the indication to terminate the transaction comprises one or more of: receiving a call to a commit method; and receiving a call to a rollback method.
- Claim 10Depends on #9
The method of claim 9 wherein determining whether to send the termination request to the database server based on the selected transaction state comprises one of: propagating the call to the commit metho
Technical Overview & Description
TECHNICAL FIELD Embodiments of the invention generally relate to the field of data processing and, more particularly, to a system and method for optimizing transaction termination. BACKGROUND Many businesses provide access to their products and services through applications that are delivered over computer networks such as the Internet. These applications typically have a multi-tiered architecture. In those cases where the applications are delivered over the Internet they are commonly referred to as Web-based applications. FIG. 1 is a block diagram of a Web-based application 100 having a multi-tiered architecture. Web-based application 100 includes client layer 110 , application layer 120 , and database layer 130 . Client layer 110 includes user interface 112 that runs on a client computing device such as a desktop computer, laptop computer, personal digital assistant, telephone, and the like. In a Web-based environment, user interface 112 is typically a Web browser. User interface 112 may collect input from a user and provide that input to application layer 120 for processing. Application layer 120 includes application server 122 to receive and process input from client layer 110 . Application server 122 typically includes a number of subcomponents including, for example, connectivity layer 140 , presentation logic 142 , business logic 144 , and database interface 146 . Connectivity layer 140 provides connections to client layer 110 using protocols such as the HyperText Transfer Protocol (HTTP), HTTP secured through the Secure Socket Layer, the Simple Object Access Protocol (SOAP), and the like. Presentation logic 142 generates a Graphical User Interface (GUI) using, for example, a markup language such as the Hyper Text Markup Language (HTML). Business logic 144 represents the core of the application, for example, the rules governing the underlying business process (or other functionality) provided
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (4)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (2)
- Berenson et al. "A critique of ANSI SQL Isolation Levels" May 1995, ACM Press, vol. 24 Issue 2, p. 1-10.
- Hal Berenson, Phil Bemstein, Jim Gray, JimMelton, Elizabeth O'Neil, Patdck O'Neil "A critiqe of ANSI SQL isolation levels" May 1995, ACM Press, vol. 24 Issue 2, pgo 1-10.