Tuesday, September 7, 2010

Java Db Stack to Python Db Stack

With the move of our system from a Java environment to a Python environment, the database stack needed a corresponding change. Our original backend consisted of the following:
  • a Postgresql relational database with Postgis extensions -- to handle data requirements including geospatial data,
  • JDBC -- an API to handle connectivity to the database,
  • JTS (Java Technology Suite) -- a library to handle spatial data and operations in Java,
  • Hibernate -- a library to handle Object mapping to a relational database, and
  • Hibernate Spatial -- a library that extends Hibernate to include handling of geospatial objects.
For Python, the corresponding stack retains the Postgresql/Postgis database backend with a different set of Python tools:
  • Pyscopg2 (corresponds to JDBC),
  • Shapely (corresponds to JTS),
  • SqlAlchemy (corresponds to Hibernate), and
  • GeoAlchemy (corresponds to Hibernate Spatial).
So far, the transition is quite straightforward, with the corresponding set of python tools providing practically the same functionality available for the Java set of tools.

Testing goes on...