Just another Perl shrine | |
PerlMonks |
Re: ODBC vs DBIby merlyn (Sage) |
on May 02, 2001 at 23:30 UTC ( [id://77477]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|