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

Slides:



Advertisements
Similar presentations
J0 1 Marco Ronchetti - Basi di Dati Web e Distribuite – Laurea Specialistica in Informatica – Università di Trento.
Advertisements

11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
Websydian Anne-Marie Arnvig Manager, Websydian Communications & Relations.
Chapter 13 Review Questions
File Server Organization and Best Practices IT Partners June, 02, 2010.
Database Systems: Design, Implementation, and Management Tenth Edition
Data Model driven applications using CASE Data Models as the nucleus of software development in a Computer Aided Software Engineering environment.
.NET Database Technologies: Open-Source Frameworks.
1 Layers Data from IBM-Rational and Craig Larman’s text integrated into these slides. These are great references… Slides from these sources have been modified.
Approaches to EJB Replication. Overview J2EE architecture –EJB, components, services Replication –Clustering, container, application Conclusions –Advantages.
Integrating SOA and the Application Development Framework Shaun O’Brien Principal Product Manager – Oracle JDeveloper / ADF.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
.NET Mobile Application Development Distributed Application Design.
1 IBM SanFrancisco Product Evaluation Negotiated Option Presentation By Les Beckford May 2001.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
The Architecture of Transaction Processing Systems
Software Architecture Patterns (2). what is architecture? (recap) o an overall blueprint/model describing the structures and properties of a "system"
1 A Student Guide to Object- Orientated Development Chapter 9 Design.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Java Pet Store Application. Outline Introduction Introduction Information Layer Information Layer Application Layer Application Layer Infrastructure Layer.
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Open source administration software for education software development simplified KRAD Kuali Application Development Framework.
Enterprise Object Framework. What is EOF? Enterprise Objects Framework is a set of tools and resources that help you create applications that work with.
Objektorienteret netværkskommunikation Presentation: Architectures for Distributed Systems.
Java Frameworks Indy Java Users Group January 29, 2003.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
1 INTRO TO BUSINESS COMPONENTS FOR JAVA (BC4J) Matt Fierst Computer Resource Team OracleWorld Session
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
1 J2EE Components. 2 Application Servers relieve the programming burden for business distributed components. They provide support for system level services.
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
© D. Wong  Indexes  JDBC  JDBC in J2EE (Java 2 Enterprise Edition)
Database Technical Session By: Prof. Adarsh Patel.
Enterprise Java Beans Part I Kyungmin Cho 2001/04/10.
CHAPTER 14 USING RELATIONAL DATABASES TO PROVIDE OBJECT PERSISTENCE (ONLINE) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
 Chapter 6 Architecture 1. What is Architecture?  Overall Structure of system  First Stage in Design process 2.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
These slides are designed to accompany Web Engineering: A Practitioner’s Approach (The McGraw-Hill Companies, Inc.) by Roger Pressman and David Lowe, copyright.
Information System Development Courses Figure: ISD Course Structure.
Object-to-Relational Mapping: The Crossing Chasms Pattern and Implementation Considerations Use of Meta Data in the Java Persistence Layer Presented by.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 14 Using Relational Databases to Provide Object Persistence (Overview) Modern Database.
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.
Ch- 8. Class Diagrams Class diagrams are the most common diagram found in modeling object- oriented systems. Class diagrams are important not only for.
Java EE Patterns Dan Bugariu.  What is Java EE ?  What is a Pattern ?
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool The problem fixed by ORM Advantage Hibernate Hibernate Basic –Hibernate sessionFactory –Hibernate Session.
Assignment of JAVA id : BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38.
BI Practice March-2006 COGNOS 8BI TOOLS COGNOS 8 Framework Manager TATA CONSULTANCY SERVICES SEEPZ, Mumbai.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
25 April Unified Cryptologic Architecture: A Framework for a Service Based Architecture Unified Cryptologic Architecture: A Framework for a Service.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Overview of the Spring Framework Introducing.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool Used in data layer of applications Implements JPA.
EJB. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
Hibernate Java Persistence API. What is Persistence Persistence: The continued or prolonged existence of something. Most Applications Achieve Persistence.
Databases and DBMSs Todd S. Bacastow January 2005.
New Technology: Why, What ,How
ADO.NET Entity Framework Marcus Tillett
 DATAABSTRACTION  INSTANCES& SCHEMAS  DATA MODELS.
Introduction to Database Systems
Inventory of Distributed Computing Concepts
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
Component-based Applications
Component Technology Bina Ramamurthy 2/25/2019 B.Ramamurthy.
Developing and testing enterprise Java applications
Enterprise Java Beans.
Presentation transcript:

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

January 30, 2014 Copyright Jim Farley Agenda Define the problem Review the issues and options –Design approaches –Technical tools Some guidelines for choosing a solution

January 30, 2014 Copyright Jim Farley The Problem Impedance mismatch –OOP vs. RDBMS Both still prominent in their respective domains Both designed for different purposes –OO: Conceptual program design –RDBMS: Data relationship modeling and access speed

January 30, 2014 Copyright Jim Farley The Building Blocks OOP –Interfaces, classes –Data member references –Methods RDBMS –Tables, columns –Foreign keys, integrity constraints –Stored procedures

January 30, 2014 Copyright Jim Farley Goals and Assumptions Optimize conceptual accuracy and robustness of OOP objects Optimize robustness of data model –Multiple use-cases, some non-Java apps Online apps + reporting tools + OLAP JDBC is the underlying plumbing (directly or indirectly) Minimize latency of JDBC bridge code Preserve ACID properties of database

January 30, 2014 Copyright Jim Farley The Framework Data layer (RDBMS objects) Conceptual layer (Java objects) Middleware (Java objects)

January 30, 2014 Copyright Jim Farley Why define a mapping? Encapsulates the data access layer –Preserve data-level business rules –Minimize impact on code due to data model changes Reduces development overhead –Schema plus the mapping rules is all you need to know to use the database Simplifies code management –Mapping is a shield/guide for introducing fixes

January 30, 2014 Copyright Jim Farley Some Common Approaches Schema -> JDBC abstraction -> app objects –Non-remote by default, can be wrapped –Low overhead/high transaction rates –Context-independent Schema-> XML binding -> app objects Schema -> EJB entity beans -> app objects –Remote by default –J2EE compliant

January 30, 2014 Copyright Jim Farley Issues Reproducible mapping? Where does the business logic go? Who defines the transaction boundaries? How does the security model tie in?

January 30, 2014 Copyright Jim Farley Reproducible Mappings I.e., no hand-tweaking of the generated code… Pros: –Schema changes can be tracked easily –Every set of data objects is consistent Cons: –Mapping utility needs to support full access to data layer –Possibility for sub-optimal data access

January 30, 2014 Copyright Jim Farley Reproducible Mappings Recommendation: Keep the mapping reproducible –Adjusting the mapping utility rather than the code is almost always a bigger payback –Data access can be optimized in the mapping, or by allowing for app-layer back-doors to the JDBC level

January 30, 2014 Copyright Jim Farley Business Logic Possibilities: –App-layer (above the generated data objects) –Hand-tweak the data layer –Stored procedures Business logic comes in different flavors –Data integrity –Higher-level business process/workflow –Authorization

January 30, 2014 Copyright Jim Farley Business Logic Recommendations: –Dont tweak the data layer Too messy, easier to adjust mapping utility to access it –Look at the usage modalities you need to support and let that drive the decisions E.g., Two-tier reporting/admin tools => more data integrity logic and authorization in stored procedures –Generally speaking: Keep data integrity close to the database level Keep business process/workflow out in the app level

January 30, 2014 Copyright Jim Farley Transaction Boundaries I.e., What operations make up an ACID transaction? Largely driven by business-logic decisions –Hard-coding a transaction in the mapping layer implicitly places business logic there as well –Some logic will go into app-layer => pass- through support in data layer –Some logic may go into the RDBMS => multi- tier transactions

January 30, 2014 Copyright Jim Farley Transaction Boundaries Recommendations: –Keep data-layer transactions fairly atomic, allow for subsuming them into higher-level transactions –Get intimate knowledge of how RDBMS and JDBC driver work together to support transactions Data layer interactions with stored procedures => tiered transactions Can/will affect transaction rates

January 30, 2014 Copyright Jim Farley Security Model Authentication and authorization need to be supported top to bottom User identities and policies need to be mapped to RDBMS level RDBMS security support is erratic –Some do certificates, some dont Account management –Roles, access modalities, etc. play into this

January 30, 2014 Copyright Jim Farley Security Model Recommendation: Keep policies out of the data layer –Provide pass-through support in the mapping –Try to avoid vendor-specific facilities in the mapping layer You may need to bridge PKI with RDBMS authorization –Map user accounts to database accounts –Data relationships in the RDBMS, business rules in the app layer

January 30, 2014 Copyright Jim Farley Solutions: Custom mapping JDBC/schema -> abstraction layer -> app objects –Abstraction layer provides entities that represent tables, columns, procedures, constraints, etc. –RDBMS objects mapped to instances of these entities (subclasses, wrappers) Non-remote, optimizable, portable Transactions and security are all up to you Have to worry about driver issues yourself

January 30, 2014 Copyright Jim Farley Solutions: EJB Entity beans JDBC/schema -> EJB entity beans -> app objects App objects can be session beans, higher- order entity beans, etc. Remote by default, EJB engine required Transactions directly supported –But transaction rates will be lower Container-managed persistence is an option

January 30, 2014 Copyright Jim Farley Solutions: XML Schema-> XML binding -> app objects –Or some variation? XML binding plus standard schema language would extend portability enormously –Publish your schema and business components –Generate optimized RDBMS and middleware But: Not ready for prime time But: No relationship with EJB defined (yet)

January 30, 2014 Copyright Jim Farley Overall Recommendations EJB is a nice framework, use it if you can afford it –Transaction rates need to be improved –Server costs may not make sense for you –Still need a mapping of some kind Custom middleware is a pain, but still an option –Third-party stuff is there, but be careful Watch the XML space for a right solution

January 30, 2014 Copyright Jim Farley Questions?