SlideShare a Scribd company logo
www.edureka.co/persistence-with-hibernate
Effective Persistence Using ORM with Hibernate
View Persistence with Hibernate course details at www.edureka.co/persistence-with-hibernate
For Queries:
Post on Twitter @edurekaIN: #askEdureka
Post on Facebook /edurekaIN
For more details please contact us:
US : 1800 275 9730 (toll free)
INDIA : +91 88808 62004
Email Us : sales@edureka.co
Slide 2 www.edureka.co/persistence-with-hibernate
At the end of this webinar, you will be able to understand:
Objectives
 What is Java Enterprise
 Java Enterprise architecture
 Hibernate
 Java EE with Hibernate
 Easy persistence with Hibernate
 Hibernate with Spring
 Session & Transactions using Spring & Hibernate
 Hibernate with search mechanism
Slide 3 www.edureka.co/persistence-with-hibernate
JavaEE – Enterprise Edition
Provides collection of APIs and runtime environments to support
Enterprise applications
 Community driven software
 Defines standard specifications which can be implemented by vendors
Provides services for
i) Persistence
ii) Messaging
iii) Web
iv) Transactions
Web services support using JAXRS(Rest) and JAXWS(SOAP)
Slide 4 www.edureka.co/persistence-with-hibernate
Slide 5 www.edureka.co/persistence-with-hibernate
An Object relational mapping library of java language for Object persistence
and SQL databases
Found in 2001 by Gavin King
Transparent persistence of java objects with relational database
Provides query language in synch with SQL
Open source library
Provides solutions for object relational impedance mismatch problems
Hibernate
Slide 6 www.edureka.co/persistence-with-hibernate
JavaEE with Hibernate
Objective is to solve the complexities existed
in EJB2 persistence architecture.
 Provided an effective Java persistence API
enabling hibernate to work with different
databases easily
 Annotations provide meta data about table
column definitions at the model level.
 Entities are developed independent of the
underlying database
Derby
Mysql
Oracle
Slide 7 www.edureka.co/persistence-with-hibernate
Provides a simple API for storing and retrieving Java objects directly to and from the database
Non-intrusive: No need to follow specific rules or design patterns
Transparent: Your object model is unaware
Persistence using Hibernate
JavaObject
int id;
String name;
String getName()
int getId()
void setName(String)
SQL Table
id [int] primary key,
name [varchar(50)],
Magic Happens Here
(O/R Mapper – i.e. Hibernate)
Slide 8 www.edureka.co/persistence-with-hibernate
DEMO : Ease of Persistence Using Hibernate
Slide 9Slide 9Slide 9 www.edureka.co/persistence-with-hibernate
Spring
An open source framework
Enables to build applications using POJO (Plain Old Java Objects)
Handles the complete infrastructure required for application from end to
end
Makes development of JavaEE (Java EnterPrise Applications) easier
Light weight and transparent
Use of IOC Containers
Supports ORM and Transaction Management
Slide 10Slide 10Slide 10 www.edureka.co/persistence-with-hibernate
Spring with Hibernate
An extensive support for ORM frameworks like
Hibernate , JPA
Provides complete infrastructure for any ORM layer used
in the application
 IOC of spring handles the SessionFactory instances of
hibernate
Configurations of hibernate are taken care efficiently by
spring application contexts
Use of hibernate.cfg.xml can be taken care by spring
applicationContext.xml
Declarative Transaction management
Built in support for exception handling
Slide 11Slide 11Slide 11 www.edureka.co/persistence-with-hibernate
Spring supports two different approach for transaction management:
Programmatic Transaction Management
» Transactions are managed by programming codes
» Highly flexible
» Difficult in maintenance
» Spring TransactionTemplate is used for programmatic approach
Declarative Transaction Management
» Transactions are handled declaratively by XML or Annotation
» Will have lesser impact with the code of application
» Extensive support from Spring AOP
» Most widely used
Transaction Management with Spring
Slide 12Slide 12Slide 12 www.edureka.co/persistence-with-hibernate
Spring Aspect Oriented Programming enables to declare transaction
declaratively with Aspect
Aspect scatters across methods, class and even objects
Can be used in xml and annotations
AOP declarative transaction:-
» Transaction-handling advice is created using <tx:advice/> and
pointcut is defined to make transactional advice that matches all
methods
» Advice begins transaction on before calling the method
» On successful execution of method advice commits the
transaction
» On failure advice rolls back
Spring AOP Transaction Management
<tx:advice id="txAdvice"
transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="create"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="createOperation"
expression="execution(*
com.tutorialspoint.StudentJDBCTemplate.create
(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-
ref="createOperation"/>
</aop:config>
Slide 13 www.edureka.co/persistence-with-hibernate
DEMO : Spring Transaction Management Using Hibernate
Slide 14Slide 14Slide 14 www.edureka.co/persistence-with-hibernate
Hibernate OGM
OGM – Object Grid Mapper
It provides Java Persistence API (JPA) support for NoSQL Solutions
Object Relational Mapping for NoSQL Databases
Provides support for most of the NoSQL database types
Scaling of Relational Databases with a NoSQL front end and with no change in domain model
Slide 15Slide 15Slide 15 www.edureka.co/persistence-with-hibernate
Hibernate OGM - Architecture
Slide 16 www.edureka.co/persistence-with-hibernate
DEMO : OGM with Hibernate
Slide 17Slide 17Slide 17 www.edureka.co/persistence-with-hibernate
An Apache library
Full text search capability
Developed on java API
Query results are returned by relevance
Fast ,flexible and stable
Easy to integrate lucence search functionality to application
Lucene
Slide 18Slide 18Slide 18 www.edureka.co/persistence-with-hibernate
One of the most base functionality of Lucene
Fields in the documents are analyzed by the IndexWriter
Creates/Updates the indexes
Indexes created/updated are equivalently stored/updated in
directory
Lucene – Indexing
Slide 19Slide 19Slide 19 www.edureka.co/persistence-with-hibernate
Search operation is basically carried via IndexSearcher
Directory having indexes are passed to IndexSearcher
IndexSearcher reads the indexes in the directory with the
help of IndexReader
Query to search is created using the QueryParser
Search performed with IndexSearcher against the query
created by QueryParser
IndexSeracher returns TopDocs which contains the
complete search details
Lucene – Search
Slide 20Slide 20Slide 20 www.edureka.co/persistence-with-hibernate
Even though Lucence provides very efficient search
capabilities , suffers with several mismatches with
domain object models
Hibernate Search built on top of the Lucence search
engine to address the short comings of lucence in
domain object models
Similarly to Hibernate which has been built in top of
the SQL databases, Hibernate search built on top of
Lucence
Hibernate address the short comings of lucence in
domain object models with annotations
Manages entities when query made to database or
as lucence query to index
Hibernate Search
Search
Request
Slide 21Slide 21Slide 21 www.edureka.co/persistence-with-hibernate
DEMO - LUCENCE APPLICATION
Slide 22 www.edureka.co/persistence-with-hibernate
Course Topics
 Module 1
» Introduction to ORM and Hibernate
 Module 2
» Persistence and Session Factory
 Module 3
» Association, Mapping & Inheritance
 Module 4
» Criteria and Query Language
 Module 5
» Transactions ,Filter and Performance
 Module 6
» Search and Validation Framework
 Module 7
» OGM, NoSQL and Spring
 Module 8
» Project
Slide 23
LIVE Online Class
Class Recording in LMS
24/7 Post Class Support
Module Wise Quiz
Project Work
Verifiable Certificate
www.edureka.co/persistence-with-hibernate
How it Works?
Questions
Slide 24 www.edureka.co/persistence-with-hibernate
Slide 25 Course Url

More Related Content

What's hot (20)

Oracle WebCenter Content User Training
Oracle WebCenter Content User Training Oracle WebCenter Content User Training
Oracle WebCenter Content User Training
virkmasood
 
Azure Umbraco workshop
Azure Umbraco workshopAzure Umbraco workshop
Azure Umbraco workshop
Orbit One - We create coherence
 
NServicebus WCF Integration 101
NServicebus WCF Integration 101NServicebus WCF Integration 101
NServicebus WCF Integration 101
Rich Helton
 
Progressive EPiServer Development
Progressive EPiServer DevelopmentProgressive EPiServer Development
Progressive EPiServer Development
joelabrahamsson
 
SharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning ModelsSharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning Models
Shailen Sukul
 
SharePoint 2013 Sneak Peek
SharePoint 2013 Sneak PeekSharePoint 2013 Sneak Peek
SharePoint 2013 Sneak Peek
Shailen Sukul
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
Ali Taki
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
Naveen Sihag
 
New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0
Dima Maleev
 
A Designer's Intro to Oracle JET
A Designer's Intro to Oracle JETA Designer's Intro to Oracle JET
A Designer's Intro to Oracle JET
Lauren Beatty
 
New Features of ASP.NET 4.0
New Features of ASP.NET 4.0New Features of ASP.NET 4.0
New Features of ASP.NET 4.0
Buu Nguyen
 
Microsoft Azure
Microsoft AzureMicrosoft Azure
Microsoft Azure
Dima Maleev
 
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Codemotion
 
ASP.NET MVC Fundamental
ASP.NET MVC FundamentalASP.NET MVC Fundamental
ASP.NET MVC Fundamental
ldcphuc
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
vipin kumar
 
ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015
Hossein Zahed
 
Oracle APEX Social Login
Oracle APEX Social LoginOracle APEX Social Login
Oracle APEX Social Login
msewtz
 
Azure ppt
Azure pptAzure ppt
Azure ppt
apponix123
 
Why use .net by naveen kumar veligeti
Why use .net by naveen kumar veligetiWhy use .net by naveen kumar veligeti
Why use .net by naveen kumar veligeti
Naveen Kumar Veligeti
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC
eldorina
 
Oracle WebCenter Content User Training
Oracle WebCenter Content User Training Oracle WebCenter Content User Training
Oracle WebCenter Content User Training
virkmasood
 
NServicebus WCF Integration 101
NServicebus WCF Integration 101NServicebus WCF Integration 101
NServicebus WCF Integration 101
Rich Helton
 
Progressive EPiServer Development
Progressive EPiServer DevelopmentProgressive EPiServer Development
Progressive EPiServer Development
joelabrahamsson
 
SharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning ModelsSharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning Models
Shailen Sukul
 
SharePoint 2013 Sneak Peek
SharePoint 2013 Sneak PeekSharePoint 2013 Sneak Peek
SharePoint 2013 Sneak Peek
Shailen Sukul
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
Ali Taki
 
New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0
Dima Maleev
 
A Designer's Intro to Oracle JET
A Designer's Intro to Oracle JETA Designer's Intro to Oracle JET
A Designer's Intro to Oracle JET
Lauren Beatty
 
New Features of ASP.NET 4.0
New Features of ASP.NET 4.0New Features of ASP.NET 4.0
New Features of ASP.NET 4.0
Buu Nguyen
 
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Codemotion
 
ASP.NET MVC Fundamental
ASP.NET MVC FundamentalASP.NET MVC Fundamental
ASP.NET MVC Fundamental
ldcphuc
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
vipin kumar
 
ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015
Hossein Zahed
 
Oracle APEX Social Login
Oracle APEX Social LoginOracle APEX Social Login
Oracle APEX Social Login
msewtz
 
Why use .net by naveen kumar veligeti
Why use .net by naveen kumar veligetiWhy use .net by naveen kumar veligeti
Why use .net by naveen kumar veligeti
Naveen Kumar Veligeti
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC
eldorina
 

Similar to Effective Persistence Using ORM With Hibernate (20)

Leverage Hibernate and Spring Features Together
Leverage Hibernate and Spring Features TogetherLeverage Hibernate and Spring Features Together
Leverage Hibernate and Spring Features Together
Edureka!
 
Webinar: Persistence with Hibernate - Portal Development & Text Searching wit...
Webinar: Persistence with Hibernate - Portal Development & Text Searching wit...Webinar: Persistence with Hibernate - Portal Development & Text Searching wit...
Webinar: Persistence with Hibernate - Portal Development & Text Searching wit...
Edureka!
 
Hibernate Interview Questions | Edureka
Hibernate Interview Questions | EdurekaHibernate Interview Questions | Edureka
Hibernate Interview Questions | Edureka
Edureka!
 
Hibernate Mapping on the Fly
Hibernate Mapping on the FlyHibernate Mapping on the Fly
Hibernate Mapping on the Fly
Edureka!
 
Webinar: Hibernate - the ultimate ORM framework
Webinar: Hibernate - the ultimate ORM frameworkWebinar: Hibernate - the ultimate ORM framework
Webinar: Hibernate - the ultimate ORM framework
Edureka!
 
Scaling the Content Repository with Elasticsearch
Scaling the Content Repository with ElasticsearchScaling the Content Repository with Elasticsearch
Scaling the Content Repository with Elasticsearch
Nuxeo
 
New-Age Search through Apache Solr
New-Age Search through Apache SolrNew-Age Search through Apache Solr
New-Age Search through Apache Solr
Edureka!
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
hchen1
 
Hibernate jj
Hibernate jjHibernate jj
Hibernate jj
Joe Jacob
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Toru Wonyoung Choi
 
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and ConnectedWinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
Jeremy Likness
 
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Edureka!
 
Java J2EE Interview Question Part 2
Java J2EE Interview Question Part 2Java J2EE Interview Question Part 2
Java J2EE Interview Question Part 2
Mindsmapped Consulting
 
Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2
javatrainingonline
 
Spring tutorials
Spring tutorialsSpring tutorials
Spring tutorials
TIB Academy
 
70487.pdf
70487.pdf70487.pdf
70487.pdf
Karen Benoit
 
Cloud Powered Artificial Intelligence Evolution
Cloud Powered Artificial Intelligence EvolutionCloud Powered Artificial Intelligence Evolution
Cloud Powered Artificial Intelligence Evolution
Mohamed Belhassen
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
Gary Pedretti
 
Lec6 ecom fall16
Lec6 ecom fall16Lec6 ecom fall16
Lec6 ecom fall16
Zainab Khallouf
 
Module 5.ppt.............................
Module 5.ppt.............................Module 5.ppt.............................
Module 5.ppt.............................
Betty333100
 
Leverage Hibernate and Spring Features Together
Leverage Hibernate and Spring Features TogetherLeverage Hibernate and Spring Features Together
Leverage Hibernate and Spring Features Together
Edureka!
 
Webinar: Persistence with Hibernate - Portal Development & Text Searching wit...
Webinar: Persistence with Hibernate - Portal Development & Text Searching wit...Webinar: Persistence with Hibernate - Portal Development & Text Searching wit...
Webinar: Persistence with Hibernate - Portal Development & Text Searching wit...
Edureka!
 
Hibernate Interview Questions | Edureka
Hibernate Interview Questions | EdurekaHibernate Interview Questions | Edureka
Hibernate Interview Questions | Edureka
Edureka!
 
Hibernate Mapping on the Fly
Hibernate Mapping on the FlyHibernate Mapping on the Fly
Hibernate Mapping on the Fly
Edureka!
 
Webinar: Hibernate - the ultimate ORM framework
Webinar: Hibernate - the ultimate ORM frameworkWebinar: Hibernate - the ultimate ORM framework
Webinar: Hibernate - the ultimate ORM framework
Edureka!
 
Scaling the Content Repository with Elasticsearch
Scaling the Content Repository with ElasticsearchScaling the Content Repository with Elasticsearch
Scaling the Content Repository with Elasticsearch
Nuxeo
 
New-Age Search through Apache Solr
New-Age Search through Apache SolrNew-Age Search through Apache Solr
New-Age Search through Apache Solr
Edureka!
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
hchen1
 
Hibernate jj
Hibernate jjHibernate jj
Hibernate jj
Joe Jacob
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Toru Wonyoung Choi
 
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and ConnectedWinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
Jeremy Likness
 
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Webinar: Spring Framework - Introduction to Spring WebMVC & Spring with BigData
Edureka!
 
Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2
javatrainingonline
 
Spring tutorials
Spring tutorialsSpring tutorials
Spring tutorials
TIB Academy
 
Cloud Powered Artificial Intelligence Evolution
Cloud Powered Artificial Intelligence EvolutionCloud Powered Artificial Intelligence Evolution
Cloud Powered Artificial Intelligence Evolution
Mohamed Belhassen
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
Gary Pedretti
 
Module 5.ppt.............................
Module 5.ppt.............................Module 5.ppt.............................
Module 5.ppt.............................
Betty333100
 

More from Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!
 
What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!
 

Recently uploaded (20)

Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 

Effective Persistence Using ORM With Hibernate

  • 1. www.edureka.co/persistence-with-hibernate Effective Persistence Using ORM with Hibernate View Persistence with Hibernate course details at www.edureka.co/persistence-with-hibernate For Queries: Post on Twitter @edurekaIN: #askEdureka Post on Facebook /edurekaIN For more details please contact us: US : 1800 275 9730 (toll free) INDIA : +91 88808 62004 Email Us : [email protected]
  • 2. Slide 2 www.edureka.co/persistence-with-hibernate At the end of this webinar, you will be able to understand: Objectives  What is Java Enterprise  Java Enterprise architecture  Hibernate  Java EE with Hibernate  Easy persistence with Hibernate  Hibernate with Spring  Session & Transactions using Spring & Hibernate  Hibernate with search mechanism
  • 3. Slide 3 www.edureka.co/persistence-with-hibernate JavaEE – Enterprise Edition Provides collection of APIs and runtime environments to support Enterprise applications  Community driven software  Defines standard specifications which can be implemented by vendors Provides services for i) Persistence ii) Messaging iii) Web iv) Transactions Web services support using JAXRS(Rest) and JAXWS(SOAP)
  • 5. Slide 5 www.edureka.co/persistence-with-hibernate An Object relational mapping library of java language for Object persistence and SQL databases Found in 2001 by Gavin King Transparent persistence of java objects with relational database Provides query language in synch with SQL Open source library Provides solutions for object relational impedance mismatch problems Hibernate
  • 6. Slide 6 www.edureka.co/persistence-with-hibernate JavaEE with Hibernate Objective is to solve the complexities existed in EJB2 persistence architecture.  Provided an effective Java persistence API enabling hibernate to work with different databases easily  Annotations provide meta data about table column definitions at the model level.  Entities are developed independent of the underlying database Derby Mysql Oracle
  • 7. Slide 7 www.edureka.co/persistence-with-hibernate Provides a simple API for storing and retrieving Java objects directly to and from the database Non-intrusive: No need to follow specific rules or design patterns Transparent: Your object model is unaware Persistence using Hibernate JavaObject int id; String name; String getName() int getId() void setName(String) SQL Table id [int] primary key, name [varchar(50)], Magic Happens Here (O/R Mapper – i.e. Hibernate)
  • 8. Slide 8 www.edureka.co/persistence-with-hibernate DEMO : Ease of Persistence Using Hibernate
  • 9. Slide 9Slide 9Slide 9 www.edureka.co/persistence-with-hibernate Spring An open source framework Enables to build applications using POJO (Plain Old Java Objects) Handles the complete infrastructure required for application from end to end Makes development of JavaEE (Java EnterPrise Applications) easier Light weight and transparent Use of IOC Containers Supports ORM and Transaction Management
  • 10. Slide 10Slide 10Slide 10 www.edureka.co/persistence-with-hibernate Spring with Hibernate An extensive support for ORM frameworks like Hibernate , JPA Provides complete infrastructure for any ORM layer used in the application  IOC of spring handles the SessionFactory instances of hibernate Configurations of hibernate are taken care efficiently by spring application contexts Use of hibernate.cfg.xml can be taken care by spring applicationContext.xml Declarative Transaction management Built in support for exception handling
  • 11. Slide 11Slide 11Slide 11 www.edureka.co/persistence-with-hibernate Spring supports two different approach for transaction management: Programmatic Transaction Management » Transactions are managed by programming codes » Highly flexible » Difficult in maintenance » Spring TransactionTemplate is used for programmatic approach Declarative Transaction Management » Transactions are handled declaratively by XML or Annotation » Will have lesser impact with the code of application » Extensive support from Spring AOP » Most widely used Transaction Management with Spring
  • 12. Slide 12Slide 12Slide 12 www.edureka.co/persistence-with-hibernate Spring Aspect Oriented Programming enables to declare transaction declaratively with Aspect Aspect scatters across methods, class and even objects Can be used in xml and annotations AOP declarative transaction:- » Transaction-handling advice is created using <tx:advice/> and pointcut is defined to make transactional advice that matches all methods » Advice begins transaction on before calling the method » On successful execution of method advice commits the transaction » On failure advice rolls back Spring AOP Transaction Management <tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes> <tx:method name="create"/> </tx:attributes> </tx:advice> <aop:config> <aop:pointcut id="createOperation" expression="execution(* com.tutorialspoint.StudentJDBCTemplate.create (..))"/> <aop:advisor advice-ref="txAdvice" pointcut- ref="createOperation"/> </aop:config>
  • 13. Slide 13 www.edureka.co/persistence-with-hibernate DEMO : Spring Transaction Management Using Hibernate
  • 14. Slide 14Slide 14Slide 14 www.edureka.co/persistence-with-hibernate Hibernate OGM OGM – Object Grid Mapper It provides Java Persistence API (JPA) support for NoSQL Solutions Object Relational Mapping for NoSQL Databases Provides support for most of the NoSQL database types Scaling of Relational Databases with a NoSQL front end and with no change in domain model
  • 15. Slide 15Slide 15Slide 15 www.edureka.co/persistence-with-hibernate Hibernate OGM - Architecture
  • 17. Slide 17Slide 17Slide 17 www.edureka.co/persistence-with-hibernate An Apache library Full text search capability Developed on java API Query results are returned by relevance Fast ,flexible and stable Easy to integrate lucence search functionality to application Lucene
  • 18. Slide 18Slide 18Slide 18 www.edureka.co/persistence-with-hibernate One of the most base functionality of Lucene Fields in the documents are analyzed by the IndexWriter Creates/Updates the indexes Indexes created/updated are equivalently stored/updated in directory Lucene – Indexing
  • 19. Slide 19Slide 19Slide 19 www.edureka.co/persistence-with-hibernate Search operation is basically carried via IndexSearcher Directory having indexes are passed to IndexSearcher IndexSearcher reads the indexes in the directory with the help of IndexReader Query to search is created using the QueryParser Search performed with IndexSearcher against the query created by QueryParser IndexSeracher returns TopDocs which contains the complete search details Lucene – Search
  • 20. Slide 20Slide 20Slide 20 www.edureka.co/persistence-with-hibernate Even though Lucence provides very efficient search capabilities , suffers with several mismatches with domain object models Hibernate Search built on top of the Lucence search engine to address the short comings of lucence in domain object models Similarly to Hibernate which has been built in top of the SQL databases, Hibernate search built on top of Lucence Hibernate address the short comings of lucence in domain object models with annotations Manages entities when query made to database or as lucence query to index Hibernate Search Search Request
  • 21. Slide 21Slide 21Slide 21 www.edureka.co/persistence-with-hibernate DEMO - LUCENCE APPLICATION
  • 22. Slide 22 www.edureka.co/persistence-with-hibernate Course Topics  Module 1 » Introduction to ORM and Hibernate  Module 2 » Persistence and Session Factory  Module 3 » Association, Mapping & Inheritance  Module 4 » Criteria and Query Language  Module 5 » Transactions ,Filter and Performance  Module 6 » Search and Validation Framework  Module 7 » OGM, NoSQL and Spring  Module 8 » Project
  • 23. Slide 23 LIVE Online Class Class Recording in LMS 24/7 Post Class Support Module Wise Quiz Project Work Verifiable Certificate www.edureka.co/persistence-with-hibernate How it Works?