3 ms·
However, there were two big limitations with hierarchical databases: first, relationships were pre-determined; what was a parent and what was a child was a deci
by gaius 10y ago
However, there were two big limitations with hierarchical databases: first, relationships were pre-determined; what was a parent and what was a child was a decision made before any data was actually entered
Well, yes and no. IMS was developed for bill-of-materials processing, which is a kind of thing you do in engineering to keep track of all the parts in your thing you're building. It was first used for the Saturn V rocket. At or at least near the top level you would have things like "a booster" and at the bottom level you would have something like "a bolt", "a nut", "a washer". There was no conceivable case in which you'd want to make a bolt out of boosters so having these relationships pre-determined wasn't actually a "limitation" at all, in the sense that it would never, ever stop a user of the system doing what they needed to do with it.
Secondly, queries analyzing the children of different parents are impractical: you would need to traverse the hierarchy to retrieve information for every potential item
The sort of query you'd do with this system would be, I want to make a rocket engine, what exactly do I need to order and how many of them, I want to give this piece of the work to this group, do they have all the parts they need in their inventory, and so on and so on. So that's not really an unreasonable sort of query if you are managing an inventory of parts and the processes that make them into ever bigger parts until finally you have your very top level parent "a moon mission".
- theandrewbailey 10y ago> There was no conceivable case in which you'd want to make a bolt out of boosters... That won't stop idiots from wanting it to happen.
- dragonwriter 10y ago> IMS was developed for bill-of-materials processing Right, and the restrictions that are appropriate for that domain weren't necessarily appropriate for all the other domains to which it was later applied.
- gaius 10y agoSure, my point is that RDBMS are not better they are different. Right tool for the job an' all that.
- dragonwriter 10y ago> Sure, my point is that RDBMS are not better they are different. I can't see any way in which the relational model, either abstractly in or practical application, is less suited to any task than the hierarchical model, and its clearly better suited for many tasks. Its both different and better. The hierarchical model is, especially given the alternatives that existed at the time, good enough for some tasks, sure. There are alternative models that are better suited for some tasks (e.g., graph model), at least on a pragmatic level, but I don't see that the hierarchical model is one of them.
- gaius 10y agoYou can do hierarchical queries in Oracle and now you can in Postgres too[1], but that's a relatively recent innovation and it's still horrible in MySQL[2] IMS is still a huge seller for IBM and a tiny fraction is periodically reinvented and hyped as the latest and greatest thing (e.g. MongoDB) so there are use cases for which it is still the right tool. I feel dirty for saying "MongoDB" and "right tool" in the same sentence. [1] http://stackoverflow.com/q/24898681/447514 http://stackoverflow.com/q/24898681/447514 [2] http://stackoverflow.com/q/7631048/447514 http://stackoverflow.com/q/7631048/447514
- tracker1 10y agoThere's always RethinkDB as probably a better example... I don't really dislike MongoDB, I've used it, aware of its' issues, and liked it. I just find RethinkDB's approach much more sane.
- tracker1 10y agoWhen a normalized entity for real world display and manipulation requires over 30 join operations for a single record and children. Or requires lookup tables (db anti-pattern) in order to keep the number of tables in the schema reasonable. JOINS kill db performance at scale, enough said. This is why document, object, key/value, column and other types of database stores have become very popular in the past decade, precisely because relational RDBMS aren't a good fit, or even good enough in many cases. Don't get me wrong, I'd be much more inclined to use a relational/sql RDBMS in many cases. That doesn't mean they are better in even half the cases.
- jasim 10y agoWhat if you also wanted to know who supplied those bolts, when, and which other parts use that same bolt?
- gaius 10y agoApparently, you can put a man on the moon and return him to Earth without needing that query...