Re: Non-ORM layers over JDBC

Поиск
Список
Период
Сортировка
От Tore Halset
Тема Re: Non-ORM layers over JDBC
Дата
Msg-id EC039F3F-4D32-4863-A863-AE61106505DF@pvv.ntnu.no
обсуждение исходный текст
Ответ на Non-ORM layers over JDBC  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: Non-ORM layers over JDBC  (Mark Lewis <mark.lewis@mir3.com>)
Re: Non-ORM layers over JDBC  (Petite Abeille <petite.abeille@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Joao Rui Leal
Дата:
Сообщение: Re: Deadlock while using getNotifications() and Statement.executeQuery()
Следующее
От: "Woody Woodring"
Дата:
Сообщение: Advice fetching Array data with JDBC 8.3 driver