IMS segment
The basic unit of data in an IMS database, arranged in a hierarchy of parents and children.
Also written segment, root segment, parent segment, child segment, segment occurrence
IMS stores data as a hierarchy, like a family tree, and each item in that tree is a segment. A segment is a group of fields, similar to a row in a table or a record in a file.
The segment at the top is the root. A bank's customer database might have a CUSTOMER root segment. Below it are child segments, such as ACCOUNT, and below each account, child segments such as TRANSACTION. A segment above another is its parent. Each segment type is defined once, but there can be many occurrences of it: one customer, five accounts, thousands of transactions.
The root segment usually has a key field, such as the customer number, which IMS uses to find it quickly. Child segments are reached through their parent. To read a transaction, a program goes to the customer, then the account, then the transaction.
This structure is very fast when the data really is a hierarchy and the programs follow it. It is less flexible than DB2 tables, where any column can be searched and joined. Both are still widely used, often side by side at the same site.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- IMSAn older IBM transaction manager and hierarchical database, still running some of the highest-volume systems in the world.
- DL/IData Language/I: the set of calls a program uses to read and update an IMS database.
- DB2 for z/OSIBM's relational database on the mainframe, where a great deal of the world's banking and insurance data is stored.
- Legacy systemAn older system still doing essential work. On the mainframe, usually code that has been correct and running for decades.
- Primary keyThe column or columns that uniquely identify each row in a table, so no two rows share the same value.