© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 14 Using Relational Databases to Provide Object Persistence (Overview) Modern Database.

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design: Activity Diagrams
Advertisements

Chapter 1 Getting Started with Access Databases. Objectives Identify Good Database Design Create a Table and Define Fields in a New Blank Database Change.
Chapter Ten Marketing Communications and Customer Response.
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Mary Anne Poatsy, Keith Mulbery, Eric Cameron, Jason Davidson, Rebecca Lawson,
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Mary Anne Poatsy, Keith Mulbery, Eric Cameron, Jason Davidson, Rebecca Lawson,
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 13 Introduction to SQL Programming Techniques.
Chapter 2: The Database Development Process Modern Database Management 9 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Heikki Topi 1 © 2009 Pearson Education,
Big Data, Data Warehouses, and Business Intelligence Systems
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Getting Started with Microsoft SQL Server 2012 Express Edition Appendix A DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
David M. Kroenke and David J. Auer Database Processing—12 th Edition Fundamentals, Design, and Implementation Chapter One: Introduction KROENKE AND AUER.
Getting Started Chapter One DATABASE CONCEPTS, 7th Edition
Chapter One Customer Focus and Managing Customer Loyalty
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Mary Anne Poatsy, Keith Mulbery, Eric Cameron, Jason Davidson, Rebecca Lawson,
Session-01. Hibernate Framework ? Why we use Hibernate ?
Data Persistence and Object-Relational Mapping Slides by James Brucker, used with his permission 1.
Getting Started with Oracle Database 11g Release 2 Express Edition Appendix B DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Computers Are Your Future Tenth Edition Chapter 11: Programming Languages & Program Development Copyright © 2009 Pearson Education, Inc. Publishing as.
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith.
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Mary Anne Poatsy, Keith Mulbery, Lynn Hogan, Amy Rutledge, Cyndi Krebs, Eric.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: The Enhanced E-R Model Modern Database Management 10 th Edition Jeffrey A. Hoffer,
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
CHAPTER 14 USING RELATIONAL DATABASES TO PROVIDE OBJECT PERSISTENCE (ONLINE) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database.
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. Access Module 1 Workshop 1 The Four Main Database Objects Series Editor Amy Kinser.
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. Access Module 2 Workshop 4 Accessing, Maintaining, and Presenting Information Series.
Chapter Nine Marketing Channels and Channel Mapping
GO! All In One 2/E By: Shelley Gaskin, Nancy Graviett, Debra Geoghan Chapter 2 Getting Started with Windows 8.1 Copyright © 2015 Pearson Education, Inc.
PowerPoint presentation to accompany Chopra and Meindl Supply Chain Management, 5e 1-1 Copyright ©2013 Pearson Education, Inc. publishing as Prentice Hall.
Chapter Sixteen Market-Based Management and Financial Performance.
Target marketing Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 7.
Chapter 3 Appendix Object-Oriented Analysis and Design: Project Management Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 1: The Database Environment Modern Database Management 9 th Edition Jeffrey A. Hoffer,
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan Access Chapter 3 Forms, Filters, and Reports.
GO! All In One 2/E By: Shelley Gaskin, Nancy Graviett, Debra Geoghan Chapter 13 Creating and Editing Presentations with Microsoft PowerPoint 2013 Copyright.
Chapter Thirteen Defensive Strategies. Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall13-2 Defensive Strategies Defensive strategic.
1 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall.
© 2011 Pearson Education 1 Chapter 13 (Online): Object-Oriented Databases Modern Database Management 10 th Edition, International Edition Jeffrey A. Hoffer,
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 13 (Online): Object-Oriented Data Modeling Modern Database Management 10 th Edition.
Chapter Six Competitor Analysis and Sources of Advantage.
© 2012 Pearson Education, Inc. publishing Prentice Hall. Chapter 2 Situation Assessment: The External Environment.
Integrating Word, Excel,
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Mary Anne Poatsy, Keith Mulbery, Lynn Hogan, Amy Rutledge, Cyndi Krebs, Eric.
CHAPTER 6: INTRODUCTION TO SQL © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey A. Hoffer,
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan Word Chapter 1 Creating Documents with Microsoft Word 2013.
Chapter 7 Appendix C Object-Oriented Analysis and Design: Sequence Diagrams Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F.
JPA / HIBERNATE CSCI 6370 Nilayan Bhattacharya Sanket Sable.
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Chapter Twelve Offensive Strategies. Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall 12-2 Offensive Strategies Strategic market plans.
Skills for Success with Microsoft Office 2013 Volume 1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Kris Townsend, Catherine.
Skills for Success with Microsoft Office 2013 Volume 1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Kris Townsend, Catherine.
Chapter Five Market Segmentation and Segmentation Strategies.
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan Word Chapter 3 Creating Research Papers, Newsletters, and Merged.
© 2012 Pearson Education, Inc. publishing Prentice Hall. Note 9 The Product Life Cycle.
© 2012 Pearson Education, Inc. publishing Prentice Hall. Note 18 Generic Strategies—The Value Map.
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan Excel Chapter 3 Analyzing Data with Pie Charts, Line Charts, and.
© 2012 Pearson Education, Inc. publishing Prentice Hall. Note 16 What is a Marketing Strategy?
Chapter Fourteen Building a Marketing Plan. Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall14-2 Building a Marketing Plan Creativity.
David M. Kroenke and David J. Auer Database Processing: Fundamentals, Design, and Implementation Chapter One: Introduction.
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan Word Chapter 2 Using Tables and Templates to Create Resumes and Cover.
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan PowerPoint Chapter 3 Enhancing a Presentation with Animation, Video,
Introduction to ORM Hibernate Hibernate vs JDBC. May 12, 2011 INTRODUCTION TO ORM ORM is a programming technique for converting data between relational.
Chapter Eleven Portfolio Analysis and Strategic Market Planning.
David M. Kroenke and David J. Auer Database Processing: Fundamentals, Design, and Implementation Chapter Ten: Managing Databases with SQL Server 2012,
Chapter Two Marketing Performance and Marketing Profitability.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Lecture 9: The Client/Server Database Environment Modern Database Management 9 th Edition.
David M. Kroenke and David J
GO! with Microsoft® Access e
Chapter 2: The Database Development Process
Presentation transcript:

© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 14 Using Relational Databases to Provide Object Persistence (Overview) Modern Database Management 10 th Edition Jeffrey A. Hoffer, V. Ramesh, Heikki Topi

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall 2 Objectives Define terms Define terms Understand mismatch between object-oriented and relational paradigms and its consequences Understand mismatch between object-oriented and relational paradigms and its consequences Understand similarities and differences between approaches used to address object-relational mismatch Understand similarities and differences between approaches used to address object-relational mismatch Create mapping between OO structures and relational structures using Hibernate Create mapping between OO structures and relational structures using Hibernate Identify appropriate contexts for the different approaches of addressing the object-relational mismatch Identify appropriate contexts for the different approaches of addressing the object-relational mismatch Understand performance, concurrency, and security effects of object-relational mapping Understand performance, concurrency, and security effects of object-relational mapping Use HQL to formulate queries Use HQL to formulate queries

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Storage in OO systems Persistence Persistence An object’s capacity to maintain its state between application execution sessions An object’s capacity to maintain its state between application execution sessions Object-relational mapping (ORM) Object-relational mapping (ORM) Defining structural relationships between object-oriented and relational representations of data, typically to enable the use of a relational database to provide persistence for objects Defining structural relationships between object-oriented and relational representations of data, typically to enable the use of a relational database to provide persistence for objects 3

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Relational Impedance Mismatch Conceptual differences between the object-oriented approach to application design and the relational model for database design/implementation Conceptual differences between the object-oriented approach to application design and the relational model for database design/implementation 4

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Providing Object Persistence Using Relational Databases Call-level Application Program Interface (API) Call-level Application Program Interface (API) SQL Mapping Frameworks SQL Mapping Frameworks Object-Relational Mapping Frameworks Object-Relational Mapping Frameworks Proprietary Approaches Proprietary Approaches 5

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Call-Level APIs SQL query hand-coded by programmer passed as parameter to driver SQL query hand-coded by programmer passed as parameter to driver Examples: Java Database Connectivity (JDBC), ADO.NET, Open Database Connectivity (ODBC) Examples: Java Database Connectivity (JDBC), ADO.NET, Open Database Connectivity (ODBC) 6

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall SQL Query Mapping Frameworks Allow developers to operate at a higher level of abstraction Allow developers to operate at a higher level of abstraction Examples: iBATIS and iBATIS.NET Examples: iBATIS and iBATIS.NET 7

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall ORM Mapping Frameworks Transparent persistence: Hides underlying storage technology Transparent persistence: Hides underlying storage technology Declarative Mapping Schema: Defines relationship between OO classes and database relations/tables Declarative Mapping Schema: Defines relationship between OO classes and database relations/tables Examples: Hibernate, JDO, Java Persistence API (JPA), Cayenne, TJDO, Prevayler, Speedo, and XORM Examples: Hibernate, JDO, Java Persistence API (JPA), Cayenne, TJDO, Prevayler, Speedo, and XORM 8

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Proprietary Frameworks Example: Example: Microsoft’s Language Integrated Query (LINQ) Microsoft’s Language Integrated Query (LINQ) Goal: Goal: very closely integrate data access queries into programming languages, not limiting the access to relational databases or XML but any type of data store very closely integrate data access queries into programming languages, not limiting the access to relational databases or XML but any type of data store 9

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall 10

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Example Hibernate Mapping 11

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Example Hibernate Mapping 12 Figure 14-6 Relational database implementation

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Example Hibernate Mapping 13 An ORM mapping

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Example Hibernate Mapping 14 Another ORM mapping

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Example Hibernate Mapping 15 Another ORM mapping

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall Responsibilities of ORM Mapping Frameworks Providing a layer of abstraction between OO applications and a database schema implemented with a DBMS ➝ transparent persistence Providing a layer of abstraction between OO applications and a database schema implemented with a DBMS ➝ transparent persistence Generating SQL code for database access Generating SQL code for database access Centralizing code related to database access Centralizing code related to database access Support for transaction integrity and management Support for transaction integrity and management Services for concurrency control Services for concurrency control Query language (e.g. Hibernate’s HQL) Query language (e.g. Hibernate’s HQL) 16

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall ORM Database Performance Management Fetching strategy – a model for specifying when and how an ORM framework retrieves persistent objects to the run-time memory during a navigation process Fetching strategy – a model for specifying when and how an ORM framework retrieves persistent objects to the run-time memory during a navigation process N+1 selects problem – a performance problem caused by too many SELECT statements generated by an ORM framework N+1 selects problem – a performance problem caused by too many SELECT statements generated by an ORM framework Lazy vs. eager loading Lazy vs. eager loading 17

Chapter 14 © 2011 Pearson Education, Inc. Publishing as Prentice Hall 18 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall