Python and ODBC? 
Author Message
 Python and ODBC?

Which is the best solution to work with python and a SQL database under Windows?
I mean which module do I have to install on Python 2.0?
What about under Linux? I'm trying to install mxODBC module with MySQL db on a Linuxppc
box.
thx

matte

--
---------------------------------------
Memelli Matteo                                  
Could u imagine a world without Windoz?  

---------------------------------------



Fri, 04 Jul 2003 08:15:37 GMT  
 Python and ODBC?
Quote:

> Which is the best solution to work with python and a SQL database under

Windows?

So much depends on what _scale_ you need to work...!  Multi-user, or
single?  Do you need transactions, stored procedures/triggers, etc?
Even typical database size is a factor.

For really small-scale needs, for example, Gadfly has interesting
characteristics -- you might want to look into it -- but it is not
designed to scale up to intensive multi-user accesses or really
huge databases.

So, hard to give a 100% answer, but, if you're Windows-only, you might
want to try MSDE, the freely-redistributable version of SQL Server
(shorn of the various graphical front-ends &c); you can download and
use/redistribute it freely if you have a license for Microsoft Studio
or Office Developer.  It scales well up to 5 simultaneous users, and
has all the t{*filter*}s you'd expect from a professional RDBMS, such
as transactions, stored-procedures, etc, etc.  If you don't care about
redistribution, you can also download and use (but not redistribute)
SQL Server Developer Edition, which is the same thing plus the
graphical aids for DB administration/development/debugging.

It does have an upper boundary of 2 gigabytes per database -- which
was not a problem for us, but might be in other applications.

I have not tried out the versions of those related to SQL Server 2000,
only the ones related to SQL Server 7 (the previous release), which
were still around for download on the MS site a couple months ago
(sorry, don't have the URL and don't know if they're still there, as
I found out the same bits also were on our MSDN Universal subscription
CDROM's, so I saved downloading the big packs) -- in any case, I have
no reason to doubt that SQL Server 2000 is at least as good (but I
only did a few tests on that myself, and not on the MSDE-equivalents).

Quote:
> I mean which module do I have to install on Python 2.0?

That's part of what I like re MSDE -- you can talk to it directly
from Python via ADO and ADOX (the client-side parts of the MSDAC,
which is also freely downloadable/redistributable), and that turns
out to be VERY fast as well as quite convenient.  It may be more so
in our case since we don't _only_ use Python to talk to those DB's;
ADO/ADOX can be accessed equally well from a great variety of
programming/scripting languages.

Really, the only serious downside I can see is the very strong
Microsoft lock-in that is implicit in all of this.  Since our app
was MS-platforms-only anyway for another variety of reason, I
chose MSDE with a perfectly clear conscience.  If I had to avoid
platform lock-ins, and still get transactions and stored procedures
(each of those being a real 'must' for us), then, I dunno -- maybe
Interbase, now open-source, has those, but I don't really know
much about it; maybe Postgres (again, no first-hand experience).

Quote:
> What about under Linux? I'm trying to install mxODBC module with MySQL db
> on a Linuxppc box.

I'll pass on this one, having no experience with MySQL (I don't even
know if it supports transactions and stored procedures!).  I do know
it's very popular, so I guess one can't go TOO far wrong with it.

Alex



Fri, 04 Jul 2003 20:17:30 GMT  
 Python and ODBC?

    AM> If I had to avoid platform lock-ins, and still get
    AM> transactions and stored procedures (each of those being a real
    AM> 'must' for us), then, I dunno -- maybe Interbase, now
    AM> open-source, has those, but I don't really know much about it

Sure it has: I'm using Interbase (actually, Firebird), and there are
several modules that provide access to its APIs, and it should offer
an ODBC bridge too, but I never used it. I usually prefer a "native"
connection, and with IB I have it both on Widows (Delphi) and
everywhere with Python :)

bye, lele.
--
nickname: Lele Gaifax   | Quando vivro' di quello che ho pensato ieri
real: Emanuele Gaifas   | comincero' ad aver paura di chi mi copia.



Fri, 04 Jul 2003 22:30:01 GMT  
 Python and ODBC?

Quote:
> Sure it has: I'm using Interbase (actually, Firebird), and there are
[skip]
> everywhere with Python :)

   Where is a python module that work with Firebird (just curious)?

Oleg.
----

           Programmers don't die, they just GOSUB without RETURN.



Fri, 04 Jul 2003 23:14:13 GMT  
 Python and ODBC?

thx for your help

matte

Quote:


>> Which is the best solution to work with python and a SQL database under
> Windows?

> So much depends on what _scale_ you need to work...!  Multi-user, or
> single?  Do you need transactions, stored procedures/triggers, etc? Even
> typical database size is a factor.

> For really small-scale needs, for example, Gadfly has interesting
> characteristics -- you might want to look into it -- but it is not
> designed to scale up to intensive multi-user accesses or really huge
> databases.

> So, hard to give a 100% answer, but, if you're Windows-only, you might
> want to try MSDE, the freely-redistributable version of SQL Server
> (shorn of the various graphical front-ends &c); you can download and
> use/redistribute it freely if you have a license for Microsoft Studio or
> Office Developer.  It scales well up to 5 simultaneous users, and has
> all the t{*filter*}s you'd expect from a professional RDBMS, such as
> transactions, stored-procedures, etc, etc.  If you don't care about
> redistribution, you can also download and use (but not redistribute) SQL
> Server Developer Edition, which is the same thing plus the graphical
> aids for DB administration/development/debugging.

> It does have an upper boundary of 2 gigabytes per database -- which was
> not a problem for us, but might be in other applications.

> I have not tried out the versions of those related to SQL Server 2000,
> only the ones related to SQL Server 7 (the previous release), which were
> still around for download on the MS site a couple months ago
> (sorry, don't have the URL and don't know if they're still there, as
> I found out the same bits also were on our MSDN Universal subscription
> CDROM's, so I saved downloading the big packs) -- in any case, I have no
> reason to doubt that SQL Server 2000 is at least as good (but I only did
> a few tests on that myself, and not on the MSDE-equivalents).

>> I mean which module do I have to install on Python 2.0?

> That's part of what I like re MSDE -- you can talk to it directly from
> Python via ADO and ADOX (the client-side parts of the MSDAC, which is
> also freely downloadable/redistributable), and that turns out to be VERY
> fast as well as quite convenient.  It may be more so in our case since
> we don't _only_ use Python to talk to those DB's; ADO/ADOX can be
> accessed equally well from a great variety of programming/scripting
> languages.

> Really, the only serious downside I can see is the very strong Microsoft
> lock-in that is implicit in all of this.  Since our app was
> MS-platforms-only anyway for another variety of reason, I chose MSDE
> with a perfectly clear conscience.  If I had to avoid platform lock-ins,
> and still get transactions and stored procedures
> (each of those being a real 'must' for us), then, I dunno -- maybe
> Interbase, now open-source, has those, but I don't really know much
> about it; maybe Postgres (again, no first-hand experience).

>> What about under Linux? I'm trying to install mxODBC module with MySQL
>> db on a Linuxppc box.

> I'll pass on this one, having no experience with MySQL (I don't even
> know if it supports transactions and stored procedures!).  I do know
> it's very popular, so I guess one can't go TOO far wrong with it.

> Alex

--
---------------------------------------
Memelli Matteo                                  
Could u imagine a world without Windoz?  

---------------------------------------


Sat, 05 Jul 2003 00:35:49 GMT  
 Python and ODBC?


    >> Sure it has: I'm using Interbase (actually, Firebird), and
    >> there are
    OB> [skip]
    >> everywhere with Python :)

    OB>    Where is a python module that work with Firebird (just
    OB> curious)?

http://www.zope.org/Members/RETierney/gvibDA which also provide the
Zope machinery, on the top of a Python module usable standalone. This
is particularly nice since it contains precompiled stuff for Widows.

http://sourceforge.net/projects/kinterbasdb is another one, the first
I used.

btw, Interbase and Firebird share the very same external API: this may
change in the future, but right now they are equally accessible from
any client.

bye, lele.
--
nickname: Lele Gaifax   | Quando vivro' di quello che ho pensato ieri
real: Emanuele Gaifas   | comincero' ad aver paura di chi mi copia.



Sat, 05 Jul 2003 01:25:22 GMT  
 Python and ODBC?

Quote:
>     OB>    Where is a python module that work with Firebird (just
>     OB> curious)?

> http://www.zope.org/Members/RETierney/gvibDA which also provide the
> Zope machinery, on the top of a Python module usable standalone. This
> is particularly nice since it contains precompiled stuff for Widows.

   Thank you.

Quote:
> http://sourceforge.net/projects/kinterbasdb is another one, the first
> I used.

   Ah, finally the project moved to SF!

Oleg.
----

           Programmers don't die, they just GOSUB without RETURN.



Sat, 05 Jul 2003 16:42:53 GMT  
 Python and ODBC?

Quote:


> > Which is the best solution to work with python and a SQL database under
> Windows?

> > What about under Linux? I'm trying to install mxODBC module with MySQL db
> > on a Linuxppc box.

> I'll pass on this one, having no experience with MySQL (I don't even
> know if it supports transactions and stored procedures!).  I do know
> it's very popular, so I guess one can't go TOO far wrong with it.

If you want to write a cross-platform application then I'd suggest
using e.g. mxODBC. It is available for pretty much all flavours
of Unix including Linux and runs well on Windows too. (It should
also compile on Macs and other platforms provided that you find
ODBC drivers/managers for them.)

--
Marc-Andre Lemburg
______________________________________________________________________
Company:                                        http://www.egenix.com/
Consulting:                                    http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/



Mon, 14 Jul 2003 19:13:24 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Python and ODBC

2. Python and ODBC

3. Python and ODBC

4. Python and ODBC

5. MySQL, Python and Odbc

6. Microsoft Access Database connecting from Python through ODBC

7. Python/Python Windows/PostgreSQL/ODBC

8. Python 2.2 (ActiveState) odbc.odbc vs. mx.ODBC.Windows

9. ADO/ODBC/ASP/Python error

10. Where can you find the Python ODBC modual

11. Python ODBC

12. ODBC question from Python Newbie

 

 
Powered by phpBB® Forum Software