SlideShare a Scribd company logo
1 of 11
Ennovation – Behind the
       Products
     Anish Alex, CTO
Java Persistence Problem

    • Closest native language support
       – Serialization
    • Lifecycle
       – Begins and Ends with JVM
    • Identity
       – Equals / Hashcode / Memory Location
    • Data Types
       – Int/long/string..

    • RDBMS
       – Long term persistence / Primary Key
       – SQL
       – VARCHAR / NUMBER

2                      Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Java Persistence Technologies

    • Object Relational Mappers – ORM’s
       – Map Java objects to Relational database
         table records e.g.
           – Top Link / Hibernate
    • Java Data Objects (JDO)
       – Apache jdo
    • JDBC
    • Java Persistence API (JPA)
       – Hibernate
       – Top Link
       – Open JPA
    • EJB
    • Custom

3                      Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Java Persistence Technologies




4
              Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Hibernate
Relational Persistence for Java
Hibernate - Relational Persistence for Java

    •   XML file to map POJO to Tables
    •   Configuration
    •   Classes to bootstrap the framework
    •   JPA Implementation




6                       Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Sample Code
 ORM
Hibernate ORM

    • Generators
       –   native
       –   increment
       –   sequence
       –   assigned
       –   hilo / identify / uuid.hex / uuid.string / foreign
    • Version
       – Prevents invalid overwrites
    • Property
       – String – specify length
       – BigDecimal – specify precision/scale
       – Date / Timestamp / Long - nothing to specify




8                          Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Hibernate ORM

    • References
       – http://www.mkyong.com/tutorials/hibernate-
         tutorials/
       – http://docs.jboss.org/hibernate/orm/3.3/refe
         rence/en/html/index.htmlPrevents invalid
         overwrites
       – Sample code - http://codeserver/demo-
         repository/svndemo/anisht/trunk/training/hib
         ernate




9                      Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Hibernate ORM

     • To-Do
        –   One-to-Many using foreign keys
        –   Many-to-One
        –   Many-to-One using foreign keys
        –   One-to-One
        –   Run the same examples against SQL Server




10                        Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
THANK YOU !!
Questions / Contact

More Related Content

Viewers also liked (10)

đA cộng tuyến star
đA cộng tuyến   starđA cộng tuyến   star
đA cộng tuyến star
 
Learn SystemC Erotically part1
Learn SystemC Erotically part1Learn SystemC Erotically part1
Learn SystemC Erotically part1
 
Mohideen Khader-122316
Mohideen Khader-122316Mohideen Khader-122316
Mohideen Khader-122316
 
3-ий вебинар презентация - Дворик
3-ий вебинар презентация - Дворик 3-ий вебинар презентация - Дворик
3-ий вебинар презентация - Дворик
 
Factual layout analysis
Factual layout analysisFactual layout analysis
Factual layout analysis
 
Working to a brief pro forma
Working to a brief pro formaWorking to a brief pro forma
Working to a brief pro forma
 
Zotero english-fev2017
Zotero english-fev2017Zotero english-fev2017
Zotero english-fev2017
 
May Unplugged Mobile Controls User Group
May Unplugged Mobile Controls User GroupMay Unplugged Mobile Controls User Group
May Unplugged Mobile Controls User Group
 
Gbidavid r andres r
Gbidavid r andres rGbidavid r andres r
Gbidavid r andres r
 
Konsep Dasar Probabilitas
Konsep Dasar ProbabilitasKonsep Dasar Probabilitas
Konsep Dasar Probabilitas
 

Similar to Persistence

Code reviews
Code reviewsCode reviews
Code reviews
Roger Xia
 
Alfresco 4: Scalability and Performance
Alfresco 4: Scalability and PerformanceAlfresco 4: Scalability and Performance
Alfresco 4: Scalability and Performance
Alfresco Software
 
Alfresco scalability and performnce
Alfresco   scalability and performnceAlfresco   scalability and performnce
Alfresco scalability and performnce
Paul Hampton
 

Similar to Persistence (20)

Java and the JVM
Java and the JVMJava and the JVM
Java and the JVM
 
Core java lessons
Core java lessonsCore java lessons
Core java lessons
 
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
 
OSOM - Open source catching solutions
OSOM - Open source catching solutionsOSOM - Open source catching solutions
OSOM - Open source catching solutions
 
Code reviews
Code reviewsCode reviews
Code reviews
 
Using JPA applications in the era of NoSQL: Introducing Hibernate OGM
Using JPA applications in the era of NoSQL: Introducing Hibernate OGMUsing JPA applications in the era of NoSQL: Introducing Hibernate OGM
Using JPA applications in the era of NoSQL: Introducing Hibernate OGM
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)
 
JS for multidisciplinary teams
JS for multidisciplinary teamsJS for multidisciplinary teams
JS for multidisciplinary teams
 
33rd degree
33rd degree33rd degree
33rd degree
 
Introduction to Distributed Computing & Distributed Databases
Introduction to Distributed Computing & Distributed DatabasesIntroduction to Distributed Computing & Distributed Databases
Introduction to Distributed Computing & Distributed Databases
 
TDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleTDD and the Legacy Code Black Hole
TDD and the Legacy Code Black Hole
 
Scala in practice
Scala in practiceScala in practice
Scala in practice
 
Developer day v2
Developer day v2Developer day v2
Developer day v2
 
Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016
 
Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Clojure in real life 17.10.2014
Clojure in real life 17.10.2014
 
Distributed applications using Hazelcast
Distributed applications using HazelcastDistributed applications using Hazelcast
Distributed applications using Hazelcast
 
Alfresco 4: Scalability and Performance
Alfresco 4: Scalability and PerformanceAlfresco 4: Scalability and Performance
Alfresco 4: Scalability and Performance
 
Alfresco scalability and performnce
Alfresco   scalability and performnceAlfresco   scalability and performnce
Alfresco scalability and performnce
 
Bioinformatica p1-perl-introduction
Bioinformatica p1-perl-introductionBioinformatica p1-perl-introduction
Bioinformatica p1-perl-introduction
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Persistence

  • 1. Ennovation – Behind the Products Anish Alex, CTO
  • 2. Java Persistence Problem • Closest native language support – Serialization • Lifecycle – Begins and Ends with JVM • Identity – Equals / Hashcode / Memory Location • Data Types – Int/long/string.. • RDBMS – Long term persistence / Primary Key – SQL – VARCHAR / NUMBER 2 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 3. Java Persistence Technologies • Object Relational Mappers – ORM’s – Map Java objects to Relational database table records e.g. – Top Link / Hibernate • Java Data Objects (JDO) – Apache jdo • JDBC • Java Persistence API (JPA) – Hibernate – Top Link – Open JPA • EJB • Custom 3 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 4. Java Persistence Technologies 4 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 6. Hibernate - Relational Persistence for Java • XML file to map POJO to Tables • Configuration • Classes to bootstrap the framework • JPA Implementation 6 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 8. Hibernate ORM • Generators – native – increment – sequence – assigned – hilo / identify / uuid.hex / uuid.string / foreign • Version – Prevents invalid overwrites • Property – String – specify length – BigDecimal – specify precision/scale – Date / Timestamp / Long - nothing to specify 8 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 9. Hibernate ORM • References – http://www.mkyong.com/tutorials/hibernate- tutorials/ – http://docs.jboss.org/hibernate/orm/3.3/refe rence/en/html/index.htmlPrevents invalid overwrites – Sample code - http://codeserver/demo- repository/svndemo/anisht/trunk/training/hib ernate 9 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 10. Hibernate ORM • To-Do – One-to-Many using foreign keys – Many-to-One – Many-to-One using foreign keys – One-to-One – Run the same examples against SQL Server 10 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.

Editor's Notes

  1. 1. Behind the products 2. IT management peace of mind Freedom of choice Any relational database - oracle/mysql/mssql/db2 Any application server - JBoss, Websphere, Weblogic - even Tomcat! Any os - Windows, Linux, *nix Any hardware - well, almost :-) - no mainframes Good corporate citizen Integrates with monitoring systems - Integrates with various SSO systems - Siteminder, CAS, AD, Custom Solutions Easy test instance creation Built in purge/backup solution Test automation Minimal IT involvement 3. High performance/High Scalability 4. Industrial strength Cluster enabled - Application and database failover 5. Open Source No Vendor Lock-in Community Contribution 6. Device inclusive Tablets / Smart Phones / Desktop
  2. Closest to persistence in Java means Serialization Objects created and destroyed based on scope, GC frequency – eventually JVM Objects identified by Memory location by default, or by overriding the equals/hashcode methods No Mapping to Relational databases – Primary Key / Foreign Key / Data type constraints
  3. Several competition mechanisms to solve the problem of Java Object Persistence ORM -> Object to Relational Database JDO -> Object to File/XML/Relational database – Multiple targets, JDOQL, Annotations, XML Custom like iBatis -> Using SQL/Stored Procedures JPA -> Object to Relational Database, JQL, Annotations JDBC -> Using SQL’s EJB’s -> Entity Beans
  4. Configure which database you want to connect to / the dialect, driver etc.