Exercise 3: Why a DL/I Program Can't Simply Be Pointed at DB2 Instead — Possible Solution ==================================================================== WHAT DB2 GENUINELY IS, PER THIS CHAPTER'S OWN MATERIAL This chapter's own material describes DB2 as using a real relational model, tracing back to Codd's own 1970 theory - data organized into real tables, accessed and queried through real SQL statements like SELECT, embedded directly via EXEC SQL blocks and processed by a real precompiler into CALL statements against DB2's own runtime library. WHAT IMS GENUINELY IS INSTEAD, PER THIS CHAPTER'S OWN MATERIAL IMS, by contrast, is described as using a real hierarchical model - a fundamentally different real way of organizing data, accessed not through SQL at all but through real DL/I calls. This chapter's own material is explicit that IMS predates DB2 substantially, with real development beginning in 1966, and that its whole underlying data structure and access method are genuinely different from DB2's own relational, SQL-based approach. WHY THIS IS A GENUINE STRUCTURAL DIFFERENCE, NOT JUST DIFFERENT SYNTAX A DL/I call navigates a real hierarchical structure - parent segments, child segments, genuine positional relationships within that hierarchy. A SQL statement, by contrast, operates against real relational tables with no inherent hierarchical structure at all, using an entirely different real query language. These aren't two different dialects for expressing the same underlying request; they are two genuinely different ways of modeling and accessing data in the first place. WHY SIMPLY "POINTING" A DL/I PROGRAM AT DB2 GENUINELY CAN'T WORK A program written with real DL/I calls is written specifically to navigate IMS's own hierarchical structure - its calls have no equivalent real meaning against a DB2 relational table, which has no genuine parent/child segment hierarchy for those calls to navigate at all. Making that same real logic work against DB2 would require rewriting the actual data-access code itself, replacing DL/I calls with real EXEC SQL statements built around SQL's own relational query model - not simply redirecting the same calls at a different real target system. ANSWER: DB2 uses a real relational model accessed through SQL, embedded via EXEC SQL and processed by a precompiler into real CALL statements, while IMS uses a genuinely different real hierarchical model accessed through DL/I calls that navigate parent/child segment structures with no equivalent in a relational table. Because these are two structurally different ways of organizing and accessing data - not just two different syntaxes for the same underlying request - a program written with DL/I calls against IMS's own hierarchical structure can't simply be redirected at DB2; DB2's relational tables have no hierarchical structure for those calls to navigate, so the actual data-access logic would need to be rewritten using real SQL statements instead. WHY THIS WORKS AS AN ANSWER ------------------------------ This correctly identifies the real structural (not merely syntactic) difference between hierarchical and relational data models, and explains concretely why that difference makes a straightforward redirect impossible rather than simply asserting the two systems are "different."