In cases, when fields of two tables are bound by foreign key, and user enters identical meanings into bound fields during filling database, possibility appears to use XPath for reduction of bulky expressions, for example
с XPath | без XPath |
where a/b/c/d/@d3=k/l/m/n/@n2; |
where a.uk=b.fk and b.uk=c.fk and c.uk=d.fk and k.uk=l.fk and l.uk=m.fk and m.uk=n.fk and d.d3=n.n2; |
select d/e/f/@f3 from a/b/c where p/q/r/@r2=5; |
select f3 from a/b/c/d/e/f where ../../../p/q/r/@r2=5; |
insert into d/e/f/tab (fld) values (5); |
insert into a/b/c/@c1/d/e/f (fld) values (5); |
insert into a/b/c/@c1/d/e/tab values ('<tag>...</tag>'); |
update d/e/f/tab set @fld=5; |
update d/e/f/tab set @fld/p/q/r/@r1=5; |
update a/b/c/@c1/d/e/f set @fld=5; |
delete from a/b/c/n; |