From: Clifford Heath Date: 2010-11-13T10:00:15+09:00 Subject: Re: ORM's - Don't Do It! Petite Abeille wrote: > On Nov 12, 2010, at 6:18 PM, Phillip Gawlowski wrote: >>> Databases have a wealth of logic, elegance and functionality. Slapping >>> them in the crude harness of ORMs is a most unfortunate and regressive >>> trend. > "The Vietnam of Computer Science" > http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx A well-written and often-quoted argument, but which is still lacking. Ted lists 6 possible balancing-points between objects and relations, but fails in thinking that these six exhaust the possibilities. The O-R impedance problem is caused by them both being attribute-oriented, but using different principles for determining which things are attributes and which things are entities/objects. Fact-oriented modeling (or semantic modeling, as I like to call it) is attribute-free. The decisions about attributes vs entities/objects is made mechanistically, which produces a good relational model *and* a good object model which always remain in perfect lock-step, allows the possibility of automatic data migration, and has many other advantages, including natural- language modeling. My "activefacts" gem provides an implementation of the Constellation Query Language, a semantic modeling language. Generators for existing Ruby O/RMs are still under development, though an early stage DataMapper generator is there. I plan to expand ActiveFacts to provide a new O/RM solution which is more in keeping with the fact-oriented approach, but that's also still in development. I'm not of the view that it's a good thing to try to shoe-horn the relational calculus into the Ruby syntax, as AREL, Sequel and DataMapper attempt. While it's cute that the Ruby syntax makes it possible, I don't think this solves the big problem(s). Good language integration is always a good thing, but I have a different approach to it. Anyhow, if you're interested, you can "gem install activefacts" and find more details at . Clifford Heath, Data Constellation, http://dataconstellation.com Agile Information Management and Design.