Browse Prior Art Database

Data Base Retrieval System

IP.com Disclosure Number: IPCOM000083853D
Original Publication Date: 1975-Aug-01
Included in the Prior Art Database: 2005-Mar-01
Document File: 5 page(s) / 32K

Publishing Venue

IBM

Related People

Jones, AU: AUTHOR [+2]

Abstract

A system of APL functions is described which provides capabilities to define a data base; enter, modify and update the data; search it using logical comparisons and relations among fields; perform arithmetic computations on fields; and print listings and generate formatted reports for all, or any selected fields and/or lines.

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 35% of the total text.

Page 1 of 5

Data Base Retrieval System

A system of APL functions is described which provides capabilities to define a data base; enter, modify and update the data; search it using logical comparisons and relations among fields; perform arithmetic computations on fields; and print listings and generate formatted reports for all, or any selected fields and/or lines.

DATA BASE STRUCTURE: A Data Base Retrieval System (DBRS) data base consists of a two-dimensional character matrix and its controlling global variables. The matrix is logically divided into N fields, each of a user-specified number of contiguous columns; a field may have anywhere from one to M columns, where M is bounded only by the limit of the workspace size. The figure shows the layout of a data base with six fields of different widths. The number and names of the fields and their widths are specified by the user when the data base is initialized, and are used by DBRS to establish values of the control variables.

In the figure, SIZ is the vector 6 15 1 3 3 120. The field names are DATE, DESC, I, X, Y, and TEXT. ZP points to the last real data entry in the matrix ARR, and ARZ is the number of rows in ARR.

IND is the sum of the entries in SIZ (148 for the example). There is one extra column appended on the right, which contains a blank used for spacing when printing reports.

The matrix ARR is fully allocated when the data base is initialized according to the maximum number of rows specified by the user, and ZP is set to zero. It is maintained with all currently used rows at the "top", and available space for new entries at the "bottom".

REFERENCING THE DATA BASE: The capability to let the user define his own names for the fields and use them directly in commands, is implemented via the function fix system function.

The format of a function generated for this purpose is:

(Image Omitted)

where NAME is user supplied, and N is an integer value based on the relative order in which fields were named by the user. Variable REQ is established with a list of these names in the same order.

Selection of the proper column numbers (subscripts) to reference an individual field is done by an expression of the form:

(Image Omitted)

where L is the set of line numbers and F is the number assigned to the field. EL1 and EL0 are precalculated during the data base initialization operation. FUNCTIONAL OPERATION: Entry of New Items.

1

Page 2 of 5

Functions are provided to add lines at ZP+1 (ENTER and PROMPT), insert lines after an existing line (INSERT), and replace lines in their entirety (REENTER). The general approach is:
a) Request the list of field names for which data is to be

entered. Any set in any order is permitted; omitted fields

will be filled with blanks.
b) For all except PROMPT, print a header line to permit

alignment of the data within the field.
c) After a physical line is entered (signalled via a carriage

return), break the line into individual fields and pass

each to ENX for diagnosis (if...