posted 17 years ago
JDBC is good for quick-and-dirty, but ORM is generally preferable for larger, more complex projects. Interestingly enough, even though the ORM projects normally are using JDBC as their underlying access method, benchmarks indicate that they tend to be more efficient than raw JDBC. Like assembly languages vs. HLLs. It may sound paradoxical, but I've seen more than my share of horribly inefficient assembly algorithms used simply because writing a smarter one takes too long.
No, Hibernate isn't using serialization, BTW. It's using JDBC. Part of the Hibernate functionality is to establish a mapping between data objects and SQL objects in the backing database, generate the SQL code needed to access and modify it, and manage the execution of that process.
Just to repeat something I said the other day, however, do try and minimize the number of programs modifying the database at the same time. If only one app changes the data, there's never any question which app is misbehaving.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.