Pros/Cons JDBC HIBERNATE EJB

3,917 views
3,642 views

Published on

differences bw JDBC, HIBERNATE, EJB and final conclusion

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,917
On SlideShare
0
From Embeds
0
Number of Embeds
586
Actions
Shares
0
Downloads
24
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Pros/Cons JDBC HIBERNATE EJB

  1. 1. Pros/Cons JDBC Hibernate EJB 3.0 www.rajkrrsingh.blogspot.com
  2. 2. ProsJDBC Hibernate EJB 3.0You have complete Simple to write CRUD A lot less artifacts thancontrol (create, retrieve, update, EJBover the persistence delete) operations. 2. x. Make use ofbecause this is the No container or annotations or attributesbuilding blocks of nearly application server is based programming.all other persistence required and can be Narrows the gaptechnologies in Java. plugged into an existing between EJBCan call Stored container. 2. x and O/R mapping.Procedures. Tools are available to Do support OO conceptsCan manipulate relatively simplify like inheritance.large data sets. mapping relational data to objects and quick to develop www.rajkrrsingh.blogspot.com
  3. 3. ConsJDBC Hibernate EJB 3.0You will have to write a lot of Little or no capabilities for Since it is new, might be toocode to perform a little. remote access and early to use in commercialEasy to make mistakes in distributability. projects.properly managing Mapping schemas can be It is still evolving.connections and can cause tedious and O/R mappingout of cursors issues. has its tricks like using lazyHarder to maintain because initialization, eager loadingchanges in schemas can etc. What works for one maycause lot of changes to your not work for another.code. Limited clusteringRecords need to be locked capabilities.manually (e.g. select for Large data sets can stillupdate). 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. 4. ConclusionsJDBC Hibernate EJB 3.0Where possible stay Suitable for records in As a rule of thumb,away use suitable for distributedfrom using JDBC unless between 100 and 5000. and clusteredyou Watch out for memory applications, which ishave compelling reason issues, when heavily transactionto using large data sets. based. Records inuse it for batch jobs use say between 1 andwhere 100.large amount of dataneed to be transferred,records in use greaterthan 5000, required touse Stored Proceduresetc. www.rajkrrsingh.blogspot.com

×