The CODASYL definitions are converted to relational schema information according to the following rules.
No. | CODASYL subschema | Relational schema description |
1 | Record type | Base table identified with TABLE .... |
2 | Record type that is owner record type in at least one set | Primary key: |
3 | Item of a record type | Field of the base table of the corresponding data type with null-value condition: NOT NULL |
4 | Group item, repeating group | Data type STRUCTURE |
5 | Repeating factor | (repeating factor) |
6 | Item of type DATABASE-KEY | Field of the base table with the same name |
7 | Item of type DATABASE-KEY-LONG | Field of the base table with the same name |
8 | One or more SYSTEM sets not defined MANDATORY AUTOMATIC | A base table with the name SYSTEM and primary key SYSTEM_ , of data type INTEGER |
9 | Set relationship | Foreign key in the base table that corresponds to the member record type |
10 | Set: MANDATORY AUTOMATIC | Foreign key with null-value condition: |
11 | Set: MANDATORY MANUAL | Foreign key with null-value condition: |
12 | Set: OPTIONAL AUTOMATIC | Foreign key with null-value condition: |
13 | Set: OPTIONAL MANUAL | Foreign key without null-value condition |
14 | Key consisting of one or more items. e.g. for compound keys: | Additional information: left-hand column: right-hand column: |
15 | Unique key at record type level consisting of one item | Additional information UNIQUE for the key field |
16 | Unique key at set level consisting of one item for a SYSTEM set defined with MANDATORY AUTOMATIC | Additional information UNIQUE for the key field |
17 | Unique key at record type level consisting of multiple items | Additional information UNIQUE for the corresponding base table: |
18 | Unique key at set level consisting of multiple items for a SYSTEM set defined with MANDATORY AUTOMATIC | Additional information UNIQUE for the base table corresponding to the member record type: |
19 | Unique key at set level consisting of one or more items for a set defined with MANDATORY AUTOMATIC, or for a SYSTEM set not defined with MANDATORY AUTOMATIC | Additional information UNIQUE for the base table corresponding to the member record type: |
Table 15: Conversion rules for BPSQLSIA
The name of the CODASYL subschema becomes the name of the relational schema.Hyphens in names in the CODASYL schema are replaced by underscores in the derived names in the relational schema information.
Condition names (level number 88) are not output in the relational schema information.
Examples of the individual rules can be found on "Example".
The meanings of the relational terms and concepts are explained with examples in the “SQL for UDS/SQL“ manual.