Object Relational Mapping John M. Miller Perpetual Data Systems.

Slides:



Advertisements
Similar presentations
January 30, 2014 Copyright Jim Farley Beyond JDBC: Java Object- Relational Mappings Jim Farley e-Commerce Program Manager GE Research and Development
Advertisements

Why am I here Development techniques are headed down the wrong path! Our world should be getting simpler – it is not The solutions that will solve the.
Michael Pizzo Software Architect Data Programmability Microsoft Corporation.
NHibernate Object/Relational Persistence for.NET.
Software Testing with Visual Studio 2013 & Team Foundation Server 2013 Benjamin Day.
Reducing development costs Code generation in IronSpeed Designer William Eastbury Simple Health & Beauty Limited.
.NET Database Technologies: Open-Source Frameworks.
Object Relational Mapping A to Z. About Me Over A Decade of I.T. Experience Web Developer, DBA, DevOps, Mobile Microsoft Cert. in SQL Server Twitter:
Computer Monitoring System for EE Faculty By Yaroslav Ross And Denis Zakrevsky Supervisor: Viktor Kulikov.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Introduction To System Analysis and Design
Object Relational Mapping. What does ORM do? Maps Object Model to Relational Model. Resolve impedance mismatch. Resolve mapping of scalar and non-scalar.
Software Factory Assembling Applications with Models, Patterns, Frameworks and Tools Anna Liu Senior Architect Advisor Microsoft Australia.
Introduction to Databases Transparencies
Object Oriented Analysis and Design Using the UML
Discover, Master, InfluenceSlide 1 SQL Server Compact Edition and the Entity Framework Rob Sanders Readify.
Data Persistence and Object-Relational Mapping Slides by James Brucker, used with his permission 1.
Systems Analysis and Design in a Changing World, Fifth Edition
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
CSC2012 Database Technology & CSC2513 Database Systems.
LINQ Boot Camp ADO.Net Entity Framework Presenter : Date : Mahesh Moily Nov 26, 2009.
Entity Framework, a quickstart Florin−Tudor Cristea, Microsoft Student Partner.
The Earth System Curator Metadata Representations Prototype Portal in Collaboration with ESMF and ESG Rocky Dunlap Spencer Rugaber Georgia Tech.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
Data Access Patterns Some of the problems with data access from OO programs: 1.Data source and OO program use different data modelling concepts 2.Decoupling.
NHibernate in Action Web Seminar at UMLChina By Pierre Henri Kuaté 2008/08/27
CHAPTER 14 USING RELATIONAL DATABASES TO PROVIDE OBJECT PERSISTENCE (ONLINE) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database.
Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.
Introduction To System Analysis and Design
Using SAS® Information Map Studio
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
 Three-Schema Architecture Three-Schema Architecture  Internal Level Internal Level  Conceptual Level Conceptual Level  External Level External Level.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 14 Using Relational Databases to Provide Object Persistence (Overview) Modern Database.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
Domain and Persistence Patterns. Fundamental Pattern Types Design Patterns Business Logic Patterns.
Oct * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies.
EntityFrame work and LINQ CH 14. linq LINQ enables you to query data from a wide variety of data sources, directly from your programming code. LINQ is.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
CIS/SUSL1 Fundamentals of DBMS S.V. Priyan Head/Department of Computing & Information Systems.
Fall CIS 764 Database Systems Engineering L18.2 : Object Relational Mapping … ….Object persistence.
Energy forms and transformations. What is energy? We use the word all the time – but very few people have a strong understanding what it is It.
UNIT III - JDBC JDBC Overview – JDBC implementation – Connection class – Statements - Catching Database Results, handling database Queries. Networking–
Ch- 8. Class Diagrams Class diagrams are the most common diagram found in modeling object- oriented systems. Class diagrams are important not only for.
12 Chapter 12: Advanced Topics in Object-Oriented Design Systems Analysis and Design in a Changing World, 3 rd Edition.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool The problem fixed by ORM Advantage Hibernate Hibernate Basic –Hibernate sessionFactory –Hibernate Session.
CSE403 Software Engineering Autumn 2001 Prototyping Gary Kimura Lecture #5 October 10, 2001.
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
Lecture VIII: Software Architecture
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool Used in data layer of applications Implements JPA.
Class Diagrams. Terms and Concepts A class diagram is a diagram that shows a set of classes, interfaces, and collaborations and their relationships.
2 Behind every great site, there is great data Eric Nelson Developer Evangelist Microsoft UK
Object Oriented Analysis & Design By Rashid Mahmood.
WELCOME TO OUR PRESENTATION UNIFIED MODELING LANGUAGE (UML)
Submitted by: Moran Mishan. Instructed by: Osnat (Ossi) Mokryn, Dr.
Hibernate Java Persistence API. What is Persistence Persistence: The continued or prolonged existence of something. Most Applications Achieve Persistence.
PowerBuilder is an integrated development environment (IDE) used to create applications. PowerBuilder 12.5 has good integration with the Microsoft.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
Building Enterprise Applications Using Visual Studio®
New Technology: Why, What ,How
Elaboration popo.
Fundamentals of Object Oriented Modeling
Datab ase Systems Week 1 by Zohaib Jan.
POOL persistency framework for LHC
The Object Oriented Approach to Design
ADO.NET Entity Framework Marcus Tillett
ADO.NET Entity Framework
Chapter 2 Database Environment.
.NET Database Technologies:
Software Analysis.
Presentation transcript:

Object Relational Mapping John M. Miller Perpetual Data Systems

John M. Miller  Independent Software Architect, Designer & Developer  PDC 2002 Speaker  Collaborator on adding advanced business rule support to a commercial.Net application framework  Member of a team submitting a response to the OMG request for a method for formalizing business rules  XSLT transformations from ORM conceptual models into.NET entity business object implementation

Overview  What is Object Relational Mapping  Why did Microsoft back away?  Is OR Mapping dead?  What if it isn't?  What does it mean for.NET application architectures?  Which comes first the data chicken or object egg?

What is Object Relational Mapping  Something that persists objects into relational databases  Can be  a software layer using dynamic SQL generation  a method of generating static SQL  Implicit with Domain object models  DataSets need not apply

 Why are domain models important?  Because Why is OR Mapping Important? I said so  They abstract the data access code hiding the database details  They encapsulate the database in an interface that more closely matches the conceptual domain.  Object Models are more expressive for certain kinds of object interactions  Constraints become easier to implement  Object notation is a natural way of navigating a join path ACustomer.Orders[Number=1001].Items[Item=33].Product.Price  Constraints become easier to implement If AProduct.OnHand < AItem.Quantity Then raise BizRuleXceptn

Mappers  Domain models put the responsibility of reconciling design differences between the object and data models on the persistence layer  Persistence Layers  Static  Hand coded  Generated  Dynamic

Problems with OR Mapping  A weakness in the mapper limits the capability of the object model and in turn the capability of the application  No standard object query language  It can’t be done, not practical, a waste of time, etc.  It costs time and money  The dread impedance mismatch Wikipedia, C2

The Impedance Mismatch "When you notice that you're experiencing considerable pain, and you recognize that a substantial amount of the pain occurs in and around the interface between your code and the relational database, then you've found the Object/Relational Impedance Mismatch."

The Impedance Mismatch  Technical  Object Modeling and Data Modeling model fundamentally different things  Objects = Process  Data persistence is secondary  Data = Structure  What about static class diagrams?  Fundamentally flawed for complex structural modeling  Different Optimizations  Identification schemes are a problem

The Impedance Mismatch  Cultural  Created by different camps  Software Architects  The equally dread Database Administrator  Night & Day, Oil & Water, Pickles & Ketchup

The Impedance Mismatch  Reality  Neither domain models nor relational databases are going away.  Mappers are the price we pay for playing  Does it really exist?

So why did Microsoft back away?  ObjectSpaces  Billed as the Microsoft OR Mapper  Due to ship with Visual Studio 2005  Rolled into WinFS  Because  Overlapped with some of the WinFS persistence story  Different APIs and Microsoft wanted to unify the APIs  Microsoft didn’t want to publish ObjectSpaces and then release an incompatible WinFS

So why did Microsoft back away?  WinFS  Windows object store  Due to ship with Longhorn  Pushed back until after Longhorn  Because  It wasn’t going to be ready in time  Object Persistence is harder than they thought  E12

So why did Microsoft back away?  To the net effect of leaving the market without a Microsoft OR Mapper until? 2008? 2008?2009?2010?  After first creating a buzz with the initial previews of ObjectSpaces and generating significant market momentum  Leaving the development world to wonder  Is OR Mapping dead?

Is OR Mapping Dead?  In the Microsoft community  Almost  There are several implementations that were available before ObjectSpaces that are still around  And a few created since  One that emulates the ObjectSpaces preview API  In the Java community  Not even close  Widely adopted  Not if, but which one

What if it isn't?  You could miss out on a technology that could make an application easier to design, implement and maintain  What is the.NET OR faithful to do?  Wait for Microsoft  Adopt an existing.NET OR Mapper until Microsoft does something  Try WORM  Adopt an existing.NET OR Mapper permanently  nHibernate is hot right now  Switch to Java  Like you, they get OR mappers

What does it mean for.NET application architectures?  XML and DataSets will continue to rule the DAL world until a dominate OR mapper for.NET appears  OR Mapping will continue to be used sparingly and grow as the mappers mature  Adoption rate in the.NET community should mimic the adoption rate for OR mappers in the Java community, but at faster pace  Should be widely adopted in the.NET community in 3-4 years  Hold your breath when WinFS ships

Which comes first the data chicken or object egg?  Lets say you are starting a new project with:  Complex business logic  Complex data relationships  Interested in creating a domain model and and relational database.  What do you do first? 1.Call me 2.Create the object model you want to persist 3.Create the data model that you know you need  If you do either 2 or 3 you have to deal with the dread impedance mismatch

The Object Egg  You create the domain object model first using standard OOA&D methods  Then derive the data structure from the object model  Problems  Number of tables  Normalization  Fragile Structures

The Data Chicken  You create the data model first using standard data modeling methods  The derive the domain model from the data model  Problems  You tell me?  Fidelity Loss

What then?  Conceptual Models  Design the structures conceptually first using a formal conceptual modeling method  Derive both the entity object model and data model from the conceptual model  Problems  Your domain object model needs to collaborate with the entity objects  No standards  Complex transformation

What next?  2/1/ San Diego.NET Developer Group Meeting  Implementing.NET Applications using Conceptual Models

Thank You!   pdata.com/jMM  shrinkster.com/3bt  en.wikipedia.org/wiki/Object-relational_mapping  c2.com/cgi/wiki?ObjectRelationalMapping  theserverside.com/books/review/HibernateReview.tss  devx.com/vb2themax/Article/19894  sddotnetdg.org/Events/SDDOTNET+Meetings/default.aspx