SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

En vedette

đA cộng tuyến star
đA cộng tuyến   starđA cộng tuyến   star
đA cộng tuyến starStar II
 
Learn SystemC Erotically part1
Learn SystemC Erotically part1Learn SystemC Erotically part1
Learn SystemC Erotically part1KSuzukiii
 
3-ий вебинар презентация - Дворик
3-ий вебинар презентация - Дворик 3-ий вебинар презентация - Дворик
3-ий вебинар презентация - Дворик Galina Perova
 
Factual layout analysis
Factual layout analysisFactual layout analysis
Factual layout analysisChloeandRachel
 
Working to a brief pro forma
Working to a brief pro formaWorking to a brief pro forma
Working to a brief pro formaChloeandRachel
 
May Unplugged Mobile Controls User Group
May Unplugged Mobile Controls User GroupMay Unplugged Mobile Controls User Group
May Unplugged Mobile Controls User GroupTeamstudio
 
Konsep Dasar Probabilitas
Konsep Dasar ProbabilitasKonsep Dasar Probabilitas
Konsep Dasar ProbabilitasIndra Gunawan
 

En vedette (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
 

Similaire à Persistence

Core java lessons
Core java lessonsCore java lessons
Core java lessonsvivek shah
 
OSOM - Open source catching solutions
OSOM - Open source catching solutionsOSOM - Open source catching solutions
OSOM - Open source catching solutionsMarcela Oniga
 
Code reviews
Code reviewsCode reviews
Code reviewsRoger Xia
 
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 OGMPT.JUG
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Martijn Verburg
 
JS for multidisciplinary teams
JS for multidisciplinary teamsJS for multidisciplinary teams
JS for multidisciplinary teamsFrancisco Ferreira
 
Introduction to Distributed Computing & Distributed Databases
Introduction to Distributed Computing & Distributed DatabasesIntroduction to Distributed Computing & Distributed Databases
Introduction to Distributed Computing & Distributed DatabasesShankar Iyer
 
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 HoleNoam Kfir
 
Scala in practice
Scala in practiceScala in practice
Scala in practiceTomer Gabel
 
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 2016Yolande Poirier
 
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.2014Metosin Oy
 
Distributed applications using Hazelcast
Distributed applications using HazelcastDistributed applications using Hazelcast
Distributed applications using HazelcastTaras Matyashovsky
 
Alfresco 4: Scalability and Performance
Alfresco 4: Scalability and PerformanceAlfresco 4: Scalability and Performance
Alfresco 4: Scalability and PerformanceAlfresco Software
 
Alfresco scalability and performnce
Alfresco   scalability and performnceAlfresco   scalability and performnce
Alfresco scalability and performncePaul Hampton
 

Similaire à 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
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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 2024Rafal Los
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[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.pdfhans926745
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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...Miguel Araújo
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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 DevelopmentsTrustArc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Dernier (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

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.

Notes de l'éditeur

  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.