Universität Stuttgart May 28, 20149 Ein Trigger E DECLARE NAMESPACE ns1 = ld:DataServices/CustomerProfileXML/CustomerProfile DECLARE NAMESPACE ns1 = ld:DataServices/CustomerOrderDB/CustomerOrder CREATE TRIGGER ReferentialConstraint ON DELETE OF ns1:CustomerProfile()/Profile/Customer LET $id := OLD_NODE/CustomerID FOR $co in ns2:CustomerOrder() WHEN $id = $co/CustID DO DELETE NODE $co DECLARE NAMESPACE ns1 = ld:DataServices/CustomerProfileXML/CustomerProfile DECLARE NAMESPACE ns1 = ld:DataServices/CustomerOrderDB/CustomerOrder CREATE TRIGGER ReferentialConstraint ON DELETE OF ns1:CustomerProfile()/Profile/Customer LET $id := OLD_NODE/CustomerID FOR $co in ns2:CustomerOrder() WHEN $id = $co/CustID DO DELETE NODE $co
{}