The Problem: Persistent Objects - UML

Assume that in the NextGen application, ProductDescription data resides in a relational database. It must be brought into local memory during application use. Persistent objects are those that require persistent storage, such as ProductDescriptioninstances.

Storage Mechanisms and Persistent Objects

  • Object databases :- If an object database is used to store and retrieve objects, no additional custom or third - party persistence services are required. This is one of several attractions for its use. However, they are relatively rare.

  • Relational databases :- Because of the prevalence of RDBs, their use is often required, rather than the more 00 - natural object databases. If this is the case, a number of problems arise due to the mismatch between record - oriented and object - oriented representations of data; these problems are explored later. A special 0 - R mapping service is required.

  • Other :- In addition to RDBs, it is sometimes desirable to store objects in other storage mechanisms or formats, such as flat files, XML structures, Palm OS PDB files, hierarchical databases, and so on. As with relational databases, a representation mismatch exists between objects and these non - object - oriented formats. And as with RDBs, special services are required to make them work with objects.

The Solution: A Persistence Service from a Persistence Framework

A persistence framework is a general - purpose, reusable, and extendable set of types that provides functionality to support persistent objects. A persistence service (or subsystem) actually provides the service, and will be created with a persistence framework. A persistence service is usually written to work with RDBs, in which case it is also called an O - R mapping service. Typically, a persistence service must translate objects into records (or some other form of structured data such as XML) and save them in a database, and translate records into objects when retrieving from a database.

In terms of the layered architecture of the NextGen application, a persistence service is a subsystem within the technical services layer.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

UML Topics