ContentsIndexPreviousNext

1.4 Database Concepts

Relational databases differ from indexed file systems in several significant ways. These are the logical associations between database concepts and COBOL indexed file concepts:

Indexed File Concept Database Concept
Directory Database
File Table
Record Row
Field Column

For example, for Oracle, a COBOL record that looks like this:

01  terms-record.
    03  terms-code        pic 999.
    03  terms-rate        pic s9v999.
    03  terms-days        pic 9(2).
    03  terms-descript    pic x(15).

would be represented in the database as a table with a format similar to this:

SQL> desc terms;

Name Null? Type
TERMS_CODE NOT NULL NUMBER (3)
TERMS_RATE 4gl00003.gif NUMBER (4, 3)
TERMS_DAYS 4gl00003.gif NUMBER (2)
TERMS_DESCRIPT 4gl00003.gif CHAR (15)