Patent ID: 7174353

Claim:
A method for preserving an original schema of a table comprising a plurality of rows, the method comprising: storing the original schema of the table in a designated table prior to performing a first schema change on the table, wherein the plurality of rows in the table are not self-describing prior to performance of the first schema change; performing the first schema change on the table to create a new schema for the table; defining each of one or more rows that are inserted into or updated in the table after performance of the first schema change using the new schema; making each of the one or more inserted or updated rows a self-describing row by storing metadata describing the new schema in the row; and rebuilding the table using a valid backup copy of the table, wherein, when a row of the valid backup copy is self-describing, metadata stored in the row is used to rebuild a corresponding row of the table, wherein, when the row of the valid backup copy is not self-describing, the original schema stored in the designated table is used to rebuild the corresponding row of the table, and wherein a backup copy of the table is valid when data in the backup copy is not corrupted or otherwise unsuitable for data recovery.