Relational Databases and Python

Thomas A. Bryan tbryan at python.net
Tue Jan 16 00:02:19 EST 2001


glinds - Greg Lindstrom wrote:

> I am wanting to access a relational database via Python.  Knowing that a
> "simple" query such as "Why no "do until" statement" can generate replies
> for months, I offer the following:
> 
> *       What relational database to use?  I am constructing a routine to
> track incident reports for the volunteer fire department I run with.  I also
> want to track personnel information, training records, equipment, etc.  It
> will be a small to medium database (the databases I work with professionally
> run in the terabytes, but we spend millions on software).  I am looking at
> MySQL.  Whatever base I use must be free.

I join the other poster in voting for PostgreSQL.

> *       How to access the database?  I would like to use SQL via ODBC.  I
> have attempted to install the mxODBC module, but have run into trouble with
> the first step (get and install mxDateTime).  That's not a good sign.  I
> would like a simple communication to the  database (else I will write a "C"
> routine to do it for me!).  What's out there?

Pretty much any database will require a C extension module.  Depending on 
your platform, you can probably get a precompiled library for most of them.

> *       With an eye to the future, I would like to write a Web-based system
> so that I can offer this system to other volunteer departments in the
> county.  

Do you want to host the software for other departmenets, or do you want 
to develop an application that the other departments can download and 
use locally?  If you're thinking of hosting, then Zope may be a good 
choice so that you can delegate other departments' portions of the site 
to their personnel.

If you simply plan to develop an application, why restrict it to your county?
You might consider starting a Sourceforge project and turning this application 
into a free competitor to the commercial systems out there.

> We simply cannot afford $2500+ for reporting software 

Eek!

> How do I get started writing web apps?  

As always, start reading.  Then practice and play a little.
Repeat until tired with problem domain. :)

> I have good friends at work telling me that Perl is the way to go; 
> I program both, but am partial to Python.

Use whichever you prefer unless you know of a compelling reason to use one 
or the other.  For example, if you can't find an ISP that will host anything 
in Python (unlikely!), then Perl may be your only choice.  For simple web 
applications, either one will do fine.  For more complex applications, both 
may have different advantages, especially when it comes to pre-written code 
available under a license that carries no fee for your department.

For example, if you're planning to use Zope, then you should definitely 
start with Python.  If you're wondering what Zope is, read the Zope Book 
(a draft is available at http://www.zope.org/Members/michel/ZB/).  The online 
draft answered most of my questions about Zope.

---Tom



More information about the Python-list mailing list