Market share is more important than engineering efficiency
Here’s a quick one — Do you know how many code-bases DB/2 has?
The obvious answer, of course, is — or should be! — ONE, right?
Well, it turns out that the actual answer is FOUR, one for each of their (major) product lines, viz, the AS/400, MVS, and R/6000 (as well as one for VM, but more on that in a bit).

As to “Why? For gods sake, WHY SO MANY CODEBASES?”, it really comes down to Mechanical Sympathy.
Each of IBM’s hardware lines has dramatically different hardware/OS models. For example, the AS/400 line uses a seriously flat memory model, where memory and disk addresses are indistinguishable, and objects move transparently between them. What’s more, the whole system is capability based (pointers to an object in memory/disk include the security permissions necessary to get at them). The R/6000 line, OTOH, very much does not have this 😆.
And that takes us directly to the tradeoff between Abstractions and Performance. As somebody smart once put it,
if you’re going through the “Make it Work → Make it Right → Make it Fast” sequence, and have somehow (hallelujah!) managed to get to the Make it Fast stage, well, this is almost exactly where the abstractions can start biting you in the butt
So, in this case, IBM could go ahead and
• totally abstract away the AS/400 hardware features, or
• build them out in software for the R/6000
but either of would be a seriously losing bet, since the name of the game in DatabaseWorld™ is performance. Performance leads directly to market share (at least, in this corner of the world), and market share is even more important than engineering efficiency!
Hence, different code bases for different systems…
By the way, in case you’re wondering about the fourth code-base for VM, it was basically what came from the original the productization of the System R database, the sun-source of SQL. It’s from way back (1974!), and is still maintained, largely ‘cos, being IBM, there are still customers using it. For way more on this, check out this excellent writeup.
