Your SlideShare is downloading. ×
0
Object XML Mappings
                        An introduction
                                      Joost Diepenmaat
       ...
1. Introduction to ORM’s in
                     the SQL world!
                  2. Object XML Mappings



Friday, Februa...
Enterprise Application
                              Layers
                            Presentation   Interaction


     ...
Enterprise Application
                              Layers
                            Presentation   Interaction

      ...
Object Relational Mapping
                        firstname      lastname   age

                            Joost   Diepen...
Object Relational Mapping
                        firstname      lastname   age
                                           ...
Object Relational Mapping
                        firstname      lastname   age
                                           ...
ORM & ActiveRecord
         quot;An object that wraps a row in a
       database table or view, encapsulates
            t...
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 =...
Validations
       class Student < ActiveRecord::Base
         validates_presence_of     :firstname, :lastname
         va...
✓Associations   ✓Inheritance
            ✓               ✓
              Validations     Direct manipulation

            ...
ORM’s are popular

                     • Java: Hibernate
                     • Ruby: ActiveRecord, DataMapper
          ...
ORM’s are
                            SQL based.

Friday, February 27, 2009
Complex XML standards

                     • OpenXML         • ebXML
                     • GIS             • XBRL
      ...
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, Febr...
<student>
                                <name>Joost</name>
                                <courses>

                  ...
Student   <student>
                  Class
                                          <name>Joost</name>
                 ...
Student      <student>
                  Class
                                             <name>Joost</name>
           ...
Student      <student>
                  Class
                                             <name>Joost</name>
           ...
Thesis studies:

                 The possibilities of an OXM
                     with XML/XPath as
                 a ba...
Research Questions

                  1. How can we extend RoR with XPath
                     Accelerator to create an XM...
layer             contains


                               Object              Student


                            Elem...
Elements Map
                             University     Student     Course
       Objects




                           ...
Questions?



Friday, February 27, 2009
Upcoming SlideShare
Loading in...5
×

Object XML Mappings

486

Published on

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

No Downloads
Views
Total Views
486
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
27
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

























  • Transcript of "Object XML Mappings"

    1. 1. Object XML Mappings An introduction Joost Diepenmaat j.h.b.diepennaat@student.utwente.nl Friday, February 27, 2009
    2. 2. 1. Introduction to ORM’s in the SQL world! 2. Object XML Mappings Friday, February 27, 2009
    3. 3. Enterprise Application Layers Presentation Interaction Domain Logic Data Source Storage Friday, February 27, 2009
    4. 4. Enterprise Application Layers Presentation Interaction ORM’s live Domain Logic here! Data Source Storage Friday, February 27, 2009
    5. 5. Object Relational Mapping firstname lastname age Joost Diepenmaat 26 Jan Klaassen 24 John Doe 23 Friday, February 27, 2009
    6. 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. 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. 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. 9. Very short demo... Friday, February 27, 2009
    10. 10. More ORM! Friday, February 27, 2009
    11. 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. 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. 13. ✓Associations ✓Inheritance ✓ ✓ Validations Direct manipulation ✓Finders ✓Transactions ✓ ✓ Callbacks Database abstraction ✓Observers ✓etc. etc. Friday, February 27, 2009
    14. 14. ORM’s are popular • Java: Hibernate • Ruby: ActiveRecord, DataMapper • .Net: LINQ • Python: Django’s ORM • More, more, more.... Friday, February 27, 2009
    15. 15. ORM’s are SQL based. Friday, February 27, 2009
    16. 16. Complex XML standards • OpenXML • ebXML • GIS • XBRL • Universal • Healthcare XML Business • Voice XML Language Friday, February 27, 2009
    17. 17. ORM’s do not support native XML storage. Friday, February 27, 2009
    18. 18. 2. Object Relational XML Mappings Friday, February 27, 2009
    19. 19. Place XML in domain logic into separate classes. Friday, February 27, 2009
    20. 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. 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. 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. 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. 24. Thesis studies: The possibilities of an OXM with XML/XPath as a base language for storage. Friday, February 27, 2009
    25. 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. 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. 27. Elements Map University Student Course Objects Object Elements XPath Elements Etc. Mapping Map Register Queries Pathfinder SQL Friday, February 27, 2009
    28. 28. Questions? Friday, February 27, 2009
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×