SlideShare una empresa de Scribd logo
Aldo Ariel Gómez.
Hibernate:
Conociendo una
herramienta ORM
Contenido
Definición de Persistencia
Definición de ORM
Definición de HIBERNATE
Porque usar ORM?
Primeros pasos con HIBERNATE
Conceptos sobre Persistencia y Rendimiento
Persistencia
ORM
Clase Alumnos
-id
-nombre
-edad
+setId()
+getId()
+setNombre()
+getNombre()
Tabla Alumnos
id nombre edad
ORM
ORM
● Tecnica de programacion y tecnologia
● Intermediario (Relacional – Orientado
Objetos)
● DML de forma transparente
Placa Color Marca Modelo
ORM
• Ventajas
● Simplicidad: Se interactua de la forma más
natural posible
● Transmitibilidad: Lenguaje simple al diseñar la
base de datos
● Presición: El modelo queda normalizado
ORM
•Desventajas
● Mayor complejidad de diseño (al inicio)
● Penalizacion del rendimiento
Retos de Mapeo
Mapeo Objeto-Relacional
•Muchos atributos en
distintas tablas.
Reservación
+ Cliente
+ Habitación
+ Tasa
Mapeo Objeto-Relacional
•Atibutos en un vector
de datos vrs. Valores
escalares.
1010 10
Usuario
+ ID
+ Nombre
+ Roles
¿Donde se recomienda?
● Escenarios OLTP (Gran volumen, poca
actualizacion)
● Si se trabaja con tecnologia orientada a
objetos y el rendimiento no es prioridad
● Bases de datos con pocos o ningun
procedimiento SQL para mostrar la
informacion
Hibernate
Hibernate
● Herramienta open source inicialmente
desarrollada para java
● Parte del proyecto Jboss (red hat)
● Programacion de POJO's
● HQL
● Licencia: LGPL
Hibernate
● Netbeans, soporte instantaneo
● Eclipse, soporte con plug-in
● Jdeveloper, soporte “ranger” (recomendado
Top-link)
Primeros pasos con JPA -Hibernate
• Obtener Hibernate ORM
• Crear proyecto Java
• Crear Modelo de dominios
• Implementar equals() y hashCode()
• Mapeo básico ORM
• Archivo persistence.xml
Primeros pasos con JPA -Hibernate
• Generar las tablas de BBDD
• El EntityManager
• Persistir objetos
• Buscando objetos
• Actualizando objetos
• Borrando objetos

Más contenido relacionado

Último

Expo sobre los tipos de transistores, su polaridad, y sus respectivas configu...
Expo sobre los tipos de transistores, su polaridad, y sus respectivas configu...Expo sobre los tipos de transistores, su polaridad, y sus respectivas configu...
Expo sobre los tipos de transistores, su polaridad, y sus respectivas configu...
LUISDAMIANSAMARRONCA
 
01-introduccion-a-la-perforacion.pdf de minas
01-introduccion-a-la-perforacion.pdf de minas01-introduccion-a-la-perforacion.pdf de minas
01-introduccion-a-la-perforacion.pdf de minas
ivan848686
 
choro ciclo de vida anatomía y fisiología
choro ciclo de vida anatomía y fisiologíachoro ciclo de vida anatomía y fisiología
choro ciclo de vida anatomía y fisiología
elvis2000x
 
A3QUIROZ,MANUEL- Operaciones Basicas- Construccion
A3QUIROZ,MANUEL- Operaciones Basicas- ConstruccionA3QUIROZ,MANUEL- Operaciones Basicas- Construccion
A3QUIROZ,MANUEL- Operaciones Basicas- Construccion
manuelalejandro238
 
PROCEDIMIENTO Y PLAN DE RESCATE PARA TRABAJOS EN ALTURAS (Recuperado automáti...
PROCEDIMIENTO Y PLAN DE RESCATE PARA TRABAJOS EN ALTURAS (Recuperado automáti...PROCEDIMIENTO Y PLAN DE RESCATE PARA TRABAJOS EN ALTURAS (Recuperado automáti...
PROCEDIMIENTO Y PLAN DE RESCATE PARA TRABAJOS EN ALTURAS (Recuperado automáti...
CarlitosWay20
 
PLAN DE TRABAJO DE REFUERZO ESCOLAR 2024.pdf
PLAN DE TRABAJO DE REFUERZO ESCOLAR 2024.pdfPLAN DE TRABAJO DE REFUERZO ESCOLAR 2024.pdf
PLAN DE TRABAJO DE REFUERZO ESCOLAR 2024.pdf
MariaCortezRuiz
 
1º Caso Practico Lubricacion Rodamiento Motor 10CV
1º Caso Practico Lubricacion Rodamiento Motor 10CV1º Caso Practico Lubricacion Rodamiento Motor 10CV
1º Caso Practico Lubricacion Rodamiento Motor 10CV
CarlosAroeira1
 
Sesiones 3 y 4 Estructuras Ingenieria.pdf
Sesiones 3 y 4 Estructuras Ingenieria.pdfSesiones 3 y 4 Estructuras Ingenieria.pdf
Sesiones 3 y 4 Estructuras Ingenieria.pdf
DeyvisPalomino2
 
ABR-FUNDAMENTOS DEL CALCULO uc 2024 ........
ABR-FUNDAMENTOS DEL CALCULO uc 2024 ........ABR-FUNDAMENTOS DEL CALCULO uc 2024 ........
ABR-FUNDAMENTOS DEL CALCULO uc 2024 ........
IVANBRIANCHOQUEHUANC
 
Aletas de Transferencia de Calor o Superficies Extendidas.pdf
Aletas de Transferencia de Calor o Superficies Extendidas.pdfAletas de Transferencia de Calor o Superficies Extendidas.pdf
Aletas de Transferencia de Calor o Superficies Extendidas.pdf
JuanAlbertoLugoMadri
 
Becas de UOC _ Caja Ingenieros 2024-25.pdf
Becas de UOC _ Caja Ingenieros 2024-25.pdfBecas de UOC _ Caja Ingenieros 2024-25.pdf
Becas de UOC _ Caja Ingenieros 2024-25.pdf
UOC Estudios de Informática, Multimedia y Telecomunicación
 
HITO DE CONTROL N° 011-2024-OCI5344-SCC SAN PATRICIO.pdf
HITO DE CONTROL N° 011-2024-OCI5344-SCC SAN PATRICIO.pdfHITO DE CONTROL N° 011-2024-OCI5344-SCC SAN PATRICIO.pdf
HITO DE CONTROL N° 011-2024-OCI5344-SCC SAN PATRICIO.pdf
GROVER MORENO
 
CIRCUITOS Y ESQUEMAS BASICOS UTILIZADOS EN LOGICA CABLEADA
CIRCUITOS Y ESQUEMAS BASICOS UTILIZADOS EN LOGICA CABLEADACIRCUITOS Y ESQUEMAS BASICOS UTILIZADOS EN LOGICA CABLEADA
CIRCUITOS Y ESQUEMAS BASICOS UTILIZADOS EN LOGICA CABLEADA
juan carlos gallo
 
INFORME DE DE CONTROL N° 009-2024-OCI5344-SCC LEBERTADOR SAN MARTIN OYON.pdf
INFORME DE DE CONTROL N° 009-2024-OCI5344-SCC LEBERTADOR SAN MARTIN OYON.pdfINFORME DE DE CONTROL N° 009-2024-OCI5344-SCC LEBERTADOR SAN MARTIN OYON.pdf
INFORME DE DE CONTROL N° 009-2024-OCI5344-SCC LEBERTADOR SAN MARTIN OYON.pdf
GROVER MORENO
 
OPERACIONPLANTA_CLASE14_CLASE15_BOMBAS_FLOTACIONSELECTIVA.pdf
OPERACIONPLANTA_CLASE14_CLASE15_BOMBAS_FLOTACIONSELECTIVA.pdfOPERACIONPLANTA_CLASE14_CLASE15_BOMBAS_FLOTACIONSELECTIVA.pdf
OPERACIONPLANTA_CLASE14_CLASE15_BOMBAS_FLOTACIONSELECTIVA.pdf
AlejandroContreras470286
 
Taller de Robots Velocistas2 esquema....
Taller de Robots Velocistas2 esquema....Taller de Robots Velocistas2 esquema....
Taller de Robots Velocistas2 esquema....
lawjose243
 
SESION 1 - SESION INTRODUCTORIA - INTRODUCCIÓN A LA PERFORACIÓN Y VOLADURA DE...
SESION 1 - SESION INTRODUCTORIA - INTRODUCCIÓN A LA PERFORACIÓN Y VOLADURA DE...SESION 1 - SESION INTRODUCTORIA - INTRODUCCIÓN A LA PERFORACIÓN Y VOLADURA DE...
SESION 1 - SESION INTRODUCTORIA - INTRODUCCIÓN A LA PERFORACIÓN Y VOLADURA DE...
JhonatanOQuionesChoq
 
Clasificacion geomecanica de Q de Barton
Clasificacion geomecanica de Q de BartonClasificacion geomecanica de Q de Barton
Clasificacion geomecanica de Q de Barton
edujunes132
 
Flujo vehicular en análisis de trafico vial
Flujo vehicular en análisis de trafico vialFlujo vehicular en análisis de trafico vial
Flujo vehicular en análisis de trafico vial
SamuelMendozaS
 
Ciclo de Otto. Máquinas térmicas para el estudio de la termodinámica química
Ciclo de Otto. Máquinas térmicas para el estudio de la termodinámica químicaCiclo de Otto. Máquinas térmicas para el estudio de la termodinámica química
Ciclo de Otto. Máquinas térmicas para el estudio de la termodinámica química
ycalful01
 

Último (20)

Expo sobre los tipos de transistores, su polaridad, y sus respectivas configu...
Expo sobre los tipos de transistores, su polaridad, y sus respectivas configu...Expo sobre los tipos de transistores, su polaridad, y sus respectivas configu...
Expo sobre los tipos de transistores, su polaridad, y sus respectivas configu...
 
01-introduccion-a-la-perforacion.pdf de minas
01-introduccion-a-la-perforacion.pdf de minas01-introduccion-a-la-perforacion.pdf de minas
01-introduccion-a-la-perforacion.pdf de minas
 
choro ciclo de vida anatomía y fisiología
choro ciclo de vida anatomía y fisiologíachoro ciclo de vida anatomía y fisiología
choro ciclo de vida anatomía y fisiología
 
A3QUIROZ,MANUEL- Operaciones Basicas- Construccion
A3QUIROZ,MANUEL- Operaciones Basicas- ConstruccionA3QUIROZ,MANUEL- Operaciones Basicas- Construccion
A3QUIROZ,MANUEL- Operaciones Basicas- Construccion
 
PROCEDIMIENTO Y PLAN DE RESCATE PARA TRABAJOS EN ALTURAS (Recuperado automáti...
PROCEDIMIENTO Y PLAN DE RESCATE PARA TRABAJOS EN ALTURAS (Recuperado automáti...PROCEDIMIENTO Y PLAN DE RESCATE PARA TRABAJOS EN ALTURAS (Recuperado automáti...
PROCEDIMIENTO Y PLAN DE RESCATE PARA TRABAJOS EN ALTURAS (Recuperado automáti...
 
PLAN DE TRABAJO DE REFUERZO ESCOLAR 2024.pdf
PLAN DE TRABAJO DE REFUERZO ESCOLAR 2024.pdfPLAN DE TRABAJO DE REFUERZO ESCOLAR 2024.pdf
PLAN DE TRABAJO DE REFUERZO ESCOLAR 2024.pdf
 
1º Caso Practico Lubricacion Rodamiento Motor 10CV
1º Caso Practico Lubricacion Rodamiento Motor 10CV1º Caso Practico Lubricacion Rodamiento Motor 10CV
1º Caso Practico Lubricacion Rodamiento Motor 10CV
 
Sesiones 3 y 4 Estructuras Ingenieria.pdf
Sesiones 3 y 4 Estructuras Ingenieria.pdfSesiones 3 y 4 Estructuras Ingenieria.pdf
Sesiones 3 y 4 Estructuras Ingenieria.pdf
 
ABR-FUNDAMENTOS DEL CALCULO uc 2024 ........
ABR-FUNDAMENTOS DEL CALCULO uc 2024 ........ABR-FUNDAMENTOS DEL CALCULO uc 2024 ........
ABR-FUNDAMENTOS DEL CALCULO uc 2024 ........
 
Aletas de Transferencia de Calor o Superficies Extendidas.pdf
Aletas de Transferencia de Calor o Superficies Extendidas.pdfAletas de Transferencia de Calor o Superficies Extendidas.pdf
Aletas de Transferencia de Calor o Superficies Extendidas.pdf
 
Becas de UOC _ Caja Ingenieros 2024-25.pdf
Becas de UOC _ Caja Ingenieros 2024-25.pdfBecas de UOC _ Caja Ingenieros 2024-25.pdf
Becas de UOC _ Caja Ingenieros 2024-25.pdf
 
HITO DE CONTROL N° 011-2024-OCI5344-SCC SAN PATRICIO.pdf
HITO DE CONTROL N° 011-2024-OCI5344-SCC SAN PATRICIO.pdfHITO DE CONTROL N° 011-2024-OCI5344-SCC SAN PATRICIO.pdf
HITO DE CONTROL N° 011-2024-OCI5344-SCC SAN PATRICIO.pdf
 
CIRCUITOS Y ESQUEMAS BASICOS UTILIZADOS EN LOGICA CABLEADA
CIRCUITOS Y ESQUEMAS BASICOS UTILIZADOS EN LOGICA CABLEADACIRCUITOS Y ESQUEMAS BASICOS UTILIZADOS EN LOGICA CABLEADA
CIRCUITOS Y ESQUEMAS BASICOS UTILIZADOS EN LOGICA CABLEADA
 
INFORME DE DE CONTROL N° 009-2024-OCI5344-SCC LEBERTADOR SAN MARTIN OYON.pdf
INFORME DE DE CONTROL N° 009-2024-OCI5344-SCC LEBERTADOR SAN MARTIN OYON.pdfINFORME DE DE CONTROL N° 009-2024-OCI5344-SCC LEBERTADOR SAN MARTIN OYON.pdf
INFORME DE DE CONTROL N° 009-2024-OCI5344-SCC LEBERTADOR SAN MARTIN OYON.pdf
 
OPERACIONPLANTA_CLASE14_CLASE15_BOMBAS_FLOTACIONSELECTIVA.pdf
OPERACIONPLANTA_CLASE14_CLASE15_BOMBAS_FLOTACIONSELECTIVA.pdfOPERACIONPLANTA_CLASE14_CLASE15_BOMBAS_FLOTACIONSELECTIVA.pdf
OPERACIONPLANTA_CLASE14_CLASE15_BOMBAS_FLOTACIONSELECTIVA.pdf
 
Taller de Robots Velocistas2 esquema....
Taller de Robots Velocistas2 esquema....Taller de Robots Velocistas2 esquema....
Taller de Robots Velocistas2 esquema....
 
SESION 1 - SESION INTRODUCTORIA - INTRODUCCIÓN A LA PERFORACIÓN Y VOLADURA DE...
SESION 1 - SESION INTRODUCTORIA - INTRODUCCIÓN A LA PERFORACIÓN Y VOLADURA DE...SESION 1 - SESION INTRODUCTORIA - INTRODUCCIÓN A LA PERFORACIÓN Y VOLADURA DE...
SESION 1 - SESION INTRODUCTORIA - INTRODUCCIÓN A LA PERFORACIÓN Y VOLADURA DE...
 
Clasificacion geomecanica de Q de Barton
Clasificacion geomecanica de Q de BartonClasificacion geomecanica de Q de Barton
Clasificacion geomecanica de Q de Barton
 
Flujo vehicular en análisis de trafico vial
Flujo vehicular en análisis de trafico vialFlujo vehicular en análisis de trafico vial
Flujo vehicular en análisis de trafico vial
 
Ciclo de Otto. Máquinas térmicas para el estudio de la termodinámica química
Ciclo de Otto. Máquinas térmicas para el estudio de la termodinámica químicaCiclo de Otto. Máquinas térmicas para el estudio de la termodinámica química
Ciclo de Otto. Máquinas térmicas para el estudio de la termodinámica química
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Hibernate conociendo una herramienta orm