| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> thinking about UPDATE
Hi all,
I was thinking about the relationship between operations of the relational algebra and SQL statements.
INSERT is a lot like union, but with an odd restriction that the intersection of the new set and the existing set must be empty. (Why?) DELETE is the same thing as set subtraction.
But what the heck is UPDATE?
If T : {a1, a2, ... an}
UPDATE T set a1 = 0 where <cond>
is
T' = T { 0, a2, ... an | <cond> }
T = T - T { a1, a2, ... an | <cond> }
T = T union T'
That's certainly more complicated than I would suspect for what seems like such a simple operation.
Am I making it needlessly complex, or is this about right? Is there some other way to think about UPDATE?
Marshall Received on Tue Jul 20 2004 - 23:10:22 CDT
![]() |
![]() |