You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by co...@apache.org on 2007/10/27 06:57:00 UTC

[CONF] Apache Tuscany: RDB DAS CPP - PartialUpdate (page edited)

RDB DAS CPP - PartialUpdate (TUSCANY) edited by Adriano Crestani
      Page: http://cwiki.apache.org/confluence/display/TUSCANY/RDB+DAS+CPP+-+PartialUpdate
   Changes: http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=69449&originalVersion=1&revisedVersion=2






Content:
---------------------------------------------------------------------

h1. PartialUpdate

The RDB DAS uses the SDO Change Summary to generate a set of database write operations. Rather than generated a statement to update all columns in a table that maps to a SDO DataObject Type, the DAS generates statements that update ony those columns that map to a modified DataObject property. For example, consider a Customer DataObject that has had the LastName property changed. The *partial update* statement generated by the DAS will look something like this:
{noformat}
UPDATE CUSTOMER SET LASTNAME = 'Tuscany' WHERE ID = '1'
{noformat}
Rather than a statement that updates all columns like this:
{noformat}
UPDATE CUSTOMER SET FIRSTNAME = 'APACHE', SET LASTNAME = 'TUSCANY', SET ADDRESS = 'USA', SET PHONE = '555-5555', SET AGE = '7', SET SHOESIZE = '15' WHERE ID = '1'
{noformat}
There are a couple of very good reasons for using a partial update approach. For one, a performance boost can be realized by applications writing to wide tables. For example, tables with over 100 columns are not unheard of. It can be a huge waste of resource to update 100 columns when only one was modified. Another reason for partial update is that some databases employ [triggers|http://en.wikipedia.org/wiki/Database_trigger]on specific columns in a table. Partial updates are necessary when column triggers are employed to avoid tripping the trigger on every row update rather than only on updates to the specific column. 

---------------------------------------------------------------------
CONFLUENCE INFORMATION
This message is automatically generated by Confluence

Unsubscribe or edit your notifications preferences
   http://cwiki.apache.org/confluence/users/viewnotifications.action

If you think it was sent incorrectly contact one of the administrators
   http://cwiki.apache.org/confluence/administrators.action

If you want more information on Confluence, or have a bug to report see
   http://www.atlassian.com/software/confluence



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org