Subject Our MGA vs Oracle/InnoDb's
Author beru7
Hi,

I came across this while arguing the pros and cons of different
RBDMS's and was wondering why others chose to store the different
versions separately when firebird stores them right in the rows' pages.

http://dev.mysql.com/doc/refman/5.0/en/innodb-multi-versioning.html

Because InnoDB is a multi-versioned database, it must keep
information about old versions of rows in the tablespace. This
information is stored in a data structure called a rollback segment
(after an analogous data structure in Oracle).

Internally, InnoDB adds two fields to each row stored in the database.
A 6-byte field indicates the transaction identifier for the last
transaction that inserted or updated the row. Also, a deletion is
treated internally as an update where a special bit in the row is set
to mark it as deleted. Each row also contains a 7-byte field called
the roll pointer. The roll pointer points to an undo log record
written to the rollback segment. If the row was updated, the undo log
record contains the information necessary to rebuild the content of
the row before it was updated.

InnoDB uses the information in the rollback segment to perform the
undo operations needed in a transaction rollback. It also uses the
information to build earlier versions of a row for a consistent read.