Re: how to build a database from scratch
Date: 9 Dec 2006 09:33:26 -0800
Message-ID: <1165685606.800927.306240_at_n67g2000cwd.googlegroups.com>
DBMS_Plumber wrote:
> paul c wrote:
> > I knew one advanced product, eg., it had a predicate lock
> > manager long before any of the big-name dbms'es, that was designed to
> > eliminate dba's. Sales were abysmal, in part because dba's in big
> > corporations saw this as a big threat and did every thing they could to
> > keep the product out.
>
> Or, as is far more likely, your DBAs recognized that predicate locking
> schemes - which have a 30 years history of commercial and technical
> failure - simply cannot be used to enforce serializability over the
> following pair of queries.
That is not the reason System R style predicate locking is not used
today. The real reasons have been well known for about 25 years.
Since there has been no commercial System R p.l. implementation, there
has been no failure either.
>
> Q1:
>
> UPDATE Foo F
> FROM Bar B
> SET F.Val = 5
> WHERE B.X = :VALUE
> AND F.Y = B.Y;
>
> Q2:
>
> SELECT * FROM Foo F WHERE F.Y = 5;
>
> If you believe that you can, please explain how you can determine
> whether the predicates "F.Y = 5" and "F.Y = B.Y" collide?
It's easy. System R p.l. would have Pbar = true and Pfoo=true because
of the join so the intersection of rows defined by P(foo.y=5) and
(Pfoo or Pbar) would be non-empty thus preventing the update or select
depending on whichever comes last.
Besides, with your SQL, no p.l. is needed because 2P by itself is
enough to ensure Q1/Q2 serializability anyway.
> none of the big-name DBMSs use predicate based locking.
>
No.
> But so what? None of this has anything to do with how to implement
> B-Trees. Please keep to the topic.
Received on Sat Dec 09 2006 - 18:33:26 CET