SlideShare une entreprise Scribd logo
1  sur  28
Object XML Mappings
                        An introduction
                                      Joost Diepenmaat
                            j.h.b.diepennaat@student.utwente.nl




Friday, February 27, 2009
1. Introduction to ORM’s in
                     the SQL world!
                  2. Object XML Mappings



Friday, February 27, 2009
Enterprise Application
                              Layers
                            Presentation   Interaction


                                 Domain      Logic


                            Data Source     Storage


Friday, February 27, 2009
Enterprise Application
                              Layers
                            Presentation   Interaction

                   ORM’s live
                              Domain         Logic
                     here!

                            Data Source     Storage


Friday, February 27, 2009
Object Relational Mapping
                        firstname      lastname   age

                            Joost   Diepenmaat   26

                             Jan     Klaassen    24

                            John       Doe       23




Friday, February 27, 2009
Object Relational Mapping
                        firstname      lastname   age
                                                         Class
                                                        Student
                            Joost   Diepenmaat   26
                                                       firstname
                             Jan     Klaassen    24
                                                       lastname
                            John       Doe       23    age




Friday, February 27, 2009
Object Relational Mapping
                        firstname      lastname   age
                                                         Class
                                                        Student
                            Joost   Diepenmaat   26
                                                       firstname
                             Jan     Klaassen    24
                                                       lastname
                            John       Doe       23    age




Friday, February 27, 2009
ORM & ActiveRecord
         quot;An object that wraps a row in a
       database table or view, encapsulates
            the database access, and adds
           domain logic on that data.quot;
                                 - Martin Fowler




Friday, February 27, 2009
Very short demo...



Friday, February 27, 2009
More ORM!

Friday, February 27, 2009
Associations
   class Student < ActiveRecord::Base
     has_many :courses
     belongs_to :university
   end

   student = Student.find_by_name(quot;Joostquot;)
   student.courses #returns all courses




Friday, February 27, 2009
Validations
       class Student < ActiveRecord::Base
         validates_presence_of     :firstname, :lastname
         validates_uniqueness_of   :number
         validates_acceptance_of   :terms_of_service
         validates_confirmation_of :password
       end




Friday, February 27, 2009
✓Associations   ✓Inheritance
            ✓               ✓
              Validations     Direct manipulation

            ✓Finders        ✓Transactions
            ✓               ✓
              Callbacks       Database abstraction

            ✓Observers      ✓etc. etc.
Friday, February 27, 2009
ORM’s are popular

                     • Java: Hibernate
                     • Ruby: ActiveRecord, DataMapper
                     • .Net: LINQ
                     • Python: Django’s ORM
                     • More, more, more....

Friday, February 27, 2009
ORM’s are
                            SQL based.

Friday, February 27, 2009
Complex XML standards

                     • OpenXML         • ebXML
                     • GIS             • XBRL
                     • Universal       • Healthcare XML
                            Business
                                       • Voice XML
                            Language



Friday, February 27, 2009
ORM’s do not support
                      native XML storage.


Friday, February 27, 2009
2. Object Relational
                               XML Mappings


Friday, February 27, 2009
Place XML
                               in domain logic
                            into separate classes.


Friday, February 27, 2009
<student>
                                <name>Joost</name>
                                <courses>

                                    <course>
                                        <title>XML & DB I</title>
                                        <score>7</score>
                                    </course>
                                    <course>
                                        <title>XML & DB II</title>
                                        <score>9</score>
                                    </course>...




Friday, February 27, 2009
Student   <student>
                  Class
                                          <name>Joost</name>
                                          <courses>

                                              <course>
                                                  <title>XML & DB I</title>
                                                  <score>7</score>
                                              </course>
                                              <course>
                                                  <title>XML & DB II</title>
                                                  <score>9</score>
                                              </course>...




Friday, February 27, 2009
Student      <student>
                  Class
                                             <name>Joost</name>
                                             <courses>

                                              Course <course>
                                      Class

                                                        <title>XML & DB I</title>
                                                        <score>7</score>
                                                    </course>
                                                    <course>
                                                        <title>XML & DB II</title>
                                                        <score>9</score>
                                                    </course>...




Friday, February 27, 2009
Student      <student>
                  Class
                                             <name>Joost</name>
                                             <courses>

                                              Course <course>
                                      Class

                                                        <title>XML & DB I</title>
                                                        <score>7</score>
                                                    </course>
                                                    <course>
                                                        <title>XML & DB II</title>
                                                        <score>9</score>
                                                    </course>...


          student = Student.find_by_name(quot;Joostquot;)
          student.courses


Friday, February 27, 2009
Thesis studies:

                 The possibilities of an OXM
                     with XML/XPath as
                 a base language for storage.


Friday, February 27, 2009
Research Questions

                  1. How can we extend RoR with XPath
                     Accelerator to create an XML database for
                     efficient XML storage and XPath processing?
                  2. How can we implement XML based Object
                     Mapping on the XML database created?
                  3. What kind of XML related functionality can
                     we add to the system?



Friday, February 27, 2009
layer             contains


                               Object              Student


                            Elements map       tag “<student>”


                            Pathfinder core   XPath to SQL queries


                             SQL storage       pre | size | level




Friday, February 27, 2009
Elements Map
                             University     Student     Course
       Objects




                                       Object
                            Elements              XPath
      Elements
                                                            Etc.
                                       Mapping
         Map
                            Register              Queries


                                          Pathfinder
                                            SQL


Friday, February 27, 2009
Questions?



Friday, February 27, 2009

Contenu connexe

Dernier

Dernier (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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...
 
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...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Object XML Mappings

  • 1. Object XML Mappings An introduction Joost Diepenmaat j.h.b.diepennaat@student.utwente.nl Friday, February 27, 2009
  • 2. 1. Introduction to ORM’s in the SQL world! 2. Object XML Mappings Friday, February 27, 2009
  • 3. Enterprise Application Layers Presentation Interaction Domain Logic Data Source Storage Friday, February 27, 2009
  • 4. Enterprise Application Layers Presentation Interaction ORM’s live Domain Logic here! Data Source Storage Friday, February 27, 2009
  • 5. Object Relational Mapping firstname lastname age Joost Diepenmaat 26 Jan Klaassen 24 John Doe 23 Friday, February 27, 2009
  • 6. Object Relational Mapping firstname lastname age Class Student Joost Diepenmaat 26 firstname Jan Klaassen 24 lastname John Doe 23 age Friday, February 27, 2009
  • 7. Object Relational Mapping firstname lastname age Class Student Joost Diepenmaat 26 firstname Jan Klaassen 24 lastname John Doe 23 age Friday, February 27, 2009
  • 8. ORM & ActiveRecord quot;An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.quot; - Martin Fowler Friday, February 27, 2009
  • 9. Very short demo... Friday, February 27, 2009
  • 11. Associations class Student < ActiveRecord::Base has_many :courses belongs_to :university end student = Student.find_by_name(quot;Joostquot;) student.courses #returns all courses Friday, February 27, 2009
  • 12. Validations class Student < ActiveRecord::Base validates_presence_of :firstname, :lastname validates_uniqueness_of :number validates_acceptance_of :terms_of_service validates_confirmation_of :password end Friday, February 27, 2009
  • 13. ✓Associations ✓Inheritance ✓ ✓ Validations Direct manipulation ✓Finders ✓Transactions ✓ ✓ Callbacks Database abstraction ✓Observers ✓etc. etc. Friday, February 27, 2009
  • 14. ORM’s are popular • Java: Hibernate • Ruby: ActiveRecord, DataMapper • .Net: LINQ • Python: Django’s ORM • More, more, more.... Friday, February 27, 2009
  • 15. ORM’s are SQL based. Friday, February 27, 2009
  • 16. Complex XML standards • OpenXML • ebXML • GIS • XBRL • Universal • Healthcare XML Business • Voice XML Language Friday, February 27, 2009
  • 17. ORM’s do not support native XML storage. Friday, February 27, 2009
  • 18. 2. Object Relational XML Mappings Friday, February 27, 2009
  • 19. Place XML in domain logic into separate classes. Friday, February 27, 2009
  • 20. <student> <name>Joost</name> <courses> <course> <title>XML & DB I</title> <score>7</score> </course> <course> <title>XML & DB II</title> <score>9</score> </course>... Friday, February 27, 2009
  • 21. Student <student> Class <name>Joost</name> <courses> <course> <title>XML & DB I</title> <score>7</score> </course> <course> <title>XML & DB II</title> <score>9</score> </course>... Friday, February 27, 2009
  • 22. Student <student> Class <name>Joost</name> <courses> Course <course> Class <title>XML & DB I</title> <score>7</score> </course> <course> <title>XML & DB II</title> <score>9</score> </course>... Friday, February 27, 2009
  • 23. Student <student> Class <name>Joost</name> <courses> Course <course> Class <title>XML & DB I</title> <score>7</score> </course> <course> <title>XML & DB II</title> <score>9</score> </course>... student = Student.find_by_name(quot;Joostquot;) student.courses Friday, February 27, 2009
  • 24. Thesis studies: The possibilities of an OXM with XML/XPath as a base language for storage. Friday, February 27, 2009
  • 25. Research Questions 1. How can we extend RoR with XPath Accelerator to create an XML database for efficient XML storage and XPath processing? 2. How can we implement XML based Object Mapping on the XML database created? 3. What kind of XML related functionality can we add to the system? Friday, February 27, 2009
  • 26. layer contains Object Student Elements map tag “<student>” Pathfinder core XPath to SQL queries SQL storage pre | size | level Friday, February 27, 2009
  • 27. Elements Map University Student Course Objects Object Elements XPath Elements Etc. Mapping Map Register Queries Pathfinder SQL Friday, February 27, 2009

Notes de l'éditeur