Object XML Mappings

630 views
570 views

Published on

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

No Downloads
Views
Total views
630
On SlideShare
0
From Embeds
0
Number of Embeds
29
Actions
Shares
0
Downloads
29
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

























  • 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

    ×