Hibernate / Hibernate interview questions
Benefits of hibernate over JDBC?
- Hibernate is database independent while in case of JDBC, developer has to write database specific queries.
- In case of Hibernate developer doesn't need to be an expert of writing complex queries as HQL simplifies query writing process while in case of JDBC, its job of developer to write and tune queries. HQL is more object oriented and close to Java.
- In Hibernate, Criteria Query takes care of Query Tuning. In case of JDBC you need to tune your queries.
- No need to create any connection pool in case of Hibernate. You can use c3p0. In case of JDBC you need to write your own connection pool.
- Automatic primary key generation.
- Performance benefits like Lazy initialization, Outer join fetching, Batch fetching.
- Hibernate eliminates a lot of boiler plate code.
- Hibernate supports inheritance, associations, and collections.
- Hibernate implicitly provides transaction management.
- Hibernate wraps JDBCException that are unchecked so exception handling is NOT mandatory.
- Hibernate support cache memory.
Dogecoin! Earn free bitcoins up to $250 now by signing up.
Earn bitcoins upto $250 (free), invest in other Cryptocurrencies when you signup with blockfi. Use the referral link: Signup now and earn!
Using BlockFi, don't just buy crypto - start earning on it. Open an interest account with up to 8.6% APY, trade currencies, or borrow money without selling your assets.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
More Related questions...