0% found this document useful (0 votes)
22 views

Introduction To ORM: Hibernate

This document introduces object-relational mapping (ORM) and Hibernate. It discusses the mismatch between object-oriented programming and relational databases, and how ORM frameworks like Hibernate map objects to tables to resolve this mismatch. Hibernate is an open-source ORM that provides object/relational persistence and query services without requiring any application server, and includes features like caching, lazy loading, and vendor independence.

Uploaded by

Srinivas Reddy S
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Introduction To ORM: Hibernate

This document introduces object-relational mapping (ORM) and Hibernate. It discusses the mismatch between object-oriented programming and relational databases, and how ORM frameworks like Hibernate map objects to tables to resolve this mismatch. Hibernate is an open-source ORM that provides object/relational persistence and query services without requiring any application server, and includes features like caching, lazy loading, and vendor independence.

Uploaded by

Srinivas Reddy S
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Introduction to ORM

&
Hibernate
Application RDBMS

JAVA Oracle
MySql
.NET MS SQL
RDBMS
• E.F CODD
• STORAGE
• CONCURRENCY
• DATA INTEGRITY
• STRUCTURED DATA
• RETRIEVAL OF DATA
Object Oriented Programming
• Inheritance
• Polymorphism
• Abstraction
• Encapsulation
Comparison
public class Student{ CREATE TABLE
String name; STUDENT(
NAME VARCHAR(15) ,
int number; NUMBER INT PRIMARY KEY,
String collegeName; COLLEGE_NAME VARCHAR(15));

}
Mismatch
Object Oriented Relational Database
Programming
1. Inheritance 1. No inheritance

2. New data types are 2. UDT


Objects
3. Identity using == OR 3. Primary key
equals() method
4. Association using 4. Association using
Composition and Foreign key
Aggregation relationship
Cost of Mismatch
• SQL queries in JAVA programs
• Iterating the result set
• Exception Handling
• Transactions
• Caching
• Connection pooling
OBJECT REALATIONAL MAPPING
• Mapping objects and Tables
• CRUD operations by ORM Framework
• Lazy loading
• First Level Caching
• Vendor independence
Hibernate
• Open source
• Light weight
• No Application Server is needed
• First Level caching
• Second Level caching
Hibernate
• SessionFactory
• Session
• Transaction
• Query
• Criteria
Thank you
www.java9s.com

You might also like