摘要:
A database system includes components for executing stored procedures that include at least one of a conditional expression, assignment expression, and dynamic database query language (e.g., SQL) statement. For each such expression, a predetermined type of code is generated and inserted into the object code corresponding to the stored procedure. When executing the stored procedure object code, the predetermined type of code is evaluated directly without having to generate a separate database query language statement.
摘要:
A method, apparatus, and article of manufacture for accessing a subject table in a computer system. The subject table is partitioned across a plurality of processing units of the computer system. A trigger is defined for the subject table, such that when a triggering event occurs on the subject table, a triggered action is performed. Both the triggering event and triggered action can be performed in parallel by the computer system. A spool table is generated for each partition of the subject table, wherein the spool table stores one or more necessary records accessed from the subject table by the triggering event. In this manner, triggered actions that refer to these necessary rows need not access the subject table again.
摘要:
In a database system, when an operation (a request or a transaction) that modifies one or more rows of a table is performed, multiple images of the row that is being modified (e.g., added, deleted, or updated) is stored in the table. State identifiers are provided to identify the state of each row, such as a “before image” row and an “after image” row. A before image row represents a row before a modification or “mutation” operation is performed. An after image row represents the latest row as processed by a current modification operation. A before image row is retained in each table as long as the transaction that created or updated the row is active. As soon as the transaction commits successfully, the before image rows become reusable and can be reused by another request or transaction. The state identifier associated with each row can also indicate that a “mutation” is not being performed on a row; that is, an operation that modifies the contents of the row is not currently being performed.
摘要:
A database system includes a storage module containing a table having plural portions (e.g., rows). A lock manager places a table-level lock on the table for a first transaction, the first transaction updating a first row of the table. The lock manager converts the table-level lock to a lower level lock to lock the first table portion if a second transaction requests an access of the first portion of the table.
摘要:
A method, apparatus, and article of manufacture for replicating modifications made to a subject table from a primary system to a subscriber system. A subject table is partitioned across a plurality of processors in both the primary and subscriber systems, wherein each of the processors manages at least one partition of the subject table. Change row messages are generated for each modification made to a subject table, wherein the change row message identifies the processor in the primary system making the modification, and includes a sequence number for the processor in the primary system. The processor in the primary system identified in the change row message is re-mapped to a new processor in the subscriber system and the sequence number for the processor in the primary system identified in the change row message is re-mapped to a new sequence number for the new processor in the subscriber system, so that the modifications are applied in a correct order on the subscriber system.