Hibernate Spatial is an extension to the Hibernate Java ORM library for handling geographic data. Hibernate Spatial allows you to deal with geographic data in a standardized way. It abstracts away from the specific way your database supports geographic data, and provides a standardized, cross-database interface to geographic data storage and query functions. Hibernate Spatial supports most of the functions of the OGC Simple Feature Specification. Currently, Oracle 10g/11g, Postgresql/Postgis, MySQL, and MS SQL Server 2008 are supported.
PersistClass provides access to relational databases for PHP. It attempts to focus on simplicity and convenience by eliminating the need for boilerplate, meaningless code. It can establish database connections (MySQL, Oracle, etc.), execute SQL queries, parse query results, provide convenience methods (read a single row or value, etc.), escape data (against SQL injection, HTML escaping for outputs), handle transactions, and provide strict error handling and object persistence (storing and retrieving PHP objects in db tables).