Persistence (computer science)

Persistence is in computer science the term that refers to the ability to transfer data (or objects) or logical connections over a long time ( especially over a program abort addition ) to keep. For a non-volatile storage medium is required; the file system or a database and a secured through bidirectional protocols and transaction- oriented data transmission can be considered as non-volatile medium.

Moreover, the term is used in conjunction with unique and permanent identifiers of digital objects, see PURL, DOI, URN.

"Persistent " is " uncontrolled variable " is used as a well-defined in the context of technical term for. This means for example that the data even after exiting the program ( possibly also in case of accidental exit, eg power failure ) available ( stored) remain, and can be reconstructed and displayed again when reopening the program. Bzgl. the logical connections Persistence means that the real connection is restored when needed / after a failure without the intermediate separation is noticed by the communication partner.

Data that does not have this property, there are for example only in your computer's memory and change or lose their contents when the program ends, from which they were created. Such " volatile " data are called transient, they are buffered.

Under a persistent connection is an ongoing, persistent connection to understand survived the brief interruptions, without changing its information content.

Persistence in object-oriented programs

There are frameworks that automatically ensure that when they registered objects are stored persistently on a durable storage medium, known Persistenzprovider.

There are open source Persistenzprovider (eg Hibernate ), typically offer the creator of a database implementations for Persistenzprovider to. They offer a uniform interface for various persistent storage media ( file system, RDBMS, Directory Service, B2B service, etc. ). Various design patterns such as " Data Access Object " support in this respect a good software design.

These frameworks assume usually that the objects are either serializable or object relational mapped. During serialization, the object can be written as a serial data stream into a persistent storage medium (eg "Java I / O Streams" ). The other possibility is the object- relational mapping (object - relational mapping ).

Accountability in existing runtime environment

Within an application server, a distinction is made between container -based persistence ( the runtime environment handles the saving and restoring ) and component-based persistence ( the component must save himself and restore ). In the example, the Java Enterprise Java Beans ( EJBs) would be responsible for container -based persistence. It must be 5 each for persistent class with the @ Entity annotation will be awarded from Java Platform, Enterprise Edition.

642487
de