PEAR DB_DataObjects library
This library does essentially the same thing as you've described in this article. I've used it and although it's not perfect (i.e. bugs exist), it is a step in the right direction.
This is clearly the right way to develop web applications.
Re: Memory consumption
> The NVIDIA drivers seem to require a lot
> more memory
> than the (unaccelerated) XFree driver.
> Instead of
> 15-20 MB, X now uses about 220 MB RAM.
It's not true. The memory seems to be reported, but X isn't actually using this memory out of main RAM. It's the video card's RAM being mapped in. AFAIK, the entire video memory gets mapped in at least twice, hence the huge reported memory uage.
So it counts the video memory twice