Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Perl database interface should I use?

Tags:

perl

cpan

dbi

Is CPAN DBI the best database interface to use in Perl for general database use? Are there some better options?

like image 314
David Avatar asked Sep 03 '08 22:09

David


1 Answers

If you're just looking for low-level database access—you feed it any SQL string (optionally with place-holders and bind values) and it runs your query and gives you back the results—then yes, DBI is your best bet, by far.

If you want a higher-level interface (i.e., one that requires little or no use of raw SQL in your code) then there are several ORMs (object-relational mappers) available for Perl. Check out the ORM page at the Perl Foundation's Perl 5 wiki for more information and links. (If you want help choosing among them or have specific questions, you could narrow the focus of this question or perhaps post another one.)

like image 128
John Siracusa Avatar answered Sep 28 '22 06:09

John Siracusa