Bill Karwin has a blog post called "Why Should You Use An ORM?" which is being discussed on Reddit and I was confused about a couple of points.
In it he says in the comments section:
OODBMS and ORM works only on objects that we've instantiated in the application layer. I.e. there's no way to do a query like this:
UPDATE Bugs SET status = 'CLOSED' WHERE status = 'OPEN';
To do this in an ORM or an OODBMS, you'd have to fetch all bugs that match the criteria and instantiate objects for them. Then you could set the attribute and save the objects back to the database one by one. This is expensive and certainly requires more code than the equivalent SQL operation shown above.
This illustrates an advantage of a language like SQL that treats sets as a first-class data type. The OO paradigm cannot substitute for the relational paradigm in all cases. There are some ordinary operations that SQL can do much better.
I bolded the part where he says you have to instantiate objects for these bugs when you use an ORM because that's the part I'm confused about.
My question is why do you have to? Okay, object-oriented is one thing and relational is another. But is it really true that they are so different that there is no way to represent an object so that it can be understood by the relational database? For example, I'm thinking about how you can serialize an object and then it gets written into a file-storable format. Couldn't you use a format like that to transfer the object to a relational database?