Database adapters

E

Ed Leafe

I'm using Python for my database work, and need to be able to connect
to various servers, such as MySQL, PostgreSQL, Firebird, and others.
There are a number of adapters available for each of these, but I run
into the same problem with all: I need to have that database server
installed on the machine for which I need to build the adapter. Since
my development work is done on a workstation and not a server, this
causes a problem.

How do I accomplish this? How can I build, say, psycopg so that I can
connect from my dev machine to a server that's on another host
somewhere on the internet?

___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://dabodev.com/
 
C

Cy Edmunds

Ed Leafe said:
I'm using Python for my database work, and need to be able to connect
to various servers, such as MySQL, PostgreSQL, Firebird, and others.
There are a number of adapters available for each of these, but I run
into the same problem with all: I need to have that database server
installed on the machine for which I need to build the adapter. Since
my development work is done on a workstation and not a server, this
causes a problem.

How do I accomplish this? How can I build, say, psycopg so that I can
connect from my dev machine to a server that's on another host
somewhere on the internet?

___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://dabodev.com/

I connect to various types of databases from Python using ODBC. All you need
on the client side is an ODBC driver.

Of course there are lots of caveats. You aren't going to get the full set of
features from each vendor by using a common interface. There are also syntax
differences between the SQL dialects supported by various vendors. For my
simple applications these have not been serious problems but YMMV.
 
R

Ricardo Bugalho

same problem with all: I need to have that database server installed on
the machine for which I need to build the adapter. Since my development
work is done on a workstation and not a server, this causes a problem.

How do I accomplish this? How can I build, say, psycopg so that I can
connect from my dev machine to a server that's on another host somewhere
on the internet?

Both the MySQL and PostgreSQL adapters support connections to remote
servers. I'd bet they all do.
I don't understand what your problem is.
 
I

Istvan Albert

Ed Leafe wrote:

How do I accomplish this? How can I build, say, psycopg so that I
can connect from my dev machine to a server that's on another host
somewhere on the internet?

As others have pointed out you need to have the header and library files.
Note that having a db installed does not mean that you have all these
files.

For binary compatible systems you could compile your db modules on one
system and then copy them to the other.

Istvan.
 
E

Ed Leafe

I connect to various types of databases from Python using ODBC. All
you need
on the client side is an ODBC driver.

Since I'm developing a framework, I need to support what people are
using. If I could force them all to use a single method, life would be
easier for me! ;-)

___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://dabodev.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top