Hibernate(H8) In Action

2,398 views

Published on

What is Hibernate?

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,398
On SlideShare
0
From Embeds
0
Number of Embeds
30
Actions
Shares
0
Downloads
280
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Hibernate(H8) In Action

  1. 1. HIBERNATE(H8) IN ACTION Priyank Kapadia
  2. 2. WHAT ARE WE TALKING ABOUT <ul><li>Persistence </li></ul><ul><li>Hibernate </li></ul><ul><li>ORM(Object Relation Mapping) </li></ul><ul><ul><li>Everything is objects and not a ResultSet or a RecordSet . </li></ul></ul>
  3. 3. PERSISTENCE UNVEILED <ul><li>The storage of an object on a disk or other permanent storage device as opposed to transient data </li></ul><ul><li>Persisting data = Durable </li></ul><ul><ul><li>Integrity maintained </li></ul></ul><ul><li>Persistence generally implies use of a database </li></ul><ul><ul><li>Even file system can be used, needs to handled well </li></ul></ul>
  4. 4. PERSISTENCE CLASS
  5. 5. O/R MAPPING <ul><li>Programming technique for converting data between incompatible type systems in databases and OOP languages. </li></ul><ul><li>“ Database of Objects” which can be used by the developers using a programming language </li></ul><ul><li>Commercial packages as well Open Source Packages available that perform OR (Object Relation) mapping </li></ul>
  6. 6. ORM VISUALIZED
  7. 7. JAVA OBJECTS VS. DATABASE Java Object int _id; String _desciption; String getDescription () int getId() void setDescription(String) void setId(int) SQL Table id primary key, Description varchar2(50) Magic Happens Here (O/R Mapping – i.e. Hibernate)
  8. 8. HIBERNATE ?? <ul><li>Hibernate is an object-relational mapping (ORM) solution for the Java language. </li></ul><ul><li>It is free, open source software that is distributed under the GNU Lesser General Public License. </li></ul><ul><li>It provides an easy to use framework for mapping an object-oriented domain model to a relational database </li></ul><ul><li>Maintained by Jboss Inc. </li></ul>
  9. 9. HIBERNATE SIMPLIFIED <ul><li>H8 is between the DB & code </li></ul><ul><li>Maps Persistent objects to tables </li></ul>
  10. 10. SO WHAT? FEATURES? <ul><li>Hibernate not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), </li></ul><ul><li>Provides data query and retrieval facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC. </li></ul><ul><li>Hibernate generates the SQL calls and relieves the developer from manual result set handling and object conversion, keeping the application portable to all SQL databases. </li></ul>
  11. 11. ADVANTAGES <ul><li>Industry recognizes these as why we should use hibernate </li></ul><ul><ul><li>Support for Query Language </li></ul></ul><ul><ul><li>Database Dependent Code </li></ul></ul><ul><ul><li>Maintenance Cost </li></ul></ul><ul><ul><li>Optimize Performance </li></ul></ul><ul><ul><li>Automatic Versioning and Time Stamping </li></ul></ul><ul><ul><li>Open-Source, Zero-Cost Product License </li></ul></ul><ul><ul><li>Scalable </li></ul></ul>
  12. 12. SERIES -2 <ul><li>Coming Shortly. </li></ul><ul><li>Dive into H8 code </li></ul><ul><li>What’s the fuss about these XML files? Configuration?? </li></ul>

×