Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: ODBC vs DBI

by merlyn (Sage)
on May 02, 2001 at 23:30 UTC ( #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? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2022-09-30 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (125 votes). Check out past polls.

    Notices?