With the object paradigm, you traverse objects via their relationships whereas with the relational paradigm you join the data rows of tables. Scott Ambler has a good discussion of the Object-Relational Impedance Mismatch. He also describes The Cultural Impedance Mismatch Between Data Professionals and Application Developers (e.g. "Data professionals that claim that your object/component models must be driven by their data models"), Why Data Models Shouldn't Drive Object Models (And Vice Versa).
What about XML hierarchies and database tables. Here's a good article on storing trees in tables. How do you store a tree in a database table? He discusses a couple of challenges with typical approaches and presents a novel approach.
Some issues in the XML to Objects mapping: Revealing the X/O impedance mismatch (Changing lead into gold). In general I love working with JAXB and it is now part of the JDK. It's a breeze to auto-generate classes from XML schema that can then be used to import and export XML from your code. Strangely, there's a lack of up-to-date tutorials on using xjc from Java 6 or later. I will add that to my todo list.
"I believe the fundamental problem with the database solution comes from the fact that it is often slapped on an application by default. “We need persistence.” “Well, let’s use a database [and the ORM]“. is a good quote from Best alternative to RDBMS and ORMs : Terracotta | Taranfx: Technology Blogbase [and the ORM]“.
Other links:
- Object-relational impedance mismatch - Wikipedia, the free encyclopedia
- ORM - The Leaky Abstraction
- Inheritance vs Relational Databases in RoR
- Implementing Type hierarchies "There are three common patterns for mapping type hierarchies to database tables. Martin Fowler uses the following names for these patterns: Single Table Inheritance, Class Table Inheritance, and Concrete Table Inheritance"
- How XML Threatens Big Data : Dataspora Blog "Data lives in relational databases or as data structures in programs. The common import and export formats of these environments do not resemble XML, so much effort is dedicated to making XML fit. When more time is spent on inter-converting data — serializing, parsing,translating — than in using it, you’ve created a data bureaucracy."
No comments:
Post a Comment