How to Handle Persistent Objects?
Almost all software systems require object persistence. In
many cases, users generate objects they expect to reload later.
Also, the system stores environmental objects that need
to be saved and restored.
There are a variety of ways to handle persistent object storage:
- Data Base Management Systems
DBMS are an excellent solution if your data model is complex;
many designers use a DBMS unnecessarily and cause their users
stress. For simple data models, consider a Flat File system which
puts all the records in a single table.
- Text/Binary Files
Files don't have a record structure; the structure
is implied in the code. Files are popular because the software
is inexpensive and the performance is good for some types of applications.
- Access Methods
This is a fancy word for file systems that support a record
structure. Wintel and Unix machines don't have access methods; IBM
machines do.
- Streamable objects saved externally
The program explicitly manages object storage and retrieval, usually
to a flat file system.
- Persistent classes
The class manages its own file structure allowing the program to
save and restore objects from disk. This is the proscribed method in CSC 205;
design your software so all persistent data is handled by the appropriate
classes.
- Distributed Objects
Many software systems are being written on a distributed, heterogeneous
platform. Such systems need a standard way to store and retrieve objects.
The Object Management Group (OMG) has specificed an architecture (CORBA) for
managing and storing objects in a distributed environment. Microsoft
has created their own standard for distributed objects (COM).
Last updated on 11/5/98