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

From Expertiza_Wiki
Jump to navigation Jump to search
Line 21: Line 21:
== Popular Approaches ==
== Popular Approaches ==


Active Record
 
== Active Record ==
 
=== Limitations ==
 
# No Foreign Key Support: Although RoR lets you define has_many relationships, it makes no effort to create foreign key constraints in the underlying database to ensure relational integrity.
# No Multi-column Primary Key Support: Multi-column primary keys are a staple of relational database schema definition.
 
 


Data Mapper
Data Mapper

Revision as of 00:33, 22 October 2007

Topic

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)


Object relational mapping

Definition

Need

Approaches

Popular Approaches

Active Record

= Limitations

  1. No Foreign Key Support: Although RoR lets you define has_many relationships, it makes no effort to create foreign key constraints in the underlying database to ensure relational integrity.
  2. No Multi-column Primary Key Support: Multi-column primary keys are a staple of relational database schema definition.


Data Mapper

Popular Products

Hibernate

Oslick

References

  1. ORM articles
  2. Active Record was mentioned in this book
  3. A video from RailsEnvy giving a quick and clean introduction to Active Record
  4. A comparison of datamapper and Active Record implementations in Ruby