Re: Clean Object Class Design -- What is it?

From: Bob Badour <bbadour_at_golden.net>
Date: 10 Jul 2001 16:58:30 -0700
Message-ID: <cd3b3cf.0107101558.d06e273_at_posting.google.com>


> To be honest, I cannot see that. For example, the value-returning
> set expression
>
> S = S difference {x}
>
> could be enormously inefficient. Suppose the set contains 20,000
> elements, none of which is x?

What you think the optimizer is for? These are logical operations not physical operations; the optimizer translates them into physical operations. The DBMS does not need to perform a copy in this case at all.

Even when the user actually wants a copy of the entire relation, the DBMS does not have to perform the copy immediately and may never need to.

y = restrict(x,name != "Bob")
z = project(y, {name})
t = restrict(z, name = "Doug")

display t

The DBMS does not need to realize any result until the user requests that it display t. At that point, the DBMS only needs to determine whether any row in x exists where the name is "Doug". It either displays one row with name="Doug" or it displays zero rows.

name



Doug

1 row(s)

or

name




0 row(s) Received on Wed Jul 11 2001 - 01:58:30 CEST

Original text of this message