Ticker

6/recent/ticker-posts

Persistent Programming Languages, Persistence of Objects

 


Persistent Programming Languages

Programming languages that natively and seamlessly allow objects to existing after the program has been closed down are called persistent programming languages.

The only commercial product that appears to do this at the moment is JADE. But it is anticipated that persistent programming languages will more popular in the future

A persistent programming language is a programming language extended with constructs to handle persistent data. It distinguishes with embedded SQL in at least two ways: In a persistent program language. Query language is fully integrated with the host language and share the same type system. Any format changes required in databases are carried out transparently, Comparison with Embedded SQL where host and DML have different type systems, code conversion operates outside of 00 type system and hence has a higher chance of having undetected errors; and format Conversion takes a substantial amount of code.

Using Embedded SQL, a programmer is responsible writing explicit code 10 fetch data into memory or store data back to the database.

In a persistent program language, a programmer can manipulate persistent data Without having to write such code explicitly.

Persistent programming language systems are programming languages that offer persistent data management. Thus, if one is programming in and it is needed to manage not only transient data but also persistent, large, shared and secure data.

Then one can switch from a standard C++ compiler to a persistent C++ compiler. The system is clearly language dependent, since it appears as a compiler or a programming language environment

Persistence can be by reachability or by declaration.

If it is by declaration. The programmer declares that such and a type is persistent or not and data are created once and for all as persistent or not. Thus. Persistence is static. This means that copying is necessary to move from the persistent to the transient space.

 If it is by reachability. Certain roots define persistent data and all data reachable from these roots is persistent. This implies that data can be Made persistent or transient run time by attaching or detaching them From a persistent root. Thus persistent is dynamic

Persistence of Objects

Several approaches have been proposed to make the objects persistent.  

Persistence by Class: Declare class to be persistent, all objects of the class is then persistent objects. Simple. not flexible since it is often useful to have both transient and persistent objects in a single class. In many OODB systems, declaring a class to be persistent is interpreted as "persistable"— objects in the class potentially can be made persistent,

Persistence by Creation: Introduce new syntax to create persistent objects.

Persistence by Marking: Mark an Object persistent after it is created (and before the program terminates).

Persistence by Reference: One or more objects are explicitly declared as (root) persistent objects. All other Objects are persistent if they are referred. directly or indirectly. from a root persistent Object, It is easy to make the entire data Structure persistent by merely declaring the root of the structure as persistent. but is expensive to follow the chains in detection for a database system.

Drawbacks of Persistent Programming Languages

  1. powerful but easy to make programming errors that damage the database:
  2. Harder to do automatic high-level Optimization and
  3. Do not support declarative querying well.