CSC/ECE 517 Fall 2007/wiki2 2 aa: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 22: Line 22:
=Reference=
=Reference=
# [http://en.wikipedia.org/wiki/Object-relational_mapping Wikipedia Definition]
# [http://en.wikipedia.org/wiki/Object-relational_mapping Wikipedia Definition]
# [http://www.chimu.com/publications/objectRelational/ Foundations of
# [http://www.chimu.com/publications/objectRelational/ Foundations of Object-Relational Mapping]
Object-Relational Mapping]
# ORM Thesis[http://digitalcommons.macalester.edu/context/mathcs_honors/article/1006/type/native/viewcontent/]
# ORM Thesis[http://digitalcommons.macalester.edu/context/mathcs_honors/article/1006/type/native/viewcontent/]
# [http://www-128.ibm.com/developerworks/java/library/j-cb03076/index.html Crossing borders: Exploring Active Record ]
# [http://www-128.ibm.com/developerworks/java/library/j-cb03076/index.html Crossing borders: Exploring Active Record ]

Revision as of 15:47, 21 October 2007

Object-relational mapping. Ruby's ActiveRecord is one attempt to allow an object-oriented program to use a relational database. The Crossing Chasms pattern is another. Look up several approaches to mapping relational databases to o-o programs, include hyperlinks to all of them, and explain how they differ. Report on the strengths of various approaches (making sure to credit the authors for their insights).

Introduction

Object-oriented programming uses Object to manage data. Objects have identity, state, and behavior, which means Object is focus on identity and behavior of the things in real world. However relational database is focus on information. It is a collection of relation variables between the attributes in table, it describes the complete state of an information model.

Object-relational Mapping

Object-relational mapping is a programming technique or process to transform data between relational database and a set of objects in object-oriented programming.

Implementations

ActiveRecord in Ruby

Crossing Chasms Pattern

Hibernate

Service Data Object

Comparison

In Hibernate, you'd usually begin development by working on your Java objects because Hibernate is a mapping framework. The object model becomes the center of your Hibernate universe. Active Record is a wrapping framework, so you start by creating a database table. The relational schema is the center of your Active Record universe. Active Record also includes some features that many Java frameworks don't have, such as model-based validation.Model-based validation lets you make sure the data within your database stays consistent.

Reference

  1. Wikipedia Definition
  2. Foundations of Object-Relational Mapping
  3. ORM Thesis[1]
  4. Crossing borders: Exploring Active Record

External Links

  1. O/R Mapping Products

222. [2]