Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ORM vs object serialization

 
Vijay K Vivek
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recently in one of the design meetings I attended, a colleague posted a question. Why do we need a ORM tool and Why cant we design the objects properly so that we can serialize and deserialize as required?

Can any one let me know what are the advantages / disadvantages of ORM over object serialization and when do we need to use them?

PS: Am I by any chance comparing apples with oranges?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Am I by any chance comparing apples with oranges?


Yes.

Of the top of my head: things an ORM will have out the box that basic object serialization doesn't have (unless you write it your self):
  • Support for a variety of levels of caching
  • Support for transactions
  • A query language
  • Support for locking strategies


  • etc.
     
    Jesper de Jong
    Java Cowboy
    Sheriff
    Posts: 15748
    74
    Android IntelliJ IDE Java Scala Spring
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    vijay vv, please check your private messages. You can see them by clicking My Private Messages.
     
    What are you doing? You are supposed to be reading this tiny ad!
    the new thread boost feature brings a LOT of attention to your favorite threads
    https://coderanch.com/t/674455/Thread-Boost-feature
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!