Re: Non-ORM layers over JDBC

From: "Stephen Denne" <Stephen(dot)Denne(at)datamail(dot)co(dot)nz>
To: "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Non-ORM layers over JDBC
Date: 2008-03-24 20:57:24
Message-ID: F0238EBA67824444BC1CB4700960CB4804EACBAB@dmpeints002.isotach.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Craig Ringer wrote
> I'm fairly new to Java (sorry!) and struggling with the
> database access
> area. My PostgreSQL database is fairy complex and significant
> parts of
> its user interface are through stored procedures etc. I've
> been looking
> into Hibernate / Hibernate EntityManager and other EJB3-compatible
> tools, but they all seem to be oriented toward
> database-independence and
> using the DB as a dumb storage engine. They even implement their own
> outer joins (!) and other core DB functionality. Currently
> I'm trying to
> figure out why a "SELECT c FROM customer c;" (Hibernate-style) is
> introducing a WHERE clause for on the customer's bank_id when
> executed
> ... so I'm not impressed so far.

A lot of ORMs are designed for ease of persisting objects, not ease of realising databases.

Though I haven't used it, so can't guess whether it would be a good match for your needs or not... one tool I think may make the database to object mapping easier is ActiveObjects.

> However, I've also looked at raw JDBC code, and it seems to be very
> verbose with a lot of manual data conversion and little language
> integration.

I use and quite like Spring-JDBC. Among other things, it makes JDBC use much less verbose.

In Java, a lot of projects use some form of data-binding between their GUI and Objects, then an ORM to persist those Objects to a DB.

Regards,
Stephen Denne.

Disclaimer:
At the Datamail Group we value team commitment, respect, achievement, customer focus, and courage. This email with any attachments is confidential and may be subject to legal privilege. If it is not intended for you please advise by reply immediately, destroy it and do not copy, disclose or use it in any way.
__________________________________________________________________
This email has been scanned by the DMZGlobal Business Quality
Electronic Messaging Suite.
Please see http://www.dmzglobal.com/dmzmessaging.htm for details.
__________________________________________________________________

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Craig Ringer 2008-03-25 01:01:26 Re: Non-ORM layers over JDBC
Previous Message Joao Rui Leal 2008-03-24 17:58:06 Deadlock while using getNotifications() and Statement.executeQuery()