Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: From Hibernate to straight JPA Date: Sat, 18 Jul 2015 23:24:33 +0000 (UTC) Organization: A noiseless patient Spider Lines: 39 Message-ID: References: <87egkfhodv.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 18 Jul 2015 23:24:33 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="15979"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ziItti68ZnE9GbXeVp1BOgW6g9kYepsM=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:eAAnStjf+YTi4/yqGtO+HzABRMg= Xref: csiph.com comp.lang.java.programmer:32080 On Sat, 18 Jul 2015 20:48:50 +0100, Eternal Hope wrote: > As I read this thread I thought it was about time I had a look at this > JPA stuff. I've been writing Java for circa 15 years now, I've done > everything from writing byte streams to firmware interfaces to high > availability container managed business applications and Swing based > UIs. In all this time I have relied on a JDBC driver in my classpath, > container managed connection pools, hand coded SQL and 'in code' > transaction management. I do my own OR mapping; actually we don't call > it 'OR mapping' it's just relational database stuff, and quite frankly > I've never found the need to use some persistance framework. > I'm also interested in the answers you get. I suspect out backgrounds might be similar: I have a fairly solid background in relational database design, and the associated skills of normalisation, database performance tuning and writing both an RDBMS's dialect of SQL and ODBC as well as writing database applications in Perl, C and COBOL. So, when I've needed to implement database applications in Java, naturally I went for JDBC. With my background I really wonder what benefits I'd get from using a JPA and, with an eye on performance, how does ease of performance tuning compare between the JPA world and that of using JDBC and traditional SQL. The uniformly worst performance I've seen has been the result of the automatically generated SQL that 4GLs (e.g. PowerBuilder) have produced, and the resulting dreadful performance resulting from (a) the use of ridiculously small test databases, (b) nobody sanity-checking the auto- generated SQL, especially w.r.t. whether it tried to use DB indexes and (c) whether either DBA or programmers had attempted to support high volume queries with indexes. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |