|
Posted by Jim Carlock on 03/12/06 16:16
"NC" <nc@iname.com> posted:
> For more information, see here:
> http://phplens.com/lens/adodb/
> So you should avoid using abstraction layers whenever possible.
Hello, NC,
The link you provided might be confusing to some. It specifically
describes their own ADODB thing, and fails to differentiate that
from Microsoft ADODB (which may or may not be realized by
the reader which then makes the link kind of confusing).
Abstraction layers usually provide something easier to use than
the root methods involved in connecting to databases and querying.
Sometimes they only provide friendlier names and run the same
code (perhaps with some error handling), so the end result may
that the only difference involved is the time it takes to set up the
call, and the time it takes to debunk the call, which in many cases
is something that network connections might be the only purely
visible wait. What I mean, is that IF you extract ALOT of data,
the network connection might be so slow and the processor then
waits upon the network to conclude its delivery. Another thing
involves the hard disk access speed, whereby the processor waits
on the hard disk to deliver the items to memory, which then waits
for memory to deliver the items to the nic, which then waits for
the nic to deliver the items to the host. All in all, the end user never
sees the processor wait the extra micro-second and even if they do
start timing it, the network connections are going to represent the
biggest bottle-neck.
Whew. Now, one needs to ask what the purpose of an abstraction
layer is. What exactly is the purpose? Only one answer exists and it
has nothing to do with speed. It's to provide a COMMON set of
routines to access any type of data. It ends up as an ease of use
thing:
(1) Connect to the db,
(2) Read such and such record from the db,
(3) Perform ops on the record retrieved (inspect it, is it the one you
really wanted?/modify it/delete it/present it to the end-user).
(4) Finish up with the recordset, close it out.
(5) Do some more work with the same connection or close the
connection.
Your final statement, "So you should avoid using abstraction layers
whenever possible," sat awkward and lacked an explanation, so I
took it upon myself to provide the information for the OP and anyone
else reading the thread (as well as myself).
Jim Carlock
Pos replies to the group.
Navigation:
[Reply to this message]
|