Advertisement

Databases and Jython: Object Relational Mapping and Using JDBC

  • Josh Juneau
  • Jim Baker
  • Victor Ng
  • Leo Soto
  • Frank Wierzbicki

Abstract

In this chapter, we will look at zxJDBC package, which is a standard part of Jython since version 2.1 and complies with the Python 2.0 DBI standard. zxJDBC can be an appropriate choice for simple one-off scripts where database portability is not a concern. In addition, it’s (generally) necessary to use zxJDBC when writing a new dialect for SQLAlchemy or Django. (But that’s not strictly true: you can use pg8000, a pure Python DBI driver, and of course write your own DBI drivers. But please don’t do that.) So knowing how zxJDBC works can be useful when working with these packages. However, it’s too low level for us to recommend for more general usage. Use SQLAlchemy or Django if at all possible. Finally, JDBC itself is also directly accessible, like any other Java package from Jython. Simply use the java.sql package. In practice this should be rarely necessary.

Keywords

Configuration File Prepared Statement Database Table Entity Class Player Object 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Josh Juneau, Jim Baker, Victor Ng, Leo Soto, Frank Wierzbicki 2010

Authors and Affiliations

  • Josh Juneau
  • Jim Baker
  • Victor Ng
  • Leo Soto
  • Frank Wierzbicki

There are no affiliations available

Personalised recommendations