views:

138

answers:

2

I know the mismatch between Object Oriented Technology and the Relational Technology, generally here.

But I do not know the mismatch between MySQL and Python, and other tools, not just ORMs, to deal with the issue, missing in the latter article.

Questions:

  1. How is the problem dealt between MySQL and Python?
  2. Does App Engine's non-SQL makes Python work better together?
  3. Are there some general tools, perhaps ORM, to deal with mismatches?
  4. What are non-standard ways to deal with the problem?
  5. Could you say that the nonSQL is a tool to make the object-oriented world of Python match the Relational world? Or does the new design totally avoid the problem?
+3  A: 

ORM is the standard solution for making the object-oriented world of Python match the Relational world of MySQL.

There are at least 3 popular ORM components.

S.Lott
+1 for the links. I knew only the first one.
Masi
+1  A: 

As was once said on comp.lang.python ORM's are like morphine -- it can save you pain if you are really hurting, but if you use it regularly you will end up with really big problems.

It's not hard to build relatively low level interfaces between a relational database and an object model. It's extremely hard to migrate an automated ORM mapping to a new design after the fact. Only immature programmers try to simplify things that are not hard without looking ahead to the possible consequences that are extremely hard.

The google app engine mini-rdb-with-some-restrictions-removed is nice because it only automates extremely simple stuff and forces you to think about the table layout without pretending that it can all be done automatically.

Aaron Watters
+1 very good point and great thanks for mentioning comp.lang.python. Have to look more there.
Masi