Movatterモバイル変換


[0]ホーム

URL:


Brett Meyer, profile picture
Uploaded byBrett Meyer
ODP, PDF71,749 views

ORM, JPA, & Hibernate Overview

Brett Meyer gave an overview of Hibernate ORM and JPA. He discussed that ORM maps Java objects to relational databases for persistence beyond the life of a program. JPA is the Java standard for ORM that provides portability, while Hibernate is a full-featured JPA implementation with additional native features. Hibernate allows focusing on business logic rather than data access details and provides performance, concurrency, and extensibility benefits over traditional JDBC usage.

Embed presentation

Downloaded 1,178 times
Hibernate ORM& JPA OverviewBrett MeyerSenior Software EngineerHibernate ORM, Red Hat
Brett Meyer• JBoss Overlord (SOA Governance)• Hibernate ORM– ORM 4 & 5 development– Hibernate OSGi– Developer community engagement– Red Hat support, Hibernate engineering lead• Other contributions– Apache Camel– Infinispan• Contact me– @brettemeyer or +brettmeyer– Freenode IRC: brmeyer
github.com/brmeyer/HibernateDemosslideshare.net/brmeyer
ORM? JPA?• ORM: Object/Relational Mapping• JPA: Java Persistence API• Hibernate ORM provides its own nativeAPI, in addition to full JPA support• Annotations and XML
Overview• JDBC• Why ORM?• Why JPA?• Hibernate ORM• Demos
JDBC
JDBC• “Java Database Connectivity”• Java SE library for querying/updating databasedata• Mainly focused on relational DBs• Manages Connections to the DB, either directlyor through a 3rdparty “Connection Pool”• Database vendors provide their own JDBCdriver libraries
JDBC (cont'd)• API abstracts common interactions,data types, etc.• Execute SQL through “Statements”• Query returns received through“ResultSets”• Transactional• Cacheable
JDBC Demo
Why ORM?
ORM• “Object/Relational Mapping”• “Persistence”: Data objects outlive theJVM app• Maps Java POJOs to relationaldatabases (one type of “persistence”)
Why ORM?• “Domain Model” pattern– Focus on business concepts, not relational DBstructure– Interconnected objects– Each object is a meaningful individual/concept– OO concepts: inheritance, object identity, etc.– Navigate data by walking the object graph, not theexplicit relational model
Why ORM? (cont'd)• Increased development speed &reduced code– No “by-hand” mapping of JDBC ResultSetsto POJOs– Less work synchronizing code withrelational DB changes– Less JBDC boilerplate (repetitious CRUD)– Focus on business logic
Why ORM? (cont'd)• Portability– Mostly DB independent (exception: sometypes of features, identifier generation,etc.)– Query abstractions (OO APIs, OO-structured languages, etc.)– Vendor-specific SQL is auto generated
Why ORM? (cont'd)• Performance– Granular control of “when”, “how”, “how much”data/relationships to load, based on the business logic– Object and query caching• Concurrency & multiple-tenancy• Transactional• Scalable• Extendable (many types of extension points)
ORM FUD• “ORMs are slow and generally awful.”– http://www.slideshare.net/brmeyer/hibernate-orm• “ORMs are over complicated.”– Back in the EJB/XML days, maybe.– Annotations FTW!
ORM Demo
Why JPA?
JPA• “Java Persistence API”• JSR 317 (2.0) & JSR 338 (2.1)• Included in both Java SE & Java EE• Provides portability between JPAimplementations (with caveats)• Same ORM concepts, but standardizedAPI and query language (JPQL)
JPA Demo
Hibernate ORM
Hibernate ORM• JPA implementation and 100% TCK compliant• “Native” features– HQL (Hibernate Query Language): similar to JPQL, butextended– Criteria API– Performance: Fetch strategies, caching, bytecodeenhancement, etc.– Extension points– Rich tool set (schema generation/validation, etc.)• Part of JBoss Community
Hibernate Family• Not just ORM• Hibernate Spatial• Hibernate Envers• Hibernate OSGi• Hibernate Search• Hibernate OGM• Hibernate Validator• Hibernate Shards• http://www.slideshare.net/brmeyer/hibernate-orm-features
We've barelyscratched thesurface!
How to Help:hibernate.org/orm/contribute
QUESTIONS?• Q&A• Freenode IRC: brmeyer• @brettemeyer• +brettmeyer

Recommended

PPT
Hibernate
 
PPTX
Spring boot
PDF
Spring boot jpa
PDF
Spring Framework - AOP
PDF
What is REST API? REST API Concepts and Examples | Edureka
PDF
Spring Boot
PDF
Spring Framework - Spring Security
PDF
Spring Boot
PPTX
Web api
PPTX
Spring boot - an introduction
PPTX
Spring boot
 
PDF
Api presentation
PDF
Microservices with Java, Spring Boot and Spring Cloud
PDF
Microservices
PPTX
Autoscaling Flink with Reactive Mode
PDF
Apache Camel Introduction
PPTX
Rest API Security
PPTX
Java Spring
PDF
Vault 101
PPSX
Microservices Docker Kubernetes Istio Kanban DevOps SRE
PDF
Spring Framework - Core
PPTX
Spring Boot Tutorial
PDF
Microservice With Spring Boot and Spring Cloud
PPSX
Spring - Part 1 - IoC, Di and Beans
PPTX
Lightning web components
PPTX
Secure your app with keycloak
PDF
Mutiny + quarkus
PPTX
Spring Boot
PDF
Orm loveandhate
PPT
Dao benchmark

More Related Content

PPT
Hibernate
 
PPTX
Spring boot
PDF
Spring boot jpa
PDF
Spring Framework - AOP
PDF
What is REST API? REST API Concepts and Examples | Edureka
PDF
Spring Boot
PDF
Spring Framework - Spring Security
PDF
Spring Boot
Hibernate
 
Spring boot
Spring boot jpa
Spring Framework - AOP
What is REST API? REST API Concepts and Examples | Edureka
Spring Boot
Spring Framework - Spring Security
Spring Boot

What's hot

PPTX
Web api
PPTX
Spring boot - an introduction
PPTX
Spring boot
 
PDF
Api presentation
PDF
Microservices with Java, Spring Boot and Spring Cloud
PDF
Microservices
PPTX
Autoscaling Flink with Reactive Mode
PDF
Apache Camel Introduction
PPTX
Rest API Security
PPTX
Java Spring
PDF
Vault 101
PPSX
Microservices Docker Kubernetes Istio Kanban DevOps SRE
PDF
Spring Framework - Core
PPTX
Spring Boot Tutorial
PDF
Microservice With Spring Boot and Spring Cloud
PPSX
Spring - Part 1 - IoC, Di and Beans
PPTX
Lightning web components
PPTX
Secure your app with keycloak
PDF
Mutiny + quarkus
PPTX
Spring Boot
Web api
Spring boot - an introduction
Spring boot
 
Api presentation
Microservices with Java, Spring Boot and Spring Cloud
Microservices
Autoscaling Flink with Reactive Mode
Apache Camel Introduction
Rest API Security
Java Spring
Vault 101
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Spring Framework - Core
Spring Boot Tutorial
Microservice With Spring Boot and Spring Cloud
Spring - Part 1 - IoC, Di and Beans
Lightning web components
Secure your app with keycloak
Mutiny + quarkus
Spring Boot

Similar to ORM, JPA, & Hibernate Overview

PDF
Orm loveandhate
PPT
Dao benchmark
PDF
Free Hibernate Tutorial | VirtualNuggets
PPT
Object-Relational Mapping (ORM) in EJB.ppt
PPTX
Hibernate ORM over JDBC
PDF
Not Just ORM: Powerful Hibernate ORM Features and Capabilities
PDF
ITB2017 - Slaying the ORM dragons with cborm
PPTX
Hibernate_ORM_JPA Hibernate_ORM_JPA.pptx
PPTX
Hibernate in Action
PPTX
What is Hibernate Framework?
PPTX
Advance java session 5
PPT
585287jjkkklllllllll iiijilhffgjjjhjjjhgfghj
PDF
Evolution of database access technologies in Java-based software projects
PPTX
Module-3 for career and JFSD ppt for study.pptx
PPT
Introduction to Object-Relational Mapping
PPT
Hibernate introduction
PPT
Hibernate
PPT
jpa-hibernate-presentation
PDF
Killing Shark-Riding Dinosaurs with ORM
PPTX
What Is an ORM and How Does It Work? | Hyperlink InfoSystem
Orm loveandhate
Dao benchmark
Free Hibernate Tutorial | VirtualNuggets
Object-Relational Mapping (ORM) in EJB.ppt
Hibernate ORM over JDBC
Not Just ORM: Powerful Hibernate ORM Features and Capabilities
ITB2017 - Slaying the ORM dragons with cborm
Hibernate_ORM_JPA Hibernate_ORM_JPA.pptx
Hibernate in Action
What is Hibernate Framework?
Advance java session 5
585287jjkkklllllllll iiijilhffgjjjhjjjhgfghj
Evolution of database access technologies in Java-based software projects
Module-3 for career and JFSD ppt for study.pptx
Introduction to Object-Relational Mapping
Hibernate introduction
Hibernate
jpa-hibernate-presentation
Killing Shark-Riding Dinosaurs with ORM
What Is an ORM and How Does It Work? | Hyperlink InfoSystem

Recently uploaded

PDF
[BDD 2025 - Full-Stack Development] Agentic AI Architecture: Redefining Syste...
PDF
Running Non-Cloud-Native Databases in Cloud-Native Environments_ Challenges a...
PDF
Open Source Post-Quantum Cryptography - Matt Caswell
PDF
Top Crypto Supers 15th Report November 2025
PDF
Mastering Agentic Orchestration with UiPath Maestro | Hands on Workshop
PDF
Beyond Basics: How to Build Scalable, Intelligent Imagery Pipelines
PPTX
UFCD 0797 - SISTEMAS OPERATIVOS_Unidade Completa.pptx
PDF
Cheryl Hung, Vibe Coding Auth Without Melting Down! isaqb Software Architectu...
PDF
Oracle MySQL HeatWave - One Page - Version 3
PDF
[BDD 2025 - Mobile Development] Crafting Immersive UI with E2E and AGSL Shade...
PDF
Transcript: The partnership effect: Libraries and publishers on collaborating...
PDF
MuleSoft Meetup: Dreamforce'25 Tour- Vibing With AI & Agents.pdf
PPTX
Connecting the unconnectable: Exploring LoRaWAN for IoT
PDF
Top 10 AI Development Companies in UK 2025
PDF
Dev Dives: Build smarter agents with UiPath Agent Builder
PDF
Crane Accident Prevention Guide: Key OSHA Regulations for Safer Operations
PDF
The partnership effect: Libraries and publishers on collaborating and thrivin...
PDF
Oracle MySQL HeatWave - Complete - Version 3
PDF
KMWorld - KM & AI Bring Collectivity, Nostalgia, & Selectivity
PDF
"DISC as GPS for team leaders: how to lead a team from storming to performing...
 
[BDD 2025 - Full-Stack Development] Agentic AI Architecture: Redefining Syste...
Running Non-Cloud-Native Databases in Cloud-Native Environments_ Challenges a...
Open Source Post-Quantum Cryptography - Matt Caswell
Top Crypto Supers 15th Report November 2025
Mastering Agentic Orchestration with UiPath Maestro | Hands on Workshop
Beyond Basics: How to Build Scalable, Intelligent Imagery Pipelines
UFCD 0797 - SISTEMAS OPERATIVOS_Unidade Completa.pptx
Cheryl Hung, Vibe Coding Auth Without Melting Down! isaqb Software Architectu...
Oracle MySQL HeatWave - One Page - Version 3
[BDD 2025 - Mobile Development] Crafting Immersive UI with E2E and AGSL Shade...
Transcript: The partnership effect: Libraries and publishers on collaborating...
MuleSoft Meetup: Dreamforce'25 Tour- Vibing With AI & Agents.pdf
Connecting the unconnectable: Exploring LoRaWAN for IoT
Top 10 AI Development Companies in UK 2025
Dev Dives: Build smarter agents with UiPath Agent Builder
Crane Accident Prevention Guide: Key OSHA Regulations for Safer Operations
The partnership effect: Libraries and publishers on collaborating and thrivin...
Oracle MySQL HeatWave - Complete - Version 3
KMWorld - KM & AI Bring Collectivity, Nostalgia, & Selectivity
"DISC as GPS for team leaders: how to lead a team from storming to performing...
 

ORM, JPA, & Hibernate Overview

  • 1.
    Hibernate ORM& JPAOverviewBrett MeyerSenior Software EngineerHibernate ORM, Red Hat
  • 2.
    Brett Meyer• JBossOverlord (SOA Governance)• Hibernate ORM– ORM 4 & 5 development– Hibernate OSGi– Developer community engagement– Red Hat support, Hibernate engineering lead• Other contributions– Apache Camel– Infinispan• Contact me– @brettemeyer or +brettmeyer– Freenode IRC: brmeyer
  • 3.
  • 4.
    ORM? JPA?• ORM:Object/Relational Mapping• JPA: Java Persistence API• Hibernate ORM provides its own nativeAPI, in addition to full JPA support• Annotations and XML
  • 5.
    Overview• JDBC• WhyORM?• Why JPA?• Hibernate ORM• Demos
  • 6.
  • 7.
    JDBC• “Java DatabaseConnectivity”• Java SE library for querying/updating databasedata• Mainly focused on relational DBs• Manages Connections to the DB, either directlyor through a 3rdparty “Connection Pool”• Database vendors provide their own JDBCdriver libraries
  • 8.
    JDBC (cont'd)• APIabstracts common interactions,data types, etc.• Execute SQL through “Statements”• Query returns received through“ResultSets”• Transactional• Cacheable
  • 9.
  • 10.
  • 11.
    ORM• “Object/Relational Mapping”•“Persistence”: Data objects outlive theJVM app• Maps Java POJOs to relationaldatabases (one type of “persistence”)
  • 12.
    Why ORM?• “DomainModel” pattern– Focus on business concepts, not relational DBstructure– Interconnected objects– Each object is a meaningful individual/concept– OO concepts: inheritance, object identity, etc.– Navigate data by walking the object graph, not theexplicit relational model
  • 13.
    Why ORM? (cont'd)•Increased development speed &reduced code– No “by-hand” mapping of JDBC ResultSetsto POJOs– Less work synchronizing code withrelational DB changes– Less JBDC boilerplate (repetitious CRUD)– Focus on business logic
  • 14.
    Why ORM? (cont'd)•Portability– Mostly DB independent (exception: sometypes of features, identifier generation,etc.)– Query abstractions (OO APIs, OO-structured languages, etc.)– Vendor-specific SQL is auto generated
  • 15.
    Why ORM? (cont'd)•Performance– Granular control of “when”, “how”, “how much”data/relationships to load, based on the business logic– Object and query caching• Concurrency & multiple-tenancy• Transactional• Scalable• Extendable (many types of extension points)
  • 16.
    ORM FUD• “ORMsare slow and generally awful.”– http://www.slideshare.net/brmeyer/hibernate-orm• “ORMs are over complicated.”– Back in the EJB/XML days, maybe.– Annotations FTW!
  • 17.
  • 18.
  • 19.
    JPA• “Java PersistenceAPI”• JSR 317 (2.0) & JSR 338 (2.1)• Included in both Java SE & Java EE• Provides portability between JPAimplementations (with caveats)• Same ORM concepts, but standardizedAPI and query language (JPQL)
  • 20.
  • 21.
  • 22.
    Hibernate ORM• JPAimplementation and 100% TCK compliant• “Native” features– HQL (Hibernate Query Language): similar to JPQL, butextended– Criteria API– Performance: Fetch strategies, caching, bytecodeenhancement, etc.– Extension points– Rich tool set (schema generation/validation, etc.)• Part of JBoss Community
  • 23.
    Hibernate Family• Notjust ORM• Hibernate Spatial• Hibernate Envers• Hibernate OSGi• Hibernate Search• Hibernate OGM• Hibernate Validator• Hibernate Shards• http://www.slideshare.net/brmeyer/hibernate-orm-features
  • 24.
  • 25.
  • 26.
    QUESTIONS?• Q&A• FreenodeIRC: brmeyer• @brettemeyer• +brettmeyer

[8]ページ先頭

©2009-2025 Movatter.jp