A METHOD FOR OPTIMIZING MEMORY SPACE IN A DATA BASE

Abstract: When storing backup data in a primary memory, the memory space is optimized by storing only the same versions of objects in a storage location in the primary memory, and by implementing the data base to enable accessing of objects in a backup area (4). More specifically, only objects which have not been updated since the latest backup are stored in the backup area (4) of the primary memory, and only updated objects are stored in the data-base area (2). The backup area is write-protected.

Description: A Method for Optimizing Memory Space in a Data Base Technical Field The present invention relates to a method for storing backup data in a primary memory. Primary memory backup involves freezing all data in the data base at a given time point and when all objects are in a consistent state. Such backup can be effected in many different ways, depending on availability requirements and error tolerance properties. If the data base is comprised of an error tolerant computer equipped with a duplicated memory, backup and log can be stored in the primary memory of one and the same computer. If the computer is not error tolerant and must therefore be switched-off in the event of error, backup and log can be stored in two redundant computers. A data base normally has a recovery function which is responsible for the data stored in the data base being consistent, i.e. exhibits a state which is to be expected with regard to different updatings. In order to be able to recover from errors that write- corrupt the data base, it is necessary to store a backup version. A backup contains all information that is required to be able to recreate the data base to the same consistent state that prevailed at the time of creating the backup version. Recreation of the data base to the relevant state requires information from the log. A typical strategy for recovering a data base can be summarized as follows: If the data base has become inconsistent as a result of the occurrence of a catastrophic error, the recovery function orders a restart by reloading the data base into the latest backup version. In order to enable a return to be made to a more relevant state, the data base is then updated with the information stored in a log, i.e. a history of earlier opera¬ tions stored in a memory, this log being used by the recovery function to repeat latest accepted transactions, i.e. processing of objects in the data base. The term object is intended here to have the meaning conventional within data processing technology. Very briefly, an object is an information packet with an associated description of how its information shall be managed. The objects are divided into classes according to their area of use and are identified by object identities. For a more detailed description of the term object and the manner in which it is used, reference is made, for instance, to "OBJECT-ORIENTED ANALYSIS" by Peter Coad and Edward Yourdon, Yourdon Press Computing Series. When updating an object, a copy of the original object is created and a lock is introduced in order to prevent other users from updating the data base. The updated copy is not switched-in and the set locks are not released until commitment is performed, by which is meant the transaction operation used by a program or operator to indicate that a current transaction has been finalized and that its effects shall remain. Copy objects or objects that shall not be subjected to backup are removed when restarting the data base with reloading. Prior Art High requirements on availability can be satisfied by storing the latest version of backup and log in a primary memory of a computer. A backup archive is used to store older backup versions. As a result of the rapid development in memory tech¬ nology, it is now possible to acquire large primary memory data bases at a reasonable cost. When the need to store large quantities of data in a data base occurs, however, it is nevertheless important to save on memory space. Backups and logs which lie in the same computer as the data base may at least triple the memory requirement, for instance. Known primary memory backup solutions are generally based on the concept that all objects in the data base shall be found both in the data base area and in the backup area. This also applies to those objects which have not been changed between the backup occasions. It is known from WO 84/00426 to store different relation versions in different data base locations. It is conceivable to define the different relations as different objects. There are also access blocks which define the data base locations and point thereto. When updating, a new access block is used to store a new relation version (object) in a new data base location. Thus, although an access structure is used in backup, this does not involve collected reloading of the data base with the use of the entire access structure copied from a backup area to the data base area for updating the data base area with those changes stored in a log. Updating or recovery of data is also known from EP 444,544. In this case, pointers are used to point-out different data domains. The pointers are used when updating. Thus, this publication is concerned with the use of an access structure for transferring indicated objects for updating, but is not concerned with the transfer of the access structure from a backup area to a data base area for updating the data base area with changes that are stored in a log. Disclosure of the Invention An object of the present invention is to provide a method of the kind defined in the introduction with which use of a primary memory in the data base is optimized. This is achieved in accordance with the present invention by storing the same versions of objects solely in one location in the primary memory, by storing in a backup area of the primary memory only objects which have not been updat¬ ed since the latest backup, and storing only updated objects in a data base area, copying only the access structure from the backup area to the data base area when reloading the data base, and implementing the data base to be able to access objects in a backup area. Brief Description of the Drawings The invention will now be described in more detail with reference to the attached drawings, in which Figure 1 illustrates schematically a known solution for primary memory backup; Figure 2 illustrates schematically in a similar manner to Figure 1 the principle of the inventive solution. Figure 1, which is intended to show a known solution, is divided into two sections 2 and 4 which represent schematically a data-base area and a backup area, respectively, in the primary memory of a computer. Associated with each area there is a respective catalogue 6 and 8 which contains a list of objects with associated class and key. By means of a pointer 10 and 12, respectively, and with knowledge of an associated class and key, objects to be subjected to an operation are chosen. Each catalogue is shown to include four objects A, B, C, D by way of example. Those objects which have been updated since the latest backup have been identified in the Figure with prime signs. The objects A and C have been updated to A' and C since the latest backup. The objects B and D have not been updated. Figure 1 illustrates the characteristic feature of the known solution, namely that the data-base area 2 and the backup area 4 together contain duplicated copies of all objects, even those objects that have not been changed between two backup occasions. Description of Preferred Embodiments Those elements in Figure 2 that find correspondence in Figure 1 have been identified by the same reference signs. The Figure illustrates the features characteristic of the present invention, namely that the same versions of objects are stored solely in one location in the primary memory; and that the data base is implemented for accessing objects in the backup area. Different versions of objects are thus stored in different locations in the primary memory. In the case of the preferred embodiment, only those objects which have been updated since the latest backup are stored in the data-base area 2, whereas only non-updated objects are stored in the backup area 4. The data base is changed to point-out those objects in the backup area 4 that are write-protected, but permits readout of data. More specifically, only the updated objects A' and C are stored in the data-base area 2, whereas the objects A, B, C and D are stored in the backup area 4, and the data base is changed to point-out the objects B and D in the backup area 4, as indicated by arrows 14 and 16 respectively. The invention affords a number of important advantages. Because only objects that have been changed since the time of backup are stored in the data-base area, a saving in memory space is gained which, in turn, results in lower computer manufacturing costs. When reloading, a performance gain is obtained without the backup being lost as a result of all changed objects being stored in the data-base area. The objects are erased in the data-base areas and only the access structure is copied from the backup area to the data-base area and the log is read. Write-protection of backup is possible.

Claims: Claims 1. A method for storing backup data in a primary memory, c h a r a c t e r i z e d by storing the same versions of objects solely in one location in the primary memory, by storing in a backup area of the primary memory only objects which have not been updat¬ ed since the latest backup, and storing only updated objects in a data base area, copying only the access structure from the backup area to the data base area when reloading the data base, and implementing the data base to be able to access objects in a backup area. 2. A method according to Claim 1, c h a r a c t e r i z e d by the backup area being write- protected. 3. A method according to Claim 1 or 2, c h a r a c t e r i z e d by updating the data-base area with changes stored in a log.

Inventors: LARSSON BO ERIK STEFAN, SANCHEZ IVAN MARIA, LARSSON, BO, ERIK, STEFAN, SANCHEZ, IVAN, MARIA
Applicants: ERICSSON TELEFON AB L M, TELEFONAKTIEBOLAGET L M ERICSSON
Application year: 1993
Main classification: G06F15
IPC codes: G06F11, G06F12, G06F17