Results 1 to 3 of 3

Thread: What problem is object persistence and ORM solving?

  1. #1
    Join Date
    May 2014

    What problem is object persistence and ORM solving?


    I have some experience with OOP (Java, C#) and RDBs, but very little exposure to web programming. I am trying to understand what problem object persistence and ORM solves. Of course, I am familiar with the need for data persistence, but I have never encountered a need for object persistence.

    I am not asking about the process of persisting an object to a database and resurrecting it later. I am not asking about why ORM frameworks are useful for doing this or a pain in the butt for doing this. I am particularly interested in how the need arises to map/persist relationships between objects.

    I have seen many examples of persisting POJOs to a database, but the examples all seem to be for very simple objects that are essentially nothing more than records anyway: a constructor, some private fields, and getter/setter methods. This example:


    offers such an example, but goes on to discuss the mismatch issues of granularity, inheritance, identity, associations, and navigation, which are not motivated by the example.

    If someone could offer a toy example of an instance where, say, an inheritance relationship needs to be persisted, I would be grateful. This might be blindingly obvious for anyone who has already encountered this situation but I have not and a great deal of searching and reading has not turned up any examples.


  2. #2
    Join Date
    May 2014
    Whoops, I just realized thread is ultimately under "Client-Side Development." I was looking for an "ORM" or "Frameworks" thread, which do not exist, and finally settled on "General" by default without double checking the hierarchy. Clearly this is not a client-side issue but there is no way to delete this thread and repost it elsewhere. Apologies.

  3. #3
    Join Date
    Aug 2004
    Consider it moved.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center