SlideShare a Scribd company logo
1 of 17
JPA /
HIBERNATE
Sagar Verma
Sr.Software Engineer
Ad. JAVA
Object-Relational Mapping
• It is a programming technique for converting
object-type data of an object oriented
programming language into database tables.
• Hibernate is used convert object data in JAVA
to relational database tables.
What is Hibernate?
• It is open source object-relational mapping
(ORM) for Java.
• Hibernate is responsible for making data
persistent by storing it in a database.
Why Hibernate and not JDBC?
• JDBC maps Java classes to database tables (and from Java
data types to SQL data types)
• Hibernate automatically generates the SQL queries.
• Hibernate provides data query and retrieval facilities and can
significantly reduce development time as more time is
required to manually handle data in SQL and JDBC.
• It makes an application portable to all SQL databases.
Architecture
Hibernate sits between your
code and the database
Maps persistent objects to
tables in the database
Hibernate
• Configuration Object:
– The Configuration object is the first Hibernate object you create in any Hibernate
application and usually created only once during application initialization. The
Configuration object provides two keys components:
– Database Connection: This is handled through one or more configuration files
supported by Hibernate. These files are hibernate.properties and hibernate.cfg.xml.
– Class Mapping Setup
This component creates the connection between the Java classes and database tables.
• SessionFactory Object:
– Configuration object is used to create a SessionFactory object which inturn configures
Hibernate for the application using the supplied configuration file and allows for a
Session object to be instantiated.
– SessionFactory is a thread safe object and used by all the threads of an application.
– The SessionFactory is heavyweight object so usually it is created during application start
up and kept for later use.
– You would need one SessionFactory object per database using a separate configuration
file. So if you are using multiple databases then you would have to create multiple
SessionFactory objects.
Hibernate
• Session Object:
– A Session is used to get a physical connection with a database.
– It is lightweight and designed to be instantiated each time an interaction is
needed with the database. Persistent objects are saved and retrieved through a
Session object.
– The session objects should not be kept open for a long time because they are not
usually thread safe and they should be created and destroyed as needed.
• Transaction Object:
– A Transaction represents a unit of work with the database and most of the RDBMS
supports transaction functionality. Transactions in Hibernate are handled by an
underlying transaction manager and transaction (from JDBC or JTA).
– This is an optional object and Hibernate applications may choose not to use this
interface, instead managing transactions in their own application code.
• Query Object:
– Query objects use SQL or Hibernate Query Language (HQL) string to retrieve data
from the database and create objects. A Query instance is used to bind query
parameters and to execute the query.
WEB SERVICE
History of Web Service
• Structured programming
• Object-oriented programming
• Distributed computing
• Electronic data interchange
• World Wide Web
• Web services
What is Web Service?
• Web service is a standardized medium to
propagate communication between the client
and server applications on the World Wide Web.
• Web services provide a common platform that
allows multiple applications built on various
programming languages to have the ability to
communicate with each other
Architecture of Web Service
Type of Web Service?
• SOAP:
SOAP is known as the Simple Object Access Protocol.
SOAP was developed as an intermediate language so that
applications built on various programming languages could talk
quickly to each other and avoid the extreme development effort.
• WSDL:
WSDL is known as the Web Services Description Language(WSDL).
WSDL is an XML-based file which tells the client application what
the web service does and gives all the information required to
connect to the web service.
• REST:
REST stands for Representational State Transfer.
REST is used to build Web services that are lightweight,
maintainable, and scalable.
Advantage of Web Service?
• Exposing Business Functionality on the
network
• Interoperability amongst applications
• A Standardized Protocol which
everybody understands
• Reduction in cost of communication
Web Service Characteristics
• They are XML-Based
• Loosely Coupled
• Synchronous or
Asynchronous functionality
• Ability to support Remote Procedure
Calls (RPCs)
• Supports Document Exchange
Example
Soap Web service Rest Web service
References
• www.hibernate.org
• http://www.tutorialspoint.com/hibernate/hiberna
• https://www.javatpoint.com/web-services-tutoria
Thank You !!!
Feel free for asking a question
-- Sagar Verma

More Related Content

What's hot

Java 101 Intro to Java Programming
Java 101 Intro to Java ProgrammingJava 101 Intro to Java Programming
Java 101 Intro to Java Programmingagorolabs
 
Java - OOPS and Java Basics
Java - OOPS and Java BasicsJava - OOPS and Java Basics
Java - OOPS and Java BasicsVicter Paul
 
Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014 Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014 iimjobs and hirist
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java ProgrammingRavi Kant Sahu
 
Top 100 Java Interview Questions with Detailed Answers
Top 100 Java Interview Questions with Detailed AnswersTop 100 Java Interview Questions with Detailed Answers
Top 100 Java Interview Questions with Detailed AnswersWhizlabs
 
Core Java Introduction | Basics
Core Java Introduction  | BasicsCore Java Introduction  | Basics
Core Java Introduction | BasicsHùng Nguyễn Huy
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaEdureka!
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview QuestionsKuntal Bhowmick
 
Introduction to the Java(TM) Advanced Imaging API
Introduction to the Java(TM) Advanced Imaging APIIntroduction to the Java(TM) Advanced Imaging API
Introduction to the Java(TM) Advanced Imaging APIwhite paper
 

What's hot (18)

Presentation on java
Presentation  on  javaPresentation  on  java
Presentation on java
 
Java 101 Intro to Java Programming
Java 101 Intro to Java ProgrammingJava 101 Intro to Java Programming
Java 101 Intro to Java Programming
 
Core Java
Core JavaCore Java
Core Java
 
Core java
Core javaCore java
Core java
 
Basic java tutorial
Basic java tutorialBasic java tutorial
Basic java tutorial
 
Java - OOPS and Java Basics
Java - OOPS and Java BasicsJava - OOPS and Java Basics
Java - OOPS and Java Basics
 
Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014 Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Top 100 Java Interview Questions with Detailed Answers
Top 100 Java Interview Questions with Detailed AnswersTop 100 Java Interview Questions with Detailed Answers
Top 100 Java Interview Questions with Detailed Answers
 
Basic java part_ii
Basic java part_iiBasic java part_ii
Basic java part_ii
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Java & advanced java
Java & advanced javaJava & advanced java
Java & advanced java
 
Core Java Tutorial
Core Java TutorialCore Java Tutorial
Core Java Tutorial
 
Core Java Introduction | Basics
Core Java Introduction  | BasicsCore Java Introduction  | Basics
Core Java Introduction | Basics
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
 
Java training in delhi
Java training in delhiJava training in delhi
Java training in delhi
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview Questions
 
Introduction to the Java(TM) Advanced Imaging API
Introduction to the Java(TM) Advanced Imaging APIIntroduction to the Java(TM) Advanced Imaging API
Introduction to the Java(TM) Advanced Imaging API
 

Similar to Hibernate introduction

Free Hibernate Tutorial | VirtualNuggets
Free Hibernate Tutorial  | VirtualNuggetsFree Hibernate Tutorial  | VirtualNuggets
Free Hibernate Tutorial | VirtualNuggetsVirtual Nuggets
 
UNIT V DIS.pptx
UNIT V DIS.pptxUNIT V DIS.pptx
UNIT V DIS.pptxSamPrem3
 
The Best Local Database for React Native Application Development .pdf
The Best Local Database for React Native Application Development .pdfThe Best Local Database for React Native Application Development .pdf
The Best Local Database for React Native Application Development .pdfTechugo
 
List of Top Local Databases used for react native app developement in 2022
List of Top Local Databases used for react native app developement in 2022					List of Top Local Databases used for react native app developement in 2022
List of Top Local Databases used for react native app developement in 2022 Shelly Megan
 
Java hibernate orm implementation tool
Java hibernate   orm implementation toolJava hibernate   orm implementation tool
Java hibernate orm implementation tooljavaease
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersBoom Shukla
 
Top 7 React Native Databases For App Development
Top 7 React Native Databases For App DevelopmentTop 7 React Native Databases For App Development
Top 7 React Native Databases For App Developmentsimonedaniels3
 

Similar to Hibernate introduction (20)

Hibernate training-topics
Hibernate training-topicsHibernate training-topics
Hibernate training-topics
 
What is hibernate?
What is hibernate?What is hibernate?
What is hibernate?
 
Hibernate
HibernateHibernate
Hibernate
 
What is hibernate?
What is hibernate?What is hibernate?
What is hibernate?
 
What is hibernate?
What is hibernate?What is hibernate?
What is hibernate?
 
Free Hibernate Tutorial | VirtualNuggets
Free Hibernate Tutorial  | VirtualNuggetsFree Hibernate Tutorial  | VirtualNuggets
Free Hibernate Tutorial | VirtualNuggets
 
Hibernate
HibernateHibernate
Hibernate
 
Hibernate
HibernateHibernate
Hibernate
 
UNIT V DIS.pptx
UNIT V DIS.pptxUNIT V DIS.pptx
UNIT V DIS.pptx
 
The Best Local Database for React Native Application Development .pdf
The Best Local Database for React Native Application Development .pdfThe Best Local Database for React Native Application Development .pdf
The Best Local Database for React Native Application Development .pdf
 
List of Top Local Databases used for react native app developement in 2022
List of Top Local Databases used for react native app developement in 2022					List of Top Local Databases used for react native app developement in 2022
List of Top Local Databases used for react native app developement in 2022
 
Introduction to Hibernate
Introduction to HibernateIntroduction to Hibernate
Introduction to Hibernate
 
Wt unit 6 ppts web services
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web services
 
Webapplication ppt prepared by krishna ballabh gupta
Webapplication ppt prepared by krishna ballabh guptaWebapplication ppt prepared by krishna ballabh gupta
Webapplication ppt prepared by krishna ballabh gupta
 
Hibernate in Action
Hibernate in ActionHibernate in Action
Hibernate in Action
 
Hibernate tutorial
Hibernate tutorialHibernate tutorial
Hibernate tutorial
 
Java hibernate orm implementation tool
Java hibernate   orm implementation toolJava hibernate   orm implementation tool
Java hibernate orm implementation tool
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Devjyotippt
DevjyotipptDevjyotippt
Devjyotippt
 
Top 7 React Native Databases For App Development
Top 7 React Native Databases For App DevelopmentTop 7 React Native Databases For App Development
Top 7 React Native Databases For App Development
 

More from Sagar Verma

Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...Sagar Verma
 
Statics in java | Constructors | Exceptions in Java | String in java| class 3
Statics in java | Constructors | Exceptions in Java | String in java| class 3Statics in java | Constructors | Exceptions in Java | String in java| class 3
Statics in java | Constructors | Exceptions in Java | String in java| class 3Sagar Verma
 
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...Sagar Verma
 
Core Java Programming | Data Type | operator | java Control Flow| Class 2
Core Java Programming | Data Type | operator | java Control Flow| Class 2Core Java Programming | Data Type | operator | java Control Flow| Class 2
Core Java Programming | Data Type | operator | java Control Flow| Class 2Sagar Verma
 
Springboot introduction
Springboot introductionSpringboot introduction
Springboot introductionSagar Verma
 
2015-16 software project list
2015-16 software project list2015-16 software project list
2015-16 software project listSagar Verma
 
Ns2 new project list
Ns2 new project listNs2 new project list
Ns2 new project listSagar Verma
 
Privacy preserving dm_ppt
Privacy preserving dm_pptPrivacy preserving dm_ppt
Privacy preserving dm_pptSagar Verma
 

More from Sagar Verma (8)

Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
 
Statics in java | Constructors | Exceptions in Java | String in java| class 3
Statics in java | Constructors | Exceptions in Java | String in java| class 3Statics in java | Constructors | Exceptions in Java | String in java| class 3
Statics in java | Constructors | Exceptions in Java | String in java| class 3
 
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
 
Core Java Programming | Data Type | operator | java Control Flow| Class 2
Core Java Programming | Data Type | operator | java Control Flow| Class 2Core Java Programming | Data Type | operator | java Control Flow| Class 2
Core Java Programming | Data Type | operator | java Control Flow| Class 2
 
Springboot introduction
Springboot introductionSpringboot introduction
Springboot introduction
 
2015-16 software project list
2015-16 software project list2015-16 software project list
2015-16 software project list
 
Ns2 new project list
Ns2 new project listNs2 new project list
Ns2 new project list
 
Privacy preserving dm_ppt
Privacy preserving dm_pptPrivacy preserving dm_ppt
Privacy preserving dm_ppt
 

Recently uploaded

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 

Recently uploaded (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 

Hibernate introduction

  • 2. Object-Relational Mapping • It is a programming technique for converting object-type data of an object oriented programming language into database tables. • Hibernate is used convert object data in JAVA to relational database tables.
  • 3. What is Hibernate? • It is open source object-relational mapping (ORM) for Java. • Hibernate is responsible for making data persistent by storing it in a database.
  • 4. Why Hibernate and not JDBC? • JDBC maps Java classes to database tables (and from Java data types to SQL data types) • Hibernate automatically generates the SQL queries. • Hibernate provides data query and retrieval facilities and can significantly reduce development time as more time is required to manually handle data in SQL and JDBC. • It makes an application portable to all SQL databases.
  • 5. Architecture Hibernate sits between your code and the database Maps persistent objects to tables in the database
  • 6. Hibernate • Configuration Object: – The Configuration object is the first Hibernate object you create in any Hibernate application and usually created only once during application initialization. The Configuration object provides two keys components: – Database Connection: This is handled through one or more configuration files supported by Hibernate. These files are hibernate.properties and hibernate.cfg.xml. – Class Mapping Setup This component creates the connection between the Java classes and database tables. • SessionFactory Object: – Configuration object is used to create a SessionFactory object which inturn configures Hibernate for the application using the supplied configuration file and allows for a Session object to be instantiated. – SessionFactory is a thread safe object and used by all the threads of an application. – The SessionFactory is heavyweight object so usually it is created during application start up and kept for later use. – You would need one SessionFactory object per database using a separate configuration file. So if you are using multiple databases then you would have to create multiple SessionFactory objects.
  • 7. Hibernate • Session Object: – A Session is used to get a physical connection with a database. – It is lightweight and designed to be instantiated each time an interaction is needed with the database. Persistent objects are saved and retrieved through a Session object. – The session objects should not be kept open for a long time because they are not usually thread safe and they should be created and destroyed as needed. • Transaction Object: – A Transaction represents a unit of work with the database and most of the RDBMS supports transaction functionality. Transactions in Hibernate are handled by an underlying transaction manager and transaction (from JDBC or JTA). – This is an optional object and Hibernate applications may choose not to use this interface, instead managing transactions in their own application code. • Query Object: – Query objects use SQL or Hibernate Query Language (HQL) string to retrieve data from the database and create objects. A Query instance is used to bind query parameters and to execute the query.
  • 9. History of Web Service • Structured programming • Object-oriented programming • Distributed computing • Electronic data interchange • World Wide Web • Web services
  • 10. What is Web Service? • Web service is a standardized medium to propagate communication between the client and server applications on the World Wide Web. • Web services provide a common platform that allows multiple applications built on various programming languages to have the ability to communicate with each other
  • 12. Type of Web Service? • SOAP: SOAP is known as the Simple Object Access Protocol. SOAP was developed as an intermediate language so that applications built on various programming languages could talk quickly to each other and avoid the extreme development effort. • WSDL: WSDL is known as the Web Services Description Language(WSDL). WSDL is an XML-based file which tells the client application what the web service does and gives all the information required to connect to the web service. • REST: REST stands for Representational State Transfer. REST is used to build Web services that are lightweight, maintainable, and scalable.
  • 13. Advantage of Web Service? • Exposing Business Functionality on the network • Interoperability amongst applications • A Standardized Protocol which everybody understands • Reduction in cost of communication
  • 14. Web Service Characteristics • They are XML-Based • Loosely Coupled • Synchronous or Asynchronous functionality • Ability to support Remote Procedure Calls (RPCs) • Supports Document Exchange
  • 15. Example Soap Web service Rest Web service
  • 17. Thank You !!! Feel free for asking a question -- Sagar Verma