System and method for identifying and storing changes made to a table

Abstract
A base table is scanned with a delete marker and an insert marker. The delete marker identifies a last change committed to the base table as part of a transaction prior to execution of a statement, and the insert marker identifies a last change committed to base table as part of the transaction during execution of the statement. The results of the delete marker scan are filtered with deletions stored in a delta table, and a delete table is populated with the filtered rows. The results of the insert scan are filtered with insertions stored in the delta table, and an insert table is populated with the filtered rows.
Description


BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention


[0002] The present invention is directed to the field of database management, and, more specifically, to identifying rows which are deleted from and inserted into a base table and storing such changes.


[0003] 2. Description of the Prior Art


[0004] In a database management system (DBMS), a current version of data is generally stored in a “base” table. Each row in the base table may be changed. Such a change may be the deletion, insertion, or modification of a row in the base table. A modification is a deletion of a previous version of a row and an insertion of a current version of a row. When a row is changed, the change may be stored in a set of temporary, memory resident “transition” tables. Such a set of transition tables is generally automatically created and managed by the DBMS. The set of transition tables may include a “delete” table, which stores rows deleted from the base table, and an “insert” table, which stores rows inserted into the base table. If a row is modified, the previous version of the row is stored in the delete table, and the current version of the row is stored in the insert table.


[0005] The transition tables enable the DBMS to test the effects of changes and to set conditions for trigger actions. Specifically, transition tables extend referential integrity between tables, change data in a base table underlying a particular view, check for errors and take action based on a detected error, and find the difference between the state of a table before and after a change and take action based on the difference.


[0006] In conventional DBMS's, transition tables may be populated by fully copying rows in the base table before such rows are changed. Thus, for example, if a row is deleted, a previous version of the row is copied and the copy is then stored in the delete table. A drawback of copying rows is that such copies are expensive to generate and store, particularly if the copied row includes large fields of binary large object (BLOB) data such as, for example, code or images.


[0007] Another method of populating transition tables is to scan a log file. However, a drawback of using such a log scan is that BLOB data is often too complex to implement using the log scan. Furthermore, the log scan requires usage of disk input/output (IO).


[0008] Thus, there is a need in the art for systems and methods that efficiently identify and store changes made to a table. It is desired that such systems and methods enable rows including large amounts of BLOB data to be inexpensively identified and stored in an appropriate transition table. It is further desired that such systems and methods operate without inefficient use of disk 10.



SUMMARY OF THE INVENTION

[0009] Accordingly, systems and methods for identifying and storing changes made to a table are disclosed. A current version of data is stored in a base table. Previous versions of each row in the base table are stored in a version store. A delta table identifies the primary key of changes made to the base table and specifies whether such changes are insertions or deletions. A set of transition tables store each change made to the base table. The set of transition tables may include a delete table, which stores rows deleted from the base table, and an insert table, which stores rows inserted into the base table.


[0010] When a row is committed to the base table, the row is preferably assigned a transaction identifier (XID) and sequence number (SEQ). The XID is a unique identifier of the transaction in which the change is made. The SEQ is preferably a monotonically increasing value assigned to each change made within a transaction. A previous version of a row in the version store may be identified by the XID and SEQ of the current version of the row in the base table.


[0011] The transition tables may be populated by identifying rows changed by a statement as part of a transaction. The base table is scanned with a delete marker and an insert marker. The delete marker identifies a last change committed to the base table as part of the transaction prior to execution of the statement, and the insert marker identifies a last change committed to base table as part of the transaction during execution of the statement. The results of the delete marker scan are filtered with the deletions stored in the delta table, and the delete table is populated with the filtered rows. The results of the insert scan are filtered with the insertions stored in the delta table, and the insert table is populated with the filtered rows.







BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The illustrative embodiments will be better understood after reading the following detailed description with reference to the appended drawings, in which:


[0013]
FIG. 1 is a block diagram representing a general purpose computer system in which aspects of the present invention and/or portions thereof may be incorporated;


[0014]
FIG. 2 is a block diagram of an exemplary database management system in accordance with the present invention;


[0015]
FIGS. 3

a
-e are block diagrams of an exemplary base table and version store in accordance with the present invention;


[0016]
FIG. 4 is a flowchart of an exemplary method for identifying and storing changes in accordance with the present invention; and


[0017]
FIG. 5 is a flowchart of an exemplary method for scanning a table in accordance with the present invention.







DETAILED DESCRIPTION

[0018] Systems and methods that meet the above-mentioned objects and provides other beneficial features in accordance with the presently preferred exemplary embodiments of the invention will be described below with reference to aforementioned Figures. Those skilled in the art will readily appreciate that the description given herein with respect to those figures is for explanatory purposes only and is not intended in any way to limit the scope of the invention. Throughout the description, like reference numerals will refer to like elements in the respective figures.


[0019] Computer Environment


[0020]
FIG. 1 and the following discussion are intended to provide a brief general description of a suitable computing environment in which the present invention and/or portions thereof may be implemented. Although not required, the invention is described in the general context of computer-executable instructions, such as program modules, being executed by a computer, such as a client workstation or a server. Generally, program modules include routines, programs, objects, components, data structures and the like that perform particular tasks or implement particular abstract data types. Moreover, it should be appreciated that the invention and/or portions thereof may be practiced with other computer system configurations, including hand-held devices, multi-processor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers and the like. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.


[0021] As shown in FIG. 1, an exemplary general purpose computing system includes a conventional personal computer 120 or the like, including a processing unit 121, a system memory 122, and a system bus 123 that couples various system components including the system memory to the processing unit 121. The system bus 123 may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. The system memory includes read-only memory (ROM) 124 and random access memory (RAM) 125. A basic input/output system 126 (BIOS), containing the basic routines that help to transfer information between elements within the personal computer 120, such as during start-up, is stored in ROM 124.


[0022] The personal computer 120 may further include a hard disk drive 127 for reading from and writing to a hard disk (not shown), a magnetic disk drive 128 for reading from or writing to a removable magnetic disk 129, and an optical disk drive 130 for reading from or writing to a removable optical disk 131 such as a CD-ROM or other optical media. The hard disk drive 127, magnetic disk drive 128, and optical disk drive 130 are connected to the system bus 123 by a hard disk drive interface 132, a magnetic disk drive interface 133, and an optical drive interface 134, respectively. The drives and their associated computer-readable media provide non-volatile storage of computer readable instructions, data structures, program modules and other data for the personal computer 120.


[0023] Although the exemplary environment described herein employs a hard disk, a removable magnetic disk 129, and a removable optical disk 131, it should be appreciated that other types of computer readable media which can store data that is accessible by a computer may also be used in the exemplary operating environment. Such other types of media include a magnetic cassette, a flash memory card, a digital video disk, a Bernoulli cartridge, a random access memory (RAM), a read-only memory (ROM), and the like.


[0024] A number of program modules may be stored on the hard disk, magnetic disk 129, optical disk 131, ROM 124 or RAM 125, including an operating system 135, one or more application programs 136, other program modules 137 and program data 138. A user may enter commands and information into the personal computer 120 through input devices such as a keyboard 140 and pointing device 142 such as a mouse. Other input devices (not shown) may include a microphone, joystick, game pad, satellite disk, scanner, or the like. These and other input devices are often connected to the processing unit 121 through a serial port interface 146 that is coupled to the system bus, but may be connected by other interfaces, such as a parallel port, game port, or universal serial bus (USB). A monitor 147 or other type of display device is also connected to the system bus 123 via an interface, such as a video adapter 148. In addition to the monitor 147, a personal computer typically includes other peripheral output devices (not shown), such as speakers and printers. The exemplary system of FIG. 1 also includes a host adapter 155, a Small Computer System Interface (SCSI) bus 156, and an external storage device 162 connected to the SCSI bus 156.


[0025] The personal computer 120 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 149. The remote computer 149 may be another personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the personal computer 120, although only a memory storage device 150 has been illustrated in FIG. 1. The logical connections depicted in FIG. 1 include a local area network (LAN) 151 and a wide area network (WAN) 152. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets, and the Internet.


[0026] When used in a LAN networking environment, the personal computer 120 is connected to the LAN 151 through a network interface or adapter 153. When used in a WAN networking environment, the personal computer 120 typically includes a modem 154 or other means for establishing communications over the wide area network 152, such as the Internet. The modem 154, which may be internal or external, is connected to the system bus 123 via the serial port interface 146. In a networked environment, program modules depicted relative to the personal computer 120, or portions thereof, may be stored in the remote memory storage device. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.


[0027] Exemplary Systems and Methods of the Present Invention


[0028] Generally, a current version of data is stored in a base table. Previous versions of each row in the base table are stored in a version store. A delta table identifies the primary key of changes made to the base table and specifies whether such changes are insertions or deletions. A set of transition tables store each change made to the base table. The set of transition tables may include a delete table, which stores rows deleted from the base table, and an insert table, which stores rows inserted into the base table.


[0029] An exemplary database management system (DBMS) in accordance with the present invention is shown in FIG. 2. As shown, DBMS 200 includes base table 210, version store 220, delta table 230, and a set of transition tables 240 and 242 including delete table 240 and insert table 242. A current version of data is stored in base table 210. As should be appreciated, although only a single base table 210 is shown, DBMS 200 may include any number of additional base tables. Base table 210 preferably includes data columns, a transaction identifier (XID) column, and sequence number (SEQ) column. The data columns store substantive data. The XID column stores an identifier of a transaction in which the current version of each row was committed. The SEQ column identifies the sequence in which changes are made within a transaction. The SEQ is preferably a monotonically increasing value that is automatically maintained by DBMS 200. As should be appreciated not every base table in DBMS 200 need include XID and SEQ columns. Desirably, base tables storing changes to be identified in accordance with the present invention need include such XID and SEQ columns. An exemplary base table 210 is shown below in table 1:
1TABLE 1Customer IDNameXIDSEQ101Andy301102Bob302103303104Dave304105Ed305


[0030] Table 1 includes data columns “Customer ID” and “Name”, which store substantive data relating to customers. Rows 101-105 were committed as part of transaction “30”. Row 103is a ghost record, which is a record that has been deleted. Thus, although row 103 remains in Table 1 as a placeholder, there is no corresponding “Name” data for row 103.


[0031] Version store 220 stores previous versions of rows in base table 210. Rows in version store 220 are indexed by the XID and SEQ of the version of the row by which they were replaced. Thus, the XID and SEQ values of each current row serve as pointers to the previous versions. An exemplary table illustrating rows in a version store 220 is shown below in Table 2:
2TABLE 2ChangeChangeCustomerXIDSEQIDNameXIDSEQ303103Chris203302102Betty202301101Alex201201101Adam101


[0032] Table 2 is indexed by the columns “Change XID” and “Change SEQ”, which identify the identify change XID and change SEQ values of each row. For example, the current version of row 101, shown in Table 1, is assigned XID 30 and SEQ 1. A first previous version of row 101, which was replaced by the current version, is shown in Table 2 with Change XID 30 and Change SEQ 1. The first previous version is assigned XID 20 and SEQ 1, and, therefore, was committed as part of transaction 20. A second previous version of row 101, which was replaced by the first previous version, is shown in Table 3 with Change XID 20 and Change SEQ 1. The second previous version is assigned XID 10 and SEQ 1, and, therefore, was committed as part of transaction 10.


[0033] Block diagrams of exemplary versions of rows in base table 210 and version store 220 are shown in FIGS. 3a-e. For example, as shown in FIG. 3a, the current version of row 101is stored in base table 210. The current version is assigned XID 30 and SEQ 1, which point to the first previous version of the row stored in version store 220. The first previous version of the row is assigned XID 20 and SEQ 1, which point to the second previous version of the row also stored in version store 220.


[0034] As shown in FIG. 3b, the current version of row 102is stored in base table 210. The current version is assigned XID 30 and SEQ 2, which point to the first previous version of the row stored in version store 220.


[0035] As shown in FIG. 3c, the current version of row 103, which is a ghost record, is stored in base table 210. The ghost record is a placeholder for a deleted record which does not include substantive data. The ghost record is assigned XID 30 and SEQ 3, which point to the first previous version of the row stored in version store 220.


[0036] As shown in FIGS. 3d and 3e, the current version of rows 104and 105, respectively, are stored in base table 210. Because such rows are newly inserted, there is no previous version of them in version store 220. In an alternative embodiment, a unique marker with a predetermined unique SEQ value may be used to show that a row has been newly inserted. Such a unique marker would indicate that a previous version of the row is not stored in version store 220.


[0037] It is not required that version store 220 persist after crash of DBMS 200. Therefore, version store 220 may be stored in a temporary database of DBMS 200. Previous versions of rows are preferably stored only while queries accessing such rows may be executed, and, therefore, previous versions are periodically deleted from version store 220.


[0038] Version store 220 may be organized according to a tree structure such as, for example, a b tree or b+tree. The key for the b tree is preferably the XID and SEQ of each change. Rows organized according to a b tree may be range deleted according to their XID and SEQ values. For example, changes with an XID and SEQ within a specified range of XID's and SEQ's may be range deleted. Rows may be deleted following a single DML statement within a transaction or following a complete transaction or group of transactions.


[0039] Alternatively, version store 220 may be organized using a physical row ID or disk address to identify the previous version of each row. In such a row ID scheme, the Row ID of the previous version of each row preferably is stored in addition to the XID and SEQ. The previous versions are preferably stored in a set of disk pages referred to as “heaps”. New heaps may be generated at a specified period. For example, a user may request that a new heap be generated every sixty seconds. A heap may be deleted after all transactions which generated versions stored in the heap are complete.


[0040] In addition to organizing version store 220, such tree structures and heaps may be used to organize base table 210. For example, if a row in base table 210 includes binary large object (BLOB) data, then such BLOB data may be broken down into fragments are stored in separate BLOB base table corresponding to the row. Such BLOB base tables are organized according to tree structures or heaps maintained by DBMS 200.


[0041] Delta table 230 identifies changes made in base table 210. An exemplary delta table preferably has two columns: the primary key column of base table 210 and a change column, which indicates whether the corresponding change is an insertion or a deletion.


[0042] Delta table 230 preferably identifies changes made by a corresponding data manipulation language (DML) statement. For example, if a DML statement made changes {XID 30, SEQ 2} through {XID 30, SEQ 4}, then a corresponding delta table 230 would preferably be generated as shown below in Table 3:
3TABLE 3PrimaryKeyChange102Delete102Insert103Delete104Insert


[0043] Table 3 includes the primary key value of changes {XID 30, SEQ 2} through {XID 30, SEQ 4} and indicates whether the corresponding change is an insertion or deletion. Table 4 indicates that row 102has been modified, which involves both a deletion and an insertion. Table 3 also shows that row 103has been deleted and row 104has been inserted.


[0044] Transition tables 240 and 242 store the changes made to base table 210. Delete table 240 shows deleted from base table 210. An exemplary delete table 240 illustrating rows deleted by the exemplary DML statement described above is shown below in Table 4:
4TABLE 4Customer IDName102Betty103Chris


[0045] Insert table 242 stores rows inserted into base table 210. An exemplary insert table 242 illustrating rows inserted by the DML statement described above is shown below in Table 5.
5TABLE 5Customer IDName102Bob104Dave


[0046] Transition tables 240 and 242 are populated by identifying rows that are changed by a statement as part of a transaction. Generally, base table 210 is scanned with a delete marker and an insert marker. The delete marker identifies a last change committed to base table 210 as part of the transaction prior to execution of the statement, and the insert marker identifies a last change committed to base table 210 during execution of the statement. The results of the delete marker scan are filtered with the deletions stored in delta table 230, and delete table 240 is populated with the filtered rows. The results of the insert scan are filtered with the insertions stored in delta table 230, and insert table 242 is populated with the filtered rows.


[0047] A flowchart of an exemplary method for identifying such rows is shown in FIG. 4. At step 410, the XID of the delete and insert markers are set to the identifier of the transaction. For example, the exemplary statement above was executed as part of transaction “30”, and, therefore, the XID of the delete and insert markers is set to 30.


[0048] At step 412, the SEQ of the delete marker is set to the SEQ of the last change committed as part of the transaction. For example, the last change committed as part of transaction “30” prior to execution of the exemplary statement was assigned SEQ “1”. Thus, the delete marker is set to: {(XID 30, SEQ 1)}.


[0049] At step 414, DBMS 200 executes the data manipulation language (DML) statement. The statement may be used to insert, delete, and/or modify rows in base table 210. For example, the exemplary statement above modified row 102, deleted row 103, and inserted row 104.


[0050] When a statement changes a particular row, the current version of the row is stored in base table 210 with the previous version of the row stored in version store 220. When the current version of the row is committed to base table 210, it is assigned XID and SEQ values which serve as a pointer to the previous version of the row. The XID value assigned to each change is the XID value for transaction set at step 410. The SEQ value identifies the sequence in which changes are made within the transaction. The SEQ is preferably a monotonically increasing value that is automatically maintained by DBMS 200. For example, the XID and SEQ values assigned to the first row changed by the exemplary statement, row 102, are {(XID 30, SEQ 2)} as shown above in Table 1. The next changed row, row 103, is, in turn, assigned {(XID 30, SEQ 3)}. The next changed row, row 104, is, in turn, assigned {(XID 30, SEQ 4)}.


[0051] At step 416, the SEQ of the insert marker is set to the SEQ of the last change committed as part of the transaction during execution of the statement. For example, the last row changed as part of transaction “30” during execution of the statement was row 104, which was assigned SEQ “4”. Thus, the insert marker is set to: {(XID 30, SEQ 4)}.


[0052] At step 418, base table 210 is scarned with the delete marker. An exemplary method for scanning base table 210 is discussed in detail below with reference to FIG. 5. Results of performing such a scan on Table 2 with delete marker {(XID 30, SEQ 1)} are shown below in table 6:
6TABLE 6Customer IDNameXIDSEQ101Andy301102Betty202103Chris203


[0053] At step 420, the results of the delete scan are filtered with the deletions stored in delta table 230, and, at step 422, delete table 240 is populated with the filtered rows. For example, if the rows in Table 6 are filtered with the deletions stored in Table 3, then delete table 240 will be populated as shown below in Table 7:
7TABLE 7Customer IDNameXIDSEQ102Betty202103Chris203


[0054] At step 424, base table 210 is scanned with the insert marker. An exemplary method for scanning base table 210 is discussed in detail below with reference to FIG. 5 Results of performing such a scan on Table 2 with insert marker {(XID 30, SEQ 4)} are shown below in Table 8:
8TABLE 8Customer IDNameXIDSEQ101Andy301102Bob302103303104Dave304


[0055] At step 426, the results of the insert scan are filtered with the insertions stored in delta table 230, and, at step 428, insert table 242 is populated with the filtered rows. For example, if the rows in Table 8 are filtered with the insertions stored in Table 4, then insert table 242 will be populated as shown below in Table 9:
9TABLE 9Customer IDNameXIDSEQ102Bob302104Dave304


[0056] Thus, the process described above with respect to FIG. 4 identifies changes made by a DML statement and populates transition tables 240-242 with such changes. The process enables such changes to be identified by scanning base table 210 with an insert marker and a delete marker.


[0057] A flowchart of an exemplary method for scanning base table 210 is shown in FIG. 5. Generally, the scan reads changes made as part of a different transaction and changes made as part of the same transaction occurring at or prior to the SEQ of the marker.


[0058] As shown in FIG. 5, at step 510, it is determined if the XID of the row is equal to the XID of the marker. If not, then, at step 516, the row is read. If so, then, at step 512, it is determined if the SEQ of the row is less than or equal to the SEQ of the marker. If so, then, at step 516, the row is read. If not, then, at step 514, the previous version of the row is retrieved from version store 220 and the method returns to step 510.


[0059] As discussed previously with respect to FIG. 4, after a row is read, it as added to the scan results and filtered with the rows stored in delta table 230. If a row that is read by the delete scan is also listed as a deletion in delta table 230, then the row will be stored in delete table 240. If a row that is read by the insert scan is also listed as an insertion in delta table 230, then the row will be stored in insert table 242. The tables discussed above with respect to FIGS. 4 and 5 may be stored in any storage device such as, for example, a memory or a database.


[0060] While the present invention has been described in connection with the preferred embodiments of the various figures, it is to be understood that other similar embodiments may be used or modifications and additions may be made to the described embodiment for performing the same function of the present invention without deviating therefrom. Therefore, the present invention should not be limited to any single embodiment, but rather should be construed in breadth and scope in accordance with the appended claims.


Claims
  • 1. A method for identifying rows deleted from a base table by a statement as part of a transaction, the method comprising: identifying a last row changed as part of the transaction prior to execution of the statement; setting a delete marker responsive to the last row; scanning the base table with the delete marker; and filtering the results of the scanning.
  • 2. The method of claim 1, wherein setting the delete marker responsive to the last row comprises: setting a transaction identifier of the delete marker to an identifier of the transaction; and setting a sequence number of the delete marker to a sequence number assigned to the last row.
  • 3. The method of claim 2, wherein scanning the base table with the delete marker comprises: (a) determining if the transaction identifier of the row is equal to the transaction identifier of the delete marker; (b) if so, then reading the row; (c) if not then: determining if the sequence number of the row is less than or equal to the sequence number of the delete marker; if so, reading the row; and if not then: retrieving a previous version of the row; and returning to step (a) and continuing processing with the previous version of the row.
  • 4. The method of claim 3, wherein retrieving the previous version of the row comprises retrieving a previous version of the row from the version store, the previous version identified in the version store by the transaction identifier and the sequence number of the row.
  • 5. The method of claim 1, further comprising populating a delete table with the filtered results.
  • 6. A method for identifying rows inserted into a base table by a statement as part of a transaction, the method comprising: identifying a last row changed as part of the transaction during execution of the statement; setting an insert marker responsive to the last row; scanning the base table with the insert marker; and filtering the results of the scanning;
  • 7. The method of claim 6, wherein setting the insert marker responsive to the last row comprises: setting a transaction identifier of the insert marker to an identifier of the transaction; and setting a sequence number of the insert marker to a sequence number assigned to the last row.
  • 8. The method of claim 7, wherein scanning the base table with the insert marker comprises: (a) determining if the transaction identifier of the row is equal to the transaction identifier of the insert marker; (b) if so, then reading the row; (c) if not then: determining if the sequence number of the row is less than or equal to the sequence number of the insert marker; if so, reading the row; and if not then: retrieving a previous version of the row; and returning to step (a) and continuing processing with the previous version of the row.
  • 9. The method of claim 8, wherein retrieving the previous version of the row comprises retrieving the previous version of the row from a version store, the previous version identified in the version store by the transaction identifier and the sequence number of the row.
  • 10. The method of claim 6, further comprising populating an insert table with the filtered results.
  • 11. A system for identifying rows deleted from a base table by a statement as part of a transaction, the system comprising: a data storage device for storing the base table, a version store, a delta table, and a delete table; a processor operative to execute computer executable instructions; and a memory having stored therein computer executable instructions for performing the following steps: identifying a last row changed as part of the transaction prior to execution of the statement; setting a delete marker responsive to the last row; scanning the base table with the delete marker; and filtering the results of the scanning.
  • 12. The system of claim 11, wherein the base table is for storing current versions of rows.
  • 13. The system of claim 11, wherein the version store is for storing previous versions of rows.
  • 14. The system of claim 11, wherein the delta table is for indicating rows deleted by the statement.
  • 15. The system of claim 11, wherein the delete table is for storing rows deleted by the statement.
  • 16. The system of claim 11, wherein the computer executable instructions for performing the step of setting the delete marker responsive to the last row comprise computer executable instructions for performing the following steps: setting a transaction identifier of the delete marker to an identifier of the transaction; and setting a sequence number of the delete marker to a sequence number assigned to the last row.
  • 17. The system of claim 16, wherein the computer executable instructions for performing the step of scanning the base table with the delete marker comprise computer executable instructions for performing the following steps: (a) determining if the transaction identifier of the row is equal to the transaction identifier of the delete marker; (b) if so, then reading the row; (c) if not then: determining if the sequence number of the row is less than or equal to the sequence number of the delete marker; if so, reading the row; and if not then: retrieving a previous version of the row; and returning to step (a) and continuing processing with the previous version of the row.
  • 18. The system of claim 17, wherein the previous version of the row is identified in the version store by the transaction identifier and the sequence number of the row.
  • 19. The system of claim 11, wherein the memory further comprises computer executable instructions for populating the delete table with the filtered results.
  • 20. A system for identifying rows inserted into a base table by a statement as part of a transaction, the system comprising: a data storage device for storing the base table, a version store, a delta table, and an insert table; a processor operative to execute computer executable instructions; and a memory having stored therein computer executable instructions for performing the following steps: identifying a last row changed as part of the transaction during execution of the statement; setting an insert marker responsive to the last row; scanning the base table with the insert marker; and filtering the results of the scanning.
  • 21. The system of claim 20, wherein the base table is for storing current versions of rows.
  • 22. The system of claim 20, wherein the version store is for storing previous versions of rows.
  • 23. The system of claim 20, wherein the delta table is for indicating rows inserted by the statement.
  • 24. The system of claim 20, wherein the insert table is for storing rows inserted by the statement.
  • 25. The system of claim 20, wherein the computer executable instructions for performing the step of setting the insert marker responsive to the last row comprise computer executable instructions for performing the following steps: setting a transaction identifier of the insert marker to an identifier of the transaction; and setting a sequence number of the insert marker to a sequence number assigned to the last row.
  • 26. The system of claim 25, wherein the computer executable instructions for performing the step of scanning the base table with the insert marker comprise computer executable instructions for performing the following steps: (a) determining if the transaction identifier of the row is equal to the transaction identifier of the insert marker; (b) if so, then reading the row; (c) if not then: determining if the sequence number of the row is less than or equal to the sequence number of the insert marker; if so, reading the row; and if not then: retrieving a previous version of the row; and returning to step (a) and continuing processing with the previous version of the row.
  • 27. The system of claim 26, wherein the previous version of the row is identified in the version store by the transaction identifier and the sequence number of the row.
  • 28. The system of claim 20, wherein the memory further comprises computer executable instructions for populating the insert table with the filtered results.
  • 29. A computer readable medium having stored thereon computer readable instructions for performing the following steps: identifying a last row changed as part of a transaction prior to execution of a statement; setting a delete marker responsive to the last row; scanning a base table with the delete marker; and filtering the results of the scanning.
  • 30. The computer readable medium of claim 29, wherein setting the delete marker responsive to the last row comprises: setting a transaction identifier of the delete marker to an identifier of the transaction; and setting a sequence number of the delete marker to a sequence number assigned to the last row.
  • 31. The computer readable medium of claim 30, wherein scanning the base table with the delete marker comprises: (a) determining if the transaction identifier of the row is equal to the transaction identifier of the delete marker; (b) if so, then reading the row; (c) if not then: determining if the sequence number of the row is less than or equal to the sequence number of the delete marker; if so, reading the row; and if not then: retrieving a previous version of the row; and returning to step (a) and continuing processing with the previous version of the row.
  • 32. The computer readable medium of claim 31, wherein retrieving the previous version of the row comprises retrieving a previous version of the row from the version store, the previous version identified in the version store by the transaction identifier and the sequence number of the row.
  • 33. The computer readable medium of claim 29, further comprising computer readable instructions for populating a delete table with the filtered results.
  • 34. A computer readable medium having stored thereon computer readable instructions for performing the following steps: identifying a last row changed as part of a transaction during execution of a statement; setting an insert marker responsive to the last row; scanning a base table with the insert marker; and filtering the results of the scanning;
  • 35. The computer readable medium of claim 34, wherein setting the insert marker responsive to the last row comprises: setting a transaction identifier of the insert marker to an identifier of the transaction; and setting a sequence number of the insert marker to a sequence number assigned to the last row.
  • 36. The computer readable medium of claim 35, wherein scanning the base table with the insert marker comprises: (a) determining if the transaction identifier of the row is equal to the transaction identifier of the insert marker; (b) if so, then reading the row; (c) if not then: determining if the sequence number of the row is less than or equal to the sequence number of the insert marker; if so, reading the row; and if not then: retrieving a previous version of the row; and returning to step (a) and continuing processing with the previous version of the row.
  • 37. The computer readable medium of claim 36, wherein retrieving the previous version of the row comprises retrieving the previous version of the row from a version store, the previous version identified in the version store by the transaction identifier and the sequence number of the row.
  • 38. The computer readable medium of claim 34, further comprising computer readable instructions for populating an insert table with the filtered results.