Exforsys
+ Reply to Thread
Results 1 to 3 of 3

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 technology. ...

  1. #1
    Antwarrior Guest

    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




  2. #2
    Fred Guest

    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




  3. #3
    jjoaquinf@gmail.com Guest

    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





    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...