The tab dedicated to the description lines is specific
to the type of Database block that has been defined in the Database
block's editor. Thus, you find the -DH Lines tab, which is specific
to the hierarchical database blocks, the -DR Lines tab specific to
the relational database blocks and the -DC Lines tab dedicated to
the CODASYL, DMSII and TANDEM database blocks. It is used to create
description lines.
About this task
Purpose of each description lines tab:
- The -DH tab is used to describe the relationships between Segments
in a hierarchical database (example: DL/1).
- The -DR tab allows the description of a Database Block's
physical model (i.e. table spaces, tables, table views, index or key)
used to generate an SQL database description.
- The -DC tab is used to logically describe a CODASYL schema or
sub-schema, i.e.: v declare areas, v call records and distribute them
among areas, v define and describe sets (code, name, owner record,
member record).
The procedure to create description lines is the same for all
database block types. In the window dedicated to the desciption lines
of a block, you have first a tree-like structure list where you can
specify description lines for the current block. You can also delete
some of them, reorganize them in the list. In the other part of the
window, you have definition sections that open when you select a description
line in the list where you can give further information on the selected
description line. Moreover, a
-GG lines section
enables you to specify generation elements associated to the selected
description line too.
- To create a -DC line, click the Add -dc line button. As a result, a default
line is created in the list. You can change
the line type in the -DC line definition section that displays in
the second part of the window and you can create -GG lines associated
to -DC line via templates in the -GG lines section.
- To create a -DH lines, click the Add -dh line button, so that you have a
line that displays in the list. In the -DH lines
definition section, when you select a Segment, parent
Segment or child Segment for the generation of the description line,
the Segments' names display in the list and identify the description
line. You can create generation elements for the -DH line in the -GG lines section.
- In the -DR line tab, you can create
-dr lines that display the objects' type, external names, the
code of the Segments which represent them, and K-type lines which
represent the key-type supported by the Segment and the generation
code.
- To create a -DR line, click the Add -dr line button. A default
line displays. You can change the type of
SQL record in the -DR lines definition section that displays in the
second part of the window. The external name followed by the Table
or view code specified in this section instantly display in the list
to identify the description line. You can then add -GG lines to modify
the -DR line in the -GG lines section.
- In the -GG lines section, you
find a table with 'templates' that will help you specifying
generation elements for the selected -DR line.
- You can create -K lines (K for
Keys) under lines which describe an SQL record whose type is Index
or Alter Table, a Primary key. To do so, click the description line
under which the -K line is to be created, then click the Add -dr -k line button. As a result, a default
line is created in the list. In the -K line definition section that displays at the end of the window, you can specify
the composition of the Segment which represents the SQL record (Index,
Alter Table or Table Key). Then, the Data element and order type you
have selected for the key display in the list to identify the description
line.