Presentation is loading. Please wait.

Presentation is loading. Please wait.

Session-01. Hibernate Framework ? Why we use Hibernate ?

Similar presentations


Presentation on theme: "Session-01. Hibernate Framework ? Why we use Hibernate ?"— Presentation transcript:

1 Session-01

2 Hibernate Framework ?

3 Why we use Hibernate ?

4 Example-1 JDBC MYSQL SQL SERVER Oracle MYSQL Query SQL SERVER Query ORACLE Query

5 Result

6 Example-2 JDBC MYSQL Load DB Driver Get Connection Create Statement SQL Query SQL Result Set Oracle Load DB Driver Get Connection Create Statement SQL Query SQL Result Set

7 Result

8 Example-3 MYSQL JDBC CODE FOR MYSQL A.javaA.class ORACLE JDBC CODE FOR ORACLE A.javaA.class Compile Recompile

9 Result

10 Solution?

11 Solution-1 & 2 Hibernate(ORM) MYSQL SQL SERVER Oracle MYSQL Dialect SQL SERVER Dialect ORACLE Dialect HQL

12 Solution-3 Hibernate Configuration File Hibernate Configuration File A.class Compile MYSQL XML A.class Oracle SQL Server Compile

13 Pros and Cons of JDBC

14 Solution... ORM

15 What is ORM? ORM stands for Object-Relational Mapping (ORM) is a programming technique for converting data between relational databases and object oriented programming languages such as Java, C# etc.

16 Continue...

17 Java ORM Frameworks:

18 Hibernate Overview Hibernate framework simplifies the development of java application to interact with the database. Hibernate is an open source, lightweight ORM tool.

19 Advantages of Hibernate Framework 1) Opensource and Lightweight 2) Fast performance: The performance of hibernate framework is fast because cache is internally used in hibernate framework. 3) Database Independent query: HQL (Hibernate Query Language) is the object-oriented version of SQL. 4) Au tomatic table creation 5) Simplifies complex join To fetch data form multiple tables is easy in hibernate framework.

20 Hibernate Architecture There are 4 layers in hibernate architecture :

21 Elements of Hibernate Architecture Connection Provider

22 Example


Download ppt "Session-01. Hibernate Framework ? Why we use Hibernate ?"

Similar presentations


Ads by Google