SlideShare a Scribd company logo
Pros/Cons JDBC Hibernate EJB 3.0




                  www.rajkrrsingh.blogspot.com
Pros
JDBC                        Hibernate                    EJB 3.0
You have complete           Simple to write CRUD         A lot less artifacts than
control                     (create, retrieve, update,   EJB
over the persistence        delete) operations.          2. x. Make use of
because this is the         No container or              annotations or attributes
building blocks of nearly   application server is        based programming.
all other persistence       required and can be          Narrows the gap
technologies in Java.       plugged into an existing     between EJB
Can call Stored             container.                   2. x and O/R mapping.
Procedures.                 Tools are available to       Do support OO concepts
Can manipulate relatively   simplify                     like inheritance.
large data sets.            mapping relational data
                            to objects and quick to
                            develop




                                                  www.rajkrrsingh.blogspot.com
Cons
JDBC                              Hibernate                        EJB 3.0
You will have to write a lot of   Little or no capabilities for    Since it is new, might be too
code to perform a little.         remote access and                early to use in commercial
Easy to make mistakes in          distributability.                projects.
properly managing                 Mapping schemas can be           It is still evolving.
connections and can cause         tedious and O/R mapping
out of cursors issues.            has its tricks like using lazy
Harder to maintain because        initialization, eager loading
changes in schemas can            etc. What works for one may
cause lot of changes to your      not work for another.
code.                             Limited clustering
Records need to be locked         capabilities.
manually (e.g. select for         Large data sets can still
update).                          cause memory issues.
                                  Support for security at a
                                  database level only and no
                                  support for role based
                                  security without any add on
                                  APIs like Aspect Oriented
                                  Programming etc.



                                                           www.rajkrrsingh.blogspot.com
Conclusions
JDBC                      Hibernate                 EJB 3.0
Where possible stay       Suitable for records in   As a rule of thumb,
away                      use                       suitable for distributed
from using JDBC unless    between 100 and 5000.     and clustered
you                       Watch out for memory      applications, which is
have compelling reason    issues, when              heavily transaction
to                        using large data sets.    based. Records in
use it for batch jobs                               use say between 1 and
where                                               100.
large amount of data
need to be transferred,
records in use greater
than 5000, required to
use Stored Procedures
etc.




                                              www.rajkrrsingh.blogspot.com

More Related Content

Similar to Pros/Cons JDBC HIBERNATE EJB (20)

PPTX
Oracle mysql comparison
Arun Sharma
 
PDF
Graduate Project Summary
JustAnotherAbstraction
 
PPTX
Mongodb basics and architecture
Bishal Khanal
 
PPTX
No sql database
vishal gupta
 
PPTX
Data in Azure
Guy Barrette
 
PDF
Mow2012 data services
Syed Shaaf
 
PPT
J2EE Performance And Scalability Bp
Chris Adkin
 
PDF
Java Memory Hogs.pdf
Gurbinder3
 
PPTX
Hadoop tutorial for Freshers,
TIB Academy
 
PPTX
Database Virtualization: The Next Wave of Big Data
exponential-inc
 
PDF
Cidr11 paper32
jujukoko
 
PDF
Megastore providing scalable, highly available storage for interactive services
João Gabriel Lima
 
PDF
Real world java_ee_patterns
Alassane Diallo
 
PDF
Database Performance Management in Cloud
Dr. Amarjeet Singh
 
PPTX
What is Hibernate Framework?
Ducat India
 
PPT
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Bhupesh Bansal
 
PPT
Hadoop and Voldemort @ LinkedIn
Hadoop User Group
 
PPT
Optimizing your java applications for multi core hardware
IndicThreads
 
PDF
Jooq java object oriented querying
eSAT Publishing House
 
PDF
Using Distributed In-Memory Computing for Fast Data Analysis
ScaleOut Software
 
Oracle mysql comparison
Arun Sharma
 
Graduate Project Summary
JustAnotherAbstraction
 
Mongodb basics and architecture
Bishal Khanal
 
No sql database
vishal gupta
 
Data in Azure
Guy Barrette
 
Mow2012 data services
Syed Shaaf
 
J2EE Performance And Scalability Bp
Chris Adkin
 
Java Memory Hogs.pdf
Gurbinder3
 
Hadoop tutorial for Freshers,
TIB Academy
 
Database Virtualization: The Next Wave of Big Data
exponential-inc
 
Cidr11 paper32
jujukoko
 
Megastore providing scalable, highly available storage for interactive services
João Gabriel Lima
 
Real world java_ee_patterns
Alassane Diallo
 
Database Performance Management in Cloud
Dr. Amarjeet Singh
 
What is Hibernate Framework?
Ducat India
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Bhupesh Bansal
 
Hadoop and Voldemort @ LinkedIn
Hadoop User Group
 
Optimizing your java applications for multi core hardware
IndicThreads
 
Jooq java object oriented querying
eSAT Publishing House
 
Using Distributed In-Memory Computing for Fast Data Analysis
ScaleOut Software
 

Recently uploaded (20)

PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
GRADE-3-PPT-EVE-2025-ENG-Q1-LESSON-1.pptx
EveOdrapngimapNarido
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
Dimensions of Societal Planning in Commonism
StefanMz
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
GRADE-3-PPT-EVE-2025-ENG-Q1-LESSON-1.pptx
EveOdrapngimapNarido
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
Ad

Pros/Cons JDBC HIBERNATE EJB

  • 1. Pros/Cons JDBC Hibernate EJB 3.0 www.rajkrrsingh.blogspot.com
  • 2. Pros JDBC Hibernate EJB 3.0 You have complete Simple to write CRUD A lot less artifacts than control (create, retrieve, update, EJB over the persistence delete) operations. 2. x. Make use of because this is the No container or annotations or attributes building blocks of nearly application server is based programming. all other persistence required and can be Narrows the gap technologies in Java. plugged into an existing between EJB Can call Stored container. 2. x and O/R mapping. Procedures. Tools are available to Do support OO concepts Can manipulate relatively simplify like inheritance. large data sets. mapping relational data to objects and quick to develop www.rajkrrsingh.blogspot.com
  • 3. Cons JDBC Hibernate EJB 3.0 You will have to write a lot of Little or no capabilities for Since it is new, might be too code to perform a little. remote access and early to use in commercial Easy to make mistakes in distributability. projects. properly managing Mapping schemas can be It is still evolving. connections and can cause tedious and O/R mapping out of cursors issues. has its tricks like using lazy Harder to maintain because initialization, eager loading changes in schemas can etc. What works for one may cause lot of changes to your not work for another. code. Limited clustering Records need to be locked capabilities. manually (e.g. select for Large data sets can still update). cause memory issues. Support for security at a database level only and no support for role based security without any add on APIs like Aspect Oriented Programming etc. www.rajkrrsingh.blogspot.com
  • 4. Conclusions JDBC Hibernate EJB 3.0 Where possible stay Suitable for records in As a rule of thumb, away use suitable for distributed from using JDBC unless between 100 and 5000. and clustered you Watch out for memory applications, which is have compelling reason issues, when heavily transaction to using large data sets. based. Records in use it for batch jobs use say between 1 and where 100. large amount of data need to be transferred, records in use greater than 5000, required to use Stored Procedures etc. www.rajkrrsingh.blogspot.com