object-relational mapping author: jaroslav orság diploma thesis supervisor: ing. augustín mrázik
TRANSCRIPT
Goal of Thesis
• Analysis of OOP principles, which should be supported by ORM frameworks
• Analyze some of the most important ORM frameworks (free, commercial)
• Compare reviewed frameworks
Brief qualified overview of ORM for developers and IT managers
Contents
• The Problem
• Kinds of Cooperation
• Patterns
• Analisis of Frameworks– Frameworks– Criteria
• Conclusion
The Problem (3)
• 2 different worlds (different paradigms)• Different data representation• Different data manipulation• Different modeling techniques• Semantic gap• Impedance mismatch• Problem appears in huge software
projects with lots of entities
Kinds of cooperation (1)
• HTML + ASP + MS SQL (Example 1)– SQL statements in ASP(JScript, VB) code– Working with tuples (records) in ASP
environment– Code is ugly– Sufficient for small projects
Kinds of cooperation (2)
• .NET + MS SQL (Example 2)– Instruments for more sophisticated data
manipulation (.net DataSets, DataTables)– It is possible (more simple) to create kind of
own specific mapper– This mapper is not reusable– Java + JDBC + Oracle
Kinds of cooperation (3)
• .NET + ORM + MS SQL (Example 3)– Reusable ORM mapper is used– Object model is created and appropriate
relational model is created and maintained by mapper
Mapping Approaches
• Do It Yourself (Example 1 & 2)• Free or commercial software (Example 2 & 3)• Approaches used by 3rd party tools (mappers)
– Entity approach • Data are just data - use of objects without behavior• Special classes for changing state of objects (objects are
parameters of static methods of so-called management classes)• Since ’70-ies
– Domain model approach• No management classes• Persistent objects contains behavior• Possible use of polymorphism to override behavior• True ORM mappers
Analysis of Frameworks
• DataObjects.NET
• Hibernate
• TopLink
• LLBLGenPro
• Java Data Object (JDO)
Analysis Aspects
• Architecture• Criteria
– Transparency– Documentation & support– Dependencies, supported platforms, portability– Maintainability of model– Usability– Configuration vs. automation– Constraints on design of object model
Conclusion
• Work brings orientation within given topic and can serve as a guide when deciding which framework to use
• Evaluation presented in this work cannot be considered to be general for any purpose / problem ("one size fits all...")
• Different frameworks are designed for different situations
• Results of this work can serve as a guide for evaluation of frameworks for a particular development project
Odpovede (2)
• “Autor vychádza najmä z troch prác, pričom štruktúra textu (kapitoly a podkapitoly) spracovaného textu nápadne pripominajú jeden z citovaných zdrojov.”
Odpovede (3)
• “Kvalita grafického spracovania príkladov/obrázkov nezodpovedá zvyšku práce, a v čitateľovi podobne vzbudzuje pochybnosti o ich pôvode.”