<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="120" MadCap:lastWidth="624" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Basics Operations & Concepts|Update Concept" MadCap:InPreviewMode="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="index.xml" MadCap:SearchType="Stem"> <head><title>Transparent Persistence </title> <script type="text/javascript">/* <![CDATA[ */ window.onload = function(){ var pathToFlash = $('html').attr('MadCap:PathToHelpSystem') + 'Content/Resources/Code/ZeroClipboard.swf'; ZeroClipboard.setMoviePath(pathToFlash); function bindToClipBord(element,content){ var clip = new ZeroClipboard.Client(); clip.setText(content); clip.glue(element); }; if(location.protocol==='file:'){ $('.copylink-marker').remove(); } else{ $('.copylink-marker').each(function(){ var text = $(this).parent().parent().children('.prettyprint').html(); $(this).hover(function(){ bindToClipBord(this,text); }, function(){}); }); } prettyPrint(); }; /* ]]> */</script> <link href="../../SkinSupport/MadCap.css" rel="stylesheet" /> <link href="../../Resources/Stylesheets/OnlineStyle.css" rel="stylesheet" /> <script src="../../Resources/Code/prettify.js"> </script> <script src="../../Resources/Code/lang-vb.js"> </script> <script src="../../Resources/Code/jquery.min.js"> </script> <script src="../../Resources/Code/ZeroClipboard.js"> </script> <script src="../../SkinSupport/MadCapAll.js" type="text/javascript"> </script> </head> <body> <p class="MCWebHelpFramesetLink" style="display: none;"><a href="../../../index_CSH.html#basics/update_concept/transparent_persistence.htm" style="">Open topic with navigation</a> </p> <div class="MCBreadcrumbsBox"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="../../basics.htm">Basics Operations & Concepts</a><span class="MCBreadcrumbsDivider"> > </span><a class="MCBreadcrumbsLink" href="../update_concept.htm">Update Concept</a><span class="MCBreadcrumbsDivider"> > </span><span class="MCBreadcrumbs">Transparent Persistence </span> </div> <p> <script type="text/javascript">/*<![CDATA[*/document.write('<a href="' + location.href +'">'); document.write("Direct Link"); document.write('</a>');/*]]>*/</script> </p> <p> </p> <h1><a name="kanchor30"></a><a name="kanchor31"></a>Transparent Persistence</h1> <p>One of db4o's goals is to make the database transparent to the application logic. Wouldn't it be nice to initially register an object with a single store()-call and then let the database manage all future object modifications? Transparent Persistence does exactly that.It keeps track of changes and stores all modified objects automatically when committing. </p> <p>This has several benefits:</p> <ul> <li value="1">Clean an refactorable code. The code doesn't depend on the right activation-depth. </li> <li value="2">Performance-benefits. Only the objects which are needed are loaded into memory. And only modified objects are stored.</li> <li value="3">No changes can be lost due to miss configured update-depth.</li> </ul> <p>Transparent persistence takes care of activating the objects and storing changes. Take a look a simple example. <a href="transparent_persistence/transparent_persistence_example.htm" target="" title="" alt="" class="MCXref">See "Transparent Persistence Example"</a></p> <p>In order to support transparent persistence the persisted object need to implement certain interfaces. To manually implementing this interface is time consuming. Therefore it can be automated with enhancement tools. <a href="transparent_persistence/tp_enhanced_example.htm" target="" title="" alt="" class="MCXref">See "TP Enhancement"</a></p> <p>When using Transparent Persistence collections might need special attention. <a href="transparent_persistence/collection_example.htm" target="" title="" alt="" class="MCXref">See "Transparent Persistence Collections"</a></p> <p>For a deeper understanding of the mechanism: <a href="transparent_persistence/transparent_persistence_implementation.htm" target="" title="" alt="" class="MCXref">See "Transparent Persistence Implementation"</a></p> <p> </p> <script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js"> </script> </body> </html>