To me it does come down to a question of cost vs flexibility.
The
hierarchical approach has proven a suitable basis for the web (a network of tree 'documents') and has
also remained important in some specific database scenarios, where the
data can be modelled 'adequately' that way and performance is critical,
specifically medical records and financial accounts. I read that the
hierarchical MUMPS database/language is still important in these
scenarios. It's also the underlying foundation of several significant object database
products InterSystems Cache (being used for a European Space Agency Star
mapping project) and interestingly EyeDB which was originally IDB and developed for one of the initial human genome projects.
Hierarchical databases are very performant, provided you just
traverse the hierarchies. This seems to me to offer very significant
cost benefits, both in the effort of creating such a db (yes, the data-model
is relatively intuitive), and in getting the information from the user
to the database and back again (e.g. XRX).
Hierarchical databases lack flexibility in queries and that is where
relational databases have their strength, and also in preventing update
anomalies from occurring. But doing lots of joins is expensive and so
people have abandoned relational databases for very large datastores and
gone to the 'document' (JSON) databases of the NoSQL movement (take
your pick of the options there).
My personal attitude to relational databases was dented when a
scientist in a meeting described my lovingly crafted ER diagram as "another
horrendogram". Pretty soon after that I discovered XML databases and
XForms and I became interested in XML Schema as a 'hierarchical
data-model', not just a means of validating XML documents. To my mind
such data-models must sit in the middle of everything else (go XForms!!)
The 'Domain Driven Design' school of Eric Evans places 'clarification of terminology' at its centre in order to build valid models, or even to decide if more than one model of the same things is needed for different groups.
As Hans said hierarchical diagrams can be well understood by most. ER
diagrams and UML not so. I spent most of a year trying to convince
colleagues of the validity of this point of view at my last job, towards
the end I'd half convinced some scientists, the IT folk weren't that
interested sadly, XML is virtually unused in science, other than HTML, I feel.
It seems to me that the navigational capabilities of XQuery
via XPath actually goes a long way to overcoming this querying
limitation of the hierarchical databases, and given that the XQuery is
integrated with indexes in XML databases, it becomes very powerful I
think.
In terms of the limitations of XML Schema for modelling, to me
these are overcome by thinking about the nature of relationships, we
can think initially about everything being separate, like in an OO
model, and references connecting things together, this is the graph
approach. But then you can logically 'aggregate' some child things
within a parent thing, they are 'owned' and don't have any logical reason to
be kept separate (e.g. medical record and bank account examples).
But what if there is more than one owner i.e. a
many-to-many, relationship? My solution proposal, qualify the
relationship (parent/non-exclusive-ownership/co-owner=IDREF).
One
big issue in relational databases is code list tables, these are kept
separate in tables for normalisation, in a hierarchical system this must
be completely ignored I wonder, storing a text-string code instead of a numeric
foreign key takes more memory but I think that this is not now very important,
update anomalies can be an issue, but only if the system is dumb enough
to allow it to happen (the client needs to know the schema as well as
the server). Again its a question of the nature of the relationship,
when is something to be a code list member?.
Anyway, its good that this discussion is occurring, I suspect this is
all old news in the web standards world but now starting to become more
relevant to databases with the 'hegemony' of the relational model being
challenged.
Hope this is of interest, its been a big question in my mind for a while now.
Steve Cameron