what does Object persistence
mean in c++?
Can you explain it with an example or provide links to where i could find the answer?
Thank you.
In a nutshell, object/relational mapping is the automated (and transparent) persistence of objects in a Java application to the tables in an SQL database, using metadata that describes the mapping between the classes of the application and the schema of the SQL database.
There are many ways of implementing Object-Persistence among which Gateway-based method, Object-Relational database method and Object-Oriented database method are the three major categories.
example breafly. 0. A persistent object is an object that has been assigned a storage location in a federated database. When you commit the transaction in which you create a persistent object, that object's data is saved in the database; the object can then be accessed by other processes.
Most objects cease to exist when they go out of scope. This may be when the function in which they were created terminates. It may be when the container in which they reside is deleted. At any rate, they can be expected to disappear when the program exits. Persistent objects are those which survive between successive invocations of the program. A classic example of such an object is a database record.
check out the following links:
C++ object persistence library similar to eternity
http://sourceforge.net/projects/litesql/
http://www.codesynthesis.com/products/odb/doc/manual.xhtml
http://en.wikipedia.org/wiki/ODB_(C%2B%2B)
http://drdobbs.com/cpp/184408893
http://tools.devshed.com/c/a/Web-Development/C-Programming-Persistence/
C++ doesn't support persistence directly (there are proposals for adding persistence and reflection to C++ in the future). Persistence support is not as trivial as it may seem at first. The size and memory layout of the same object may vary from one platform to another. Different byte ordering, or endian-ness, complicate matters even further. To make an object persistent, we have to reserve its state in a non-volatile storage device. ie: Write a persistent object to retain its state outside the scope of the program in which it was created.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With