1

A database application of mine, written in Perl — using Moose and DBI and communicating with the DB server with plain SQL statements —, has got to the point where it needs a complete rewrite from scratch. This looks like a great opportunity to learn ORM. But I am at loss about which ORM system to choose. As my bread-and-butter languages are Perl and Python, I have looked at systems that seem to be the major ones in each of them — DBIx::Class and SQLAlchemy. But as both of them require quite a bit of learning, it is hard to choose in advance which one to invest my time and energy into, or whether to consider some other ORM system (Rose::DB::Object, Fey::ORM, Django ORM, SQLObject, Storm, …) instead.

Therefore I am asking people who have written ORM in both Perl and Python: what are the pros and cons of particular ORM systems in these languages? And, which one of them is, in the answerer's personal opinion and according to his/her personal experience, most fun to write in (after one has mastered it), and why?

Additional considerations:

I am equally comfortable and in love with both Perl and Python, so the choice of programming language is in itself not an issue;

as I have a pre-existing database, I am not interested in using ORM to manage databases;

I am writing for my own pleasure and do not care much about what's hot in the market;

I am not easily intimidated by steep learning curves.

(To my surprise, the Web has almost nothing helpful to say on the subject; about the only relevant statement I found was this: "DBIx::Class is not only the best Perl ORM I've used, but also one of the best ORMs in any language. It might not be the fastest or lightest ORM, but it's definitely the one with the most intelligent and flexible API" (Tobias Kremer). But this was written in 2009…)

1
  • I have no products or open-source projects to recommend. Still, I do not understand what your use-cases are, and what is important to you: For instance (1) support for nested in-memory objects that get mapped to SQL tables somehow. (2) Standard-conforming SQL being generated, e.g. with CTEs, indexes. (3) Smart caching, High performance. (4) Expressive query constructs in the Perl/Python API. (5) Flexibility, e.g. change queries and query options after they have been created... --- Take a look at DBplyr, although it's R. – knb Mar 7 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.