Exforsys

Online Training

Patterns for Object Relational Mapping

This is a discussion on Patterns for Object Relational Mapping within the Software Patterns forums, part of the Testing category; I am student programming in Java . We have just handed in our project which was based on Java/JSP/MySQL ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-15-2005, 02:59 PM
Antwarrior
Guest
 
Posts: n/a
Patterns for Object Relational Mapping

I am student programming in Java . We have just handed in our project
which was based on Java/JSP/MySQL technology. When we started the
project we had a
few tables in the databases and mapping the classes from the database
to
their representitive classes in the program was fairly trivial. However
as the complexity of the database grew and a few refactorings later the
mapping of the tables became quite monotous with a few interface
changes for some of the classes with diffrerent PK setups.


I would like to know if there are any patterns available for solving
this kind of problem ( mapping tables to Classes/Objects ) , or if
there is anyway of generalising the interface for C.R.U.D operations
while supporting different types of PK.

We had an interface like so:

public interface DataInfo {

public getById ( int Id );

public update ( DataObject aDO );

public delete ( DataObject aDO );

public create ( DataObject aDO);

};


This worked for a while but for the tables with PK(tableId1, tableId2)
it needed modification. ... Any pointers or ideas would be welcome

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-30-2005, 04:57 PM
Fred
Guest
 
Posts: n/a
Re: Patterns for Object Relational Mapping

This is a large and well studied issue. I can't ,myself, speak very
well of it, but I can point you in the directions of others who can.

Scott Ambler is an excellent source:
http://www.agiledata.org/essays/mappingObjects.html
and
http://www.agiledata.org/essays/impedanceMismatch.html

OA's present an understandable view of ORM:
http://www.objectarchitects.de/Objec...erns/index.htm

And for a good source of references, as well as a good discussion of
the issues, Ward Cunningham's wiki is helpful:
http://c2.com/cgi/wiki?ObjectRelatio...edanceMismatch

Good luck with this, and welcome to the hell through which many have
strived before.

-Fred

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-31-2005, 07:01 AM
jjoaquinf@gmail.com
Guest
 
Posts: n/a
Re: Patterns for Object Relational Mapping

Fred wrote:
> This is a large and well studied issue. I can't ,myself, speak very
> well of it, but I can point you in the directions of others who can.
>
> Scott Ambler is an excellent source:
> http://www.agiledata.org/essays/mappingObjects.html
> and
> http://www.agiledata.org/essays/impedanceMismatch.html
>
> OA's present an understandable view of ORM:
> http://www.objectarchitects.de/Objec...erns/index.htm
>
> And for a good source of references, as well as a good discussion of
> the issues, Ward Cunningham's wiki is helpful:
> http://c2.com/cgi/wiki?ObjectRelatio...edanceMismatch
>
> Good luck with this, and welcome to the hell through which many have
> strived before.
>
> -Fred


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:21 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.