From 200a40b332420f94992eb39a6d0ea1cf1490ffc4 Mon Sep 17 00:00:00 2001 From: coreyg Date: Fri, 21 Nov 2014 09:30:19 +0000 Subject: Adding tuscany's website to their svn repo for svnpubsub git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1640879 13f79535-47bb-0310-9956-ffa450edef68 --- .../rdb-das-cpp-writeoperationordering.html | 121 +++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 site/trunk/site-publish/rdb-das-cpp-writeoperationordering.html (limited to 'site/trunk/site-publish/rdb-das-cpp-writeoperationordering.html') diff --git a/site/trunk/site-publish/rdb-das-cpp-writeoperationordering.html b/site/trunk/site-publish/rdb-das-cpp-writeoperationordering.html new file mode 100644 index 0000000000..a9db00817d --- /dev/null +++ b/site/trunk/site-publish/rdb-das-cpp-writeoperationordering.html @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + Apache Tuscany : RDB DAS CPP - WriteOperationOrdering + + + + + + + + + + + + + + + +
+ + + + +   + +
+ + +
+
+ + + + + + + + + +
+  Apache Tuscany > Home > DAS Overview > DAS C++ > DAS C++ Documentation Menu > RDB DAS C++ - User Guide > RDB DAS CPP - WriteOperationOrdering + + User List | Dev List | Issue Tracker   +
+ + + + + + + +
+ + +
+ +
+
+

 WriteOperationOrdering

+ +

Relational databases often use Referential Integrity (RI)constraints to maintain database consistency. When RI is enabled, database operations must be performed in a specific order that prevents invalid references. If this order is not adhered to then the database will throw an exception rather than let the write succeed.

+ +

When an application makes modifications to a data graph and then asks the RDB DAS to "apply changes", the DAS will create a "batch" of database writes that must be sorted and then executed in the correct order to avoid RI Constraint exceptions. A simple example will help here. Assume a database with two tables CUSTOMER and ORDER. Also assume that the ORDER table has a foreign keyreference to the CUSTOMER table. Now assume that the application has made modifications to a data graph that was retrieved by the DAS using a SELECT statement like the following:

+
+
SELECT * FROM CUSTOMER LEFT JOIN ORDER ON CUSTOMER.ID = ORDER.CUSTOMER_ID WHERE CUSTOMER.NAME = 'Tuscany'
+
+
+

The resulting data graph will contain all matching customers as well as their related orders. Now assume the application uses the SDO API's to delete some customer from the graph and then also deletes the related orders. Although the application deleted the customer first, the DAS must delete the orders first from the database since deleting the customer, with existing referencing orders, would violate the RI constraints and result in an exception.

+
+
+
+ + +
+ + + + + + website stats + + + + + + -- cgit v1.2.3