Reginald Braithwaite blogs that Relational Calculus is about Relations, not Rows, quoting from this entry at Enfranchised Mind:
To faithfully model SQL we must, on some level, faithfully model the relational calculus. And this is where I think the Object Oriented programmers go astray in trying to interface to SQL. In their hurry to make things into objects, they immediately (and without fail) declare the rows to be objects–and thus miss the fact that relational calculus and thus SQL is about relations, not rows.
I’ve often said that complex problems are just simple problems which are not well defined or correctly articulated. OO-heads rage against the ORM problem because they’re not solving the ORM problem, they’re solving something else. To solve the ORM problem, you have to understand that the basis of the problem is in adequately representing the fundamental operators of relational calculus–join, selection, projection–then combining them in ways that produce higher-order behaviors which implement the functionality required.
Simply serializing objects into a matrix representation is not “solving the ORM problem.” This is my biggest criticism of the ActiveRecord in Ruby on Rails: if your problem is so simple that pregenerated scaffolds and ActiveRecord is adequate, then your problem is so trivial it’s non-interesting. The challenge is for an OO language to facilitate representing the relations between objects, the semantic information about how one object’s data values can be derived using the three relational calculus operators from other data. At that point, why not simply learn and use SQL directly, rather than extending your favorite language with what is essentially a dialect of SQL?
Of course, when the majority of software developers are just tool users and not artisans who actually create things, it’s really a moot point. “Web 2.0″ has brought us a lot of new applications, but they’re all fundamentally the same. Ruby on Rails and ActiveRecord offers a solution to the CRUD problem to the tool users, but that hasn’t been interesting for years now. What’s needed now is a way to provide the mass of tool users to create novel permutations of the tools they have, not just continue to replicate slightly varied instances of them.
Tags:
Reginald Braithwaite,
programming,
relational calculus,
object-relational mapping,
Ruby on Rails,
ActiveRecord
May 20th, 2009 at 7:47 pm
Hello Dossy, I'm coming back after some time still surprised with good news. Native Broadcom support in kernel (b43 driver) has ...
May 19th, 2009 at 10:16 pm
God conceived of–not literally “created”–everything at once but that some would only come to manifest at a certain point in ...
May 19th, 2009 at 7:53 pm
Hey Dossy your Twitter Karma tool is very nice, thank you for creating it. "Similarly, the pro-evolution arguers insisting that such ...
May 18th, 2009 at 10:49 am
Hello, The Electronic cigarette do not quit smoking, nothing replaces the will. However, it can replace some cigarettes daily and allows ...
May 17th, 2009 at 1:25 am
1 Corinthians 10:13 (New International Version) 13 No temptation has seized you except what is common to man. And God is ...