Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: ODBC vs DBI

by merlyn (Sage)
on May 02, 2001 at 23:30 UTC ( [id://77477]=note: print w/replies, xml ) Need Help??


in reply to ODBC vs DBI

I think you're mixing up layers.

DBI is the interface your Perl program uses to the high-level database routines. Those routines in turn call the low-level backend routines that are database specific.

One of these backend routines is ODBC, which itself is an indirection layer to let many databases have a similar API.

So it'd go yourcode -to- DBI -to- DBD::ODBC -to- random back end

Sure, you can certainly talk directly to ODBC, but then you'd lose the option to go with a non-ODBC backend by changing just a few lines of code, such as mysql via: yourcode -to- DBI -to- DBD::mysql -to- mysql API.

So, ODBC doesn't replace DBI. DBI doesn't replace ODBC. They're indirections at different levels.

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://77477]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 04:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found