Re: Non-ORM layers over JDBC - Mailing list pgsql-jdbc

From Tore Halset
Subject Re: Non-ORM layers over JDBC
Date
Msg-id EC039F3F-4D32-4863-A863-AE61106505DF@pvv.ntnu.no
Whole thread Raw
In response to Non-ORM layers over JDBC  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: Non-ORM layers over JDBC  (Mark Lewis <mark.lewis@mir3.com>)
Re: Non-ORM layers over JDBC  (Petite Abeille <petite.abeille@gmail.com>)
List pgsql-jdbc
Hello.

On Mar 24, 2008, at 6:45 , Craig Ringer wrote:
> I'm fairly new to Java (sorry!) and struggling with the database
> access area.

A newbie should not question if he should use a ORM, but instead focus
on which ORM to use. Please spend some time finding a good ORM that
you feel comfortable with.

Why you should use an ORM:
  * Less boring code to write when bringing over data from PostgreSQL
to your java application and back.
  * Simpler refactoring. What if you want to change the primary key,
add a relationship or whatever.
  * Easier to support several databases. Thanks to Apache Cayenne, my
app work with PostgreSQL, MS SQL Server and Derby and others.
  * And lots of other good reasons you will discover.

When to not use an ORM:
  * Some specially tuned reporting queries

> What do people here use? Just use the JDBC directly? Use an ORM
> layer even though you just target PostgreSQL and work around its
> limitations and quirks? Use a different ORM layer without weird
> limitations and quirks? Some other tool I haven't been able to find
> out about?

I am using Apache Cayenne. It is a simple and elegant ORM with a swing
modeler tool that helps you create the mapping.

http://cayenne.apache.org/

Regards,
  - Tore.



pgsql-jdbc by date:

Previous
From: Joao Rui Leal
Date:
Subject: Re: Deadlock while using getNotifications() and Statement.executeQuery()
Next
From: "Woody Woodring"
Date:
Subject: Advice fetching Array data with JDBC 8.3 driver