Object Oriented Databases Persistence
Persistence: Persistence provides three main benefits. First, an application can stop and restart and retrieve the data that it needs to function. Second, an application can work with larger data sets than will fit in memory. Third, an application can share its data with other processes. This has traditionally meant the transfer of data from volatile memory to disk.
Some of today’s applications have little need for persistence, which is why there are “inmemory” database management systems. These applications generally have a relatively small amount of data, but need to be able to update and/or access it very quickly. Most DBMS applications, however, require some form of saving data to disk.
This section will discuss several ways persistence can be implemented, and then describe how Objectivity/DB persists data at length and in detail, since persistence has a large impact on how all the other database management features are implemented.
Let’s first think of how we would implement persistence if we didn’t have a database. One obvious way to save the data would be to simply write it to a file. As the Java language became popular, and with it the concept of object “serialization”, a concept developed that each object could simply write itself to disk and read itself back. Nothing seems simpler or more efficient.
There are two problems with this simplistic approach. The first is that the objects need to be found again, which requires some kind of query or navigational mechanism. This will be addressed in the “Retrieval / Query” section.
The second problem is that objects in memory often have references to other objects, which will become invalid as soon as the memory is released.
