How would you go about this?

Dale Strickland-Clark dale at out-think.NOSPAMco.uk
Thu Oct 19 14:49:26 EDT 2000


We're in the process of developing a database application in Python.

In fact, the Python part is only the middle tier and is a set of
objects used to generate Web pages.

What we've done so far (about half way through) works a treat but I'm
not satisfied.

SQL queries are generated on the fly based upon the users' selection
criteria. There are over thirty tables involved and the JOINs can get
pretty long. Although it works, the code for this isn't as tidy as I
would have liked and I'm convinced there is a much better approach.

I'm interested in hearing from anyone who has developed SQL-based
database applications in Python (or other OO language) which generate
dynamic queries. (Or who reckons they know about such things!)

1. What sort of objects did you employ?
2. How did you deal with needing to store lots of info about
individual fields (data type, formatting, validation, etc.) We're
using a dirty great dictionary containing tuples but it's unwieldy.

Also, if anyone knows any relevent reference material that I could
read, I'd be very interested in it - whether I buy it or download it.

Thanks for any help.

Dale Strickland-Clark
Out-Think Ltd
Business Technology Consultants





More information about the Python-list mailing list