Persistent and transient objects - confused about terminology

Viewed 26062

Here is my definition of the two terms, though I'm not sure if it is a complete one:

A persistent object is an instance of a class in the domain model that represents some information extracted from the database. A transient object is an instance of a class in the domain model, which is created in memory

a) I assume the terms persistent and transient are used only for objects in the domain model, but not also for objects in business layer that live outside the domain model?

b) Do we also use the two terms for Data-Transfer-Objects?

c) Are the two terms also used for Value Objects?

Thank you

3 Answers

An object typically has two components: state (value) and behavior (operations).It can have a complex data structure as well as specific operations defined by the programmer.9 Objects in an OOPL exist only during program execution; therefore, they are called transient objects. An OO database can extend the existence of objects so that they are stored permanently in a database, and hence the objects become persistent objects that exist beyond program termination and can be retrieved later and shared by other programs. In other words, OO databases store persistent objects permanently in secondary storage, and allow the sharing of these objects among multiple programs and applications.

Related