Java -> Python (-> JDBC) -> DB (was Python/Python Windows/PostgreSQL/ODBC)

hartmut Goebel hartmut at oberon.noris.de
Tue Dec 21 12:55:37 EST 1999


Timothy Grant (tjg at avalongroup.net) schrieb:

 >The subject says it all.

I have a quite related problem, perhaps somebody has some advice for me. It's
a bit complex and off-topic. But since here are a lot of experienced
programmers, I hope to find help here :-)

Together with a co-worker I'm just about starting an OpenSource project (see
below). First step should be a prototype for testing interfaces and
performance. Later we (or others :-) may port some of the stuff to another
language (e.g C) for native compilation.

Currently we are struggling about the
- design (abstraction layer or not)
- programming language
- DB interfacing (via language modules or JDBC -- which is also a language
  module)
- modularization

These are the constrains:

             he                         me

Plattform    Windos NT(?)               Linux

Language     Java                       Python
preferance

Interfacing  via SQL/JDBC               via Abstraction-Layer
to DBMS                                 onto SQL/JDBC

RDBMs        InstantDB or               PostGreSQL
             PostGreSQL
             (not yet settled)

Well, nothing is settled yet :-(

So for making good progress I had this idea:
- Write an absraction layer in Python. I think this would be the quickest way
  to get the API-prototype.
- Allow interfacing from Java to the Python layer, so my co-worker can still
  programm in Java :-)
- If usefull: access the DBMS via JDBC. (I'm quite unsure about this.)

Later is should be easy to replace the Python layer with e.g. C and
access it fom Python, Java, C, you-name-it.

For me, I'm new to Python but seam to like it. I've never done Java, but it
does not seam to suite me. My Co-worker did nothing with Python an only a
little with Java.

Actual Questions:

- Is it possible to _easy_ embedd Python into Java, preferable without
  writing stubs? I've seen JPython but am not quite sure whether is can to
  this job easily. Esp. I messed a short intro for this specific topic.

- Is it possible to access java classes, esp. JDBC  from within Python?

- Does ist make sense to use JDBC instead of Pythons DB-API? (If he really
  selects InstandDB, this would become a must :-(

- Can Python modules be compiled/transformed into shared libs/dlls?

- Is DB-Api easy to use? (I only had a short look at it.)

- What software packages do we need to download?

I'll gladly accept any RTFM with pointer :-)


About the project (for those interested):

We are going to re-implement a DB based News/Mail system we both used on
Amiga. It's called UMS (Universal Massage System, http://ums.home.pages.de/)
and has some nice feature we are still missing an any other plattform.
Readers for UMS are very comfortable -- well, have been, since nowerdays
Amigas are quite a bit slow ;-)

Thanks for all answers!
+++hartmut



More information about the Python-list mailing list