SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Kürzlich hochgeladen

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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 interpreternaman860154
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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.pptxMalak Abu Hammad
 
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.pptxEarley Information Science
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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 Scriptwesley chun
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Empfohlen

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 HubspotMarius Sescu
 
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 ChatGPTExpeed Software
 
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 EngineeringsPixeldarts
 
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 HealthThinkNow
 
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.pdfmarketingartwork
 
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 2024Neil Kimberley
 
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)contently
 
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 2024Albert Qian
 
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 InsightsKurio // The Social Media Age(ncy)
 
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 2024Search Engine Journal
 
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 summarySpeakerHub
 
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 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 Tessa Mero
 
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 IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
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 managementMindGenius
 
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...RachelPearson36
 

Empfohlen (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

Hinweis der Redaktion