• Jeff, certainly doing a 1 to 1 mapping of what IMS calls Segments into relational tables will give a reasonable first-cut design.

    Most of the mapped tables will have an obvious PK, but some will not. Because IMS deals with parentage via pointers, it is easily possible to have segments that show no trace of parentage from looking at the columns they contain. For what IMS calls 'physical parents' these relationships are easy to work out from the IMS schema, and additional columns can be added to the relational tables where needed to allow relational parent/child FKs. Just about any database designer who sees a copy of the IMS physical schema can work this bit out even if they do not know IMS.

    What IMS calls 'logical parents' can be harder to discern from the IMS schema, they are definitely there but it needs someone who understands IMS to look for these details. One outcome may be the need to create new relational tables to show many-to-many relationships that are captured in the IMS schema but which do not need a physical object within IMS to materialise them.

    D'oh! I last used IMS many years ago and thought I could safely forget about it. It just shows that everything you learn might become useful again...

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara