Browse Prior Art Database

Method for Deleting Records from a Hierarchical Data Base

IP.com Disclosure Number: IPCOM000045688D
Original Publication Date: 1983-Apr-01
Included in the Prior Art Database: 2005-Feb-07
Document File: 3 page(s) / 27K

Publishing Venue

IBM

Related People

Crus, RA: AUTHOR [+3]

Abstract

This article describes a method for deleting a record and its children from a hierarchical data base. Responsive to an invoking procedure identifying a target record to be deleted, a computing apparatus is operated according to the steps of: 1) determining whether the target record has a child, and 2) if so, recursively invoking the delete procedure with the child as the target record, and 3) if not, deleting the target record and returning to the invoking procedure.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 54% of the total text.

Page 1 of 3

Method for Deleting Records from a Hierarchical Data Base

This article describes a method for deleting a record and its children from a hierarchical data base. Responsive to an invoking procedure identifying a target record to be deleted, a computing apparatus is operated according to the steps of: 1) determining whether the target record has a child, and 2) if so, recursively invoking the delete procedure with the child as the target record, and 3) if not, deleting the target record and returning to the invoking procedure.

The method will be described further with respect to an illustrative improvement to the IBM Information Management System (IMS/VS).

Using IMS/VS, stored record instances may be linked together in a hierarchical structure. A stored record "instance" is described by a "template" called a record type descriptor or record type. The hierarchy comprises instances of different record types which are linked together such that an instance of one record type (which plays the "parent" role) may have zero or more instances of another record type linked to it as "children". Fig. 1 shows record type A as a parent with record types B and C as children of A and record types D and E as children of B. A parent record type may have more than one child record type, and also a record type that plays a child role to a parent may in turn be a parent of other record types. Fig. 1 illustrates how record types show the general form of a hierarchy.

Fig. 2 shows how a single instance of the hierarchy might look.

In this example A1 has two B-type children B1 and B2 and a single C type child C1. B1 has children D1, D2 and E1 thru E5, while B2 has no children. In general, the existence of a "child" instance is dependent on the existence of its "parent" instance, and therefore when a parent record instance is deleted, all of its children must also be deleted.

The number of possible levels in a hierarchy is essentially unlimited as is the number of record instances at each level. ln one possible example, it is theoretically possible to define 2*11 different record types, each having 2*31 record instances. If there is one (and only one) record type at each level, and if each record type appears only at one level of the hierarchy, then 2*11 levels could be defined. Since any parent may have 0 or more children, the actual number of levels below any point in the hierarchy...