DOC PREVIEW
K-State CIS 764 - Object Relational Mapping

This preview shows page 1-2-19-20 out of 20 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CIS 764 Database Systems EngineeringSlide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Fall 2007 http://www.cis.ksu.edu1CIS 764 Database Systems EngineeringL11: Object Relational Mapping … (a) ORM, Object persistence (b) Pets sequence modelsFall 2007 http://www.cis.ksu.edu2CIS 764 Database Systems Engineering Objects are transient .. they last as long as run environment is alive (as long as a middleware session) Object persistence is the automatic save/load of object state to some persistent storage form (e.g. persisting between sessions). Example storage: binary data files (e.g. Word doc) XML files (e.g. UML XMI) relational data base (using SQL) <<<< Object data base Note: first three save only the state, not the methods. http://www.idt.mdh.se/kurser/cd5130/msl/2006lp4/reports/drafts/object_persistence.pdfFall 2007 http://www.cis.ksu.edu3CIS 764 Database Systems Engineering Object persistence there are two issues: the form (format) of persistent storage the mapping of scalar data values. (e.g. Java and Oracle data types are not identical).Fall 2007 http://www.cis.ksu.edu4CIS 764 Database Systems Engineering Objects to relational data base (using SQL) is Object-Relational-Mapping. It can go both ways: objects -> tables tables -> objects (you used this in ADF assignment)Fall 2007 http://www.cis.ksu.edu5CIS 764 Database Systems EngineeringFall 2007 http://www.cis.ksu.edu6CIS 764 Database Systems EngineeringFall 2007 http://www.cis.ksu.edu7CIS 764 Database Systems Engineering Which way do we want to go?Fall 2007 http://www.cis.ksu.edu8CIS 764 Database Systems Engineering Which way do we want to go? Ans1: Design at the conceptual level: ER conceptual domain model (class model) Ans2: Build web applications for existing tables.Fall 2007 http://www.cis.ksu.edu9CIS 764 Database Systems Engineering Impedance mismatch … refers to the difference in concepts between object models and table model. There is (IMHO) a reasonable mapping of object concepts to tables; not so clear mapping backwards. See following for discussions of mismatch: http://c2.com/cgi/wiki?ObjectRelationalMapping http://en.wikipedia.org/wiki/Object-Relational_impedance_mismatchFall 2007 http://www.cis.ksu.edu10CIS 764 Database Systems Engineering Impedance mismatch … some issues: * single persistent object may spans several tables * objects "ownership“ ↔ relational * Objects have "getters"; expensive to submit several queries for single row. * RDBMSs are faster on global queries; object faster for small scope (single objects). * inefficient to keep objects synchronized with databaseFall 2007 http://www.cis.ksu.edu11CIS 764 Database Systems Engineering One suggestion is to map to object database: not for 764 focus … inefficient for object persistence in 3 layer model not likely transition for existing DB applications.Fall 2007 http://www.cis.ksu.edu12CIS 764 Database Systems Engineering OR tools available for most language platforms and target DBMS: http://en.wikipedia.org/wiki/Object-relational_mapping http://en.wikipedia.org/wiki/List_of_object-relational_mapping_softwareFall 2007 http://www.cis.ksu.edu13CIS 764 Database Systems Engineering OR tools use w attributes in objects w configuration files w development wizards ( JDev)Fall 2007 http://www.cis.ksu.edu14CIS 764 Database Systems Engineering Toplink ( ~ 1995 ??) purchased by Oracle in 2002 objects and beans to DB or XML (targets multiple DBs) integrated with JDeveloper; http://www.oracle.com/technology/products/ias/toplink/index.html http://en.wikipedia.org/wiki/TopLink … donated for open source Eclipse project, … used for Sun EJB3 reference implemenation …. You implicitly used it for ADF homeworkFall 2007 http://www.cis.ksu.edu15CIS 764 Database Systems Engineering JDO Java Data Objects (~2003) http://java.sun.com/products/jdo/ a standard interface-based Java model abstraction of persistence; applications are portable, and independent of the underlying database (provided there is a JDO mapping) can be used with POJO or with EJB; uses a persistence manager class; but ... has not been a dominant technologyFall 2007 http://www.cis.ksu.edu16CIS 764 Database Systems Engineering Hibernate http://www.hibernate.org/ (~2004) express queries in SQL extension (HQL) or native SQL or with an object-oriented Criteria and Example API; open source project ; entity manager for EJB3.0; generates a configuration file that defines the mapping key component of JBoss (http://www.jboss.com/products/index) integrates with Eclipse http://www.myeclipseide.com/ContentExpress-display-ceid-61.html the major ORM tool .Fall 2007 http://www.cis.ksu.edu17CIS 764 Database Systems Engineering NHibernate …. port of the core to the .NET Framework; Suspend2 http://www.suspend2.net/ … Linux equivalentFall 2007 http://www.cis.ksu.edu18CIS 764 Database Systems Engineering Ruby-on-Rails http://www.rubyonrails.org/ a "full-stack" framework for developing DB web applications; follows the Model-View-Control pattern; includes Active Record persistence framework; an "agile programming" approach ... based on the Ruby language http://www.ruby-lang.org/en/ (~1995) “Active Record” name comes from the pattern for object that wraps a DB row ( e.g. an entity ejb). See also Enterprise patterns <<<<<<<<<<<<<<<<<<<< http://www.martinfowler.com/eaaCatalog/index.htmlFall 2007 http://www.cis.ksu.edu19CIS 764 Database Systems Engineering Django http://www.djangoproject.com/ (~2005) a high-level Python Web DB framework includes ORM … configuration defined in Python code. Includes a sample app in the tutorial .Fall 2007 http://www.cis.ksu.edu20CIS 764 Database Systems Engineering … many others .


View Full Document

K-State CIS 764 - Object Relational Mapping

Documents in this Course
Load more
Download Object Relational Mapping
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Object Relational Mapping and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Object Relational Mapping 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?