IP Library › Granted Patent US 8,010,887
Granted Patent B2
US 8,010,887 · App. 09/960,769 · Granted Aug 30, 2011

Implementing versioning support for data using a two-table approach that maximizes database efficiency

Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,010,887
App. No.
09/960,769
Granted
Aug 30, 2011
Kind
B2
Abstract

A method, system, and storage medium for providing versioning of data by associating a version number having a value with a data item, establishing a table for storing a most recent version of the data item, establishing a second table for storing all versions of the data item other than the most recent version, storing the current version of the data item in the first table, storing all other versions of the data item in the second table, and determining the version of said database data item based on the version number and storage location of the database data item.

Claims (53)

1. A method for supporting versioning of data in a content management system, said method comprising:

maintaining a first table, by a computer, to store an identifier of a most recent version of a data item; and

maintaining a second table, by said computer, to store an identifier of an older version of said data item,

wherein, when said data item is to be updated,

(i) said second table is updated to include said identifier of said most recent version of said data from said first table, so that said second table stores both of said identifier of said older version of said data item and said identifier of said most recent version of said data item, and

(ii) said first table is updated to store an identifier of a new version of said data item,

wherein a request for a version number zero (0) of said data item as part of a query, a retrieve operation, or an update operation is interpreted as a request for said data item in accordance with said identifier of said new version of said data item in said first table, and

wherein a request for a version number zero (0) of said data item as part of a delete operation is interpreted as a request for said data item in accordance with an identifier of an oldest version of said data item in said second table.

2. The method of claim 1 , further comprising associating different version numbers with different versions of said data item.

3. The method of claim 2 , wherein each of said different versions is associated with a (version number−1) value.

4. The method of claim 3 , further comprising generating said (version number−1) value for successive versions of said data item by incrementing said (version number−1) value from zero (0) to n, wherein n is an integer.

5. The method of claim 2 , further comprising generating a value for successive versions of said data item by incrementing said version number from zero (0) to m, wherein m is an integer.

6. The method of claim 1 , wherein a version number having a value of zero (0) is associated with said most recent version of said data item or an oldest version of said data item, depending on a context of use for said version number.

7. The method of claim 1 , wherein a first instance of a version of said data item is stored in said first table.

8. The method of claim 1 , further comprising performing a query on said first table and said second table, wherein a column attribute of a column selected by said query is retained in a result of said query.

9. The method of claim 8 , wherein said query invokes a union operation.

10. The method of claim 8 , wherein said column attribute is obtained from a sequential query language description area (SQLDA) of said query result.

11. The method of claim 1 , wherein said second table stores identifiers of more than two older versions of said data item.

12. A system for supporting versioning of data in a content management system, said system comprising:

a memory;

a module that maintains (a) a first table to store an identifier of a most recent version of a data item in said memory, and (b) a second table to store an identifier of an older version of said data item in said memory,

wherein, when said data item is to be updated,

(i) said second table is updated to include said identifier of said most recent version of said data from said first table, so that said second table stores both of said identifier of said older version of said data item and said identifier of said most recent version of said data item, and

(ii) said first table is updated to store an identifier of a new version of said data item, and

wherein a request for a version number zero (0) of said data item as part of a query, a retrieve operation, or an update operation is interpreted as a request for said data item in accordance with said identifier of said new version of said data item in said first table, and

wherein a request for a version number zero (0) of said data item as part of a delete operation is interpreted as a request for said data item in accordance with an identifier of an oldest version of said data item in said second table.

13. The system of claim 12 , further comprising a module that associates different version numbers with different versions of said data item.

14. The system of claim 13 , wherein each of said different versions is associated with a (version number−1) value.

15. The system of claim 14 , further comprising a module that generates said (version number−1) value for successive versions of said data item by incrementing said (version number−1) value from zero (0) to n, wherein n is an integer.

16. The system of claim 13 , further comprising a module that generates a value for successive versions of said data item by incrementing said version number from zero (0) to m, wherein m is an integer.

17. The system of claim 12 , wherein a version number having a value of zero (0) is associated with said most recent version of said data item or an oldest version of said data item, depending on a context of use for said version number.

18. The system of claim 12 , wherein a first instance of a version of said data item is stored in said first table.

19. The system of claim 18 , wherein a column attribute of a column selected by a query performed on said first table and said second table is retained in a result of said query.

20. The system of claim 19 , wherein said query invokes a union operation.

21. The system of claim 19 , wherein said column attribute is obtained from a sequential query language description area (SQLDA) of said query result.

22. The system of claim 12 , wherein said second table stores identifiers of more than two older versions of said data item.

23. A storage medium having computer readable program instructions embodied therein for supporting versioning of data in a content management system, which when executed implements actions of:

maintaining a first table to store an identifier of a most recent version of a data item;

maintaining a second table to store an identifier of an older version of said data item; and

performing an operation, wherein, when said data item is to be updated,

(i) said second table is updated to include said identifier of said most recent version of said data from said first table, so that said second table stores both of said identifier of said older version of said data item and said identifier of said most recent version of said data item, and

(ii) said first table is updated to store an identifier of a new version of said data item, and

wherein a request for a version number zero (0) of said data item as part of a query, a retrieve operation, or an update operation is interpreted as a request for said data item in accordance with said identifier of said new version of said data item in said first table, and

wherein a request for a version number zero (0) of said data item as part of a delete operation is interpreted as a request for said data item in accordance with an identifier of an oldest version of said data item in said second table.

24. The storage medium of claim 23 , further comprising program instructions for associating different version numbers with different versions of said data item.

25. The storage medium of claim 24 , comprising program instructions for associating each of said different versions with a (version number−1) value.

26. The storage medium of claim 25 , comprising program instructions for generating said (version number−1) value for successive versions of said data item by incrementing said (version number−1) value from zero (0) to n, wherein n is an integer.

27. The storage medium of claim 24 , comprising program instructions for generating a value for successive versions of said data item by incrementing said version number from zero (0) to m, wherein m is an integer.

28. The storage medium of claim 23 , comprising program instructions for associating a version number having a value of zero (0) with said most recent version of said stored data item or an oldest version of said stored data item, depending on a context of use for said version number.

29. The storage medium of claim 23 , comprising program instructions for retaining a column attribute of a column selected by a query performed on said first table and said second table.

30. The storage medium of claim 29 , wherein said query invokes a union operation.

31. The method of claim 29 , wherein said column attribute is obtained from a sequential query language description area (SQLDA) of said query result.

32. The storage medium of claim 23 , wherein said second table stores identifiers of more than two older versions of said data item.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 18, 2001
From: SORIA, JR., STEVEN; WEIL, DONALD ALLEN; KOZINA, GERALD EDWARD; CHIANG, CHENHUEI J.; HANSEN, LYNDA ARNOLD; SHAH, MAYANK VIPIN; LEE, THOMAS S.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 012380/0478 →
Continuity (1)
Related Publication 20030061245A1 · Mar 27, 2003