MIT 6 830 - Lecture Notes (3 pages)

Previewing page 1 of 3 page document View the full content.
View Full Document

Lecture Notes



Previewing page 1 of actual document.

View the full content.
View Full Document
View Full Document

Lecture Notes

81 views

Lecture Notes


Pages:
3
School:
Massachusetts Institute of Technology
Course:
6 830 - Database Systems

Unformatted text preview:

ORM Problem Impedance Mismatch i e different languages for data and programming need casting between types makes analysis dif cult Solution Object Relation Mapping middleware provide an persistence abstraction for objects and takes care of transformation from to the DB world Everyone who is somebody has one Either standard e g hibernate or ad hoc The idea is to provide pre canned mapping between OO classes elds and table columns manually de ned mappings provides object persistency without looking at the DB Good abstraction ease of debug Bad performance Example Hibernate Application dialogs Swing SWT Web application Application logic Class Order Class Customer Instance of Customer class Hibernate Row of Customer table Database Table Order id number date customer id Table Customer id firstname lastname Image by MIT OpenCourseWare Example of Hibernate Mapping xml version 1 0 encoding UTF 8 DOCTYPE hibernate mapping PUBLIC Hibernate Hibernate Mapping DTD 3 0 EN http hibernate sourceforge net hibernate mapping 3 0 dtd hibernate mapping class name de laliluna example Honey table honey id name id column id generator class increment id property name name column fooname property name taste column bartaste class hibernate mapping Example of Hibernate Usage many details are hidden Honey honey new Honey honey setName forest honey honey setTaste very sweet tx session beginTransaction session save honey tx commit tx session beginTransaction session update honey tx commit tx session beginTransaction List honeys session createQuery select h from Honey as h list tx commit Next we talk about DriadLINQ it provides similar features but adds much more in particular LINQ language integration Batch oriented Cluster oriented More than SQL MIT OpenCourseWare http ocw mit edu 6 830 6 814 Database Systems Fall 2010 For information about citing these materials or our Terms of Use visit http ocw mit edu terms



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Lecture Notes 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 Lecture Notes 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?