Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Permanent file store

A permanent file store implements most of the operations defined by the store abstract framework. Most importantly, streams in a permanent file store can be:

A permanent file store is useful for the type of application which treats the data in the store as its prime copy. Typically, the object network comprising the application’s data is structured so that sections of data can be loaded in, and, if changed, written back to the store. Memory is used as a workplace for changing data. Such an application never replaces the entire store. This approach requires a sophisticated structure and greater sophistication within the application.

Typically, a permanent file store is used by an application, such as a database, which maintains all its data in a file, but occasionally edits some entries in that database.

In this paradigm:

Such an application never replaces the entire store. The database file itself is permanent; it is not erased when an entry is saved. Because of this, much more care is needed when maintaining this type of store. All links within the database must be maintained without corruption, and no stream subnetworks in the database should become inaccessible, otherwise space is wasted. The order in which streams are written to a permanent file store is not important as streams can be changed and rewritten.

Overwriting an existing stream does not change its length. However, attempting to write beyond the end of the stream fails and results in a leave. Replacing a stream can result in a stream which is longer or shorter than the original.

Note the difference between a persistent store (one that can be closed and re-opened), and a permanent file store (it is not replaced wholesale; rather, its individual entries are edited, inserted and deleted, but the store itself is permanent). A permanent file store is, of course, persistent.

When the content of a permanent file store is naturally represented by a relational database, it is usually much more convenient to manipulate it using the relational database manager.

Permanent file stores are encapsulated by the CPermanentFileStore class.


See also

DBMS