Yoz Grahame's Unresolvable Discrepancy

I came here to apologise and eat biscuits, and I'm all out of biscuits

Object relational persistence

Posted: August 21st, 2002 | 3 Comments »

For some reason I’ve always wanted to play with object-oriented persistence into relational tables. This is when you code in an OO style and your objects are automatically persisted into a RDBMS tables without you having to write SQL – the framework converts your object structure back and forth. I wrote a simple class set for h2g2 but I’ve never used any proper frameworks for it. Tangram is a popular system for Perl which Jo recommended; I haven’t really had an excuse to use it yet. There are various systems for Java, since OR is well-suited to J2EE Entity beans, and Hibernate looks really good: very feature-rich, and the documentation definitely talks the talk.


3 Comments on “Object relational persistence”

  1. 1 Alaric said at 10:48 am on August 21st, 2002:

    Our experience with this stuff is that it’s horribly horribly shit!
    Basically, once you’re using an RDBMS as a place to store serialised objects, you’re better off with something like a raw DBM file. If you’re not really *using* that complex SQL data management layer between the DBM file and your application, then getting rid of it can produce large speed improvements and easier coding.

  2. 2 Yoz said at 7:37 am on August 22nd, 2002:

    But this is about more than just using an RDBMS as a big storage vat for opaquely-serialised objects, which is useless. The point is to store this stuff in a database that’s good at querying, and in a way that translates to a proper schema rather than serialising. While these frameworks let you avoid SQL if you want to, they don’t mean that nobody can use it. Your heavy DB coders and admins can write (or use) big SQL report tools, while your appliation coders don’t have to touch that stuff.

  3. 3 Alaric said at 4:01 pm on August 22nd, 2002:

    Are you talking about the JAWS type thing where the objects are turned into ‘real’ SQL rows? Sorry, I thought you meant serialisation.
    Yes, there is more utility in that approach, but there are impedance matching problems… that’s what container managed entity beans in EJB try to do, but keeping schema and class in synch can be a problem, as can inheritance; I’ve not seen it done elegantly yet.
    I’d rather just ditch SQL :-) SQL is the bane of my life!

Archive

The complete list of posts lives here.

yoz's bookmarks

  • How we use Redis at Bump - Bump Dev Blog 2011/07/16
    How Redis became Bump's Swiss Army Knife to solve all kinds of data-related problems
  • Heroku | The New Heroku (Part 4 of 4): Erosion-resistance & Explicit Contracts 2011/06/29
    Fascinating description of how Heroku's recent changes are aimed at killing software erosion (or what I think of as "bitrot").
  • What are the most interesting HTML/JS/DOM/CSS hacks that most web developers don't know about? - Quora 2011/06/17
    Marvellous collection of JS, CSS & HTML hacks. Did you know you can get the browser to parse a URL or escape HTML for you, with existing JS functions? (via gnat)
  • Avatars In Motion 2011/05/21
    "This blog is to show all the beauty you can find in Second Life." Gorgeous photography of great SL locations. (via Hamlet)
  • Gabe Newell on Valve | Game development | Features by Develop 2011/05/14
    Great, inspirational interview on how they hire and organise.
  • Design @ Quora (Web2.0 Expo Presentat... by Rebekah Cox - Quora 2011/05/03
    "Great design is all the work you don't ask the people who use your products to do."
  • David Kelley on Designing Curious Employees | Fast Company 2011/04/20
    "In this interview, he explains why leaders should seek understanding rather than blind obedience, why it’s better to be a coach and a taskmaster and why you can’t teach leadership with a PowerPoint presentation."
  • GIRP 2011/03/29
    Ingenious, tricky rock-climbing game which ends up being Twister for your keyboard (via infovore)
  • Goodnight Room - Skogkatt - Goodnight Moon - Margaret Wise Brown [Archive of Our Own] 2011/03/15
    "Goodnight Moon" fanfic, in which the room is actually travelling through space, the old lady is actually a stuck hologram, and this is wonderfully creepy yet still heartwarming.
  • Travel Hacks: What are the best travel hacks? - Quora 2011/01/24
    One of those super-compilation questions that shows off Quora at its best. Most tips are for heavy travellers, but some good ones for backpackers and adventurers too.

yoz on twitter

    follow me on Twitter

    Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

    Content licensed under the Creative Commons (Attribution - Share Alike) | Theme based on Clean Room by Columbia, MO Web Design