top - metrics - download
⟦23999fa64⟧ Wang Wps File
Length: 11604 (0x2d54)
Types: Wang Wps File
Notes: CPS Database Des. Guideli
Names: »0897A «
Derivation
└─⟦d10d3ed68⟧ Bits:30006014 8" Wang WCS floppy, CR 0055A
└─⟦this⟧ »0897A «
WangText
…00……00……00……00…>…86…1 …02… …02… …02…
…02…CPS/AUX/012
…02…KNN/810601…02……02…#
CAMPS DATABASE DESIGN GUIDELINES
…02……02…CAMPS
T̲A̲B̲L̲E̲ ̲O̲F̲ ̲C̲O̲N̲T̲E̲N̲T̲S̲
1 PURPOSE AND SCOPE ...........................
4
2 CAMPS DATABASE DESIGN DOCUMENT (CPS/DBD/001)
5
3 DATA DEFINITIONS AND CONVENTIONS ............
6
3.1 DATA TYPES ................................
6
3.1.1 Standard Types ........................
6
3.1.2 Scalar Types ..........................
7
3.1.3 Subrange Types ........................
7
3.1.4 Structured Types ......................
8
3.1.4.1 Array Types .......................
8
3.1.4.2 Record Types ......................
8
3.1.4.3 Record Variants ...................
9
3.1.5 Pointer ............................... 10
3.1.6 Reference ............................. 10
3.2 DECLARATION OF VARIABLES AND CONSTANTS .... 11
3.2.1 Declaration of Variables .............. 11
3.2.2 Constant Definitions .................. 11
3.3 NAMING CONVENTION FOR DATA ITEMS .......... 12
3.4 GRAPHICAL PRESENTATION OF DATA ............ 12
3.4.1 Bit Level Diagrams .................... 12
3.4.2 Character Level Diagrams .............. 12
3.4.3 Word Level Diagrams ................... 13
3.4.4 Graphical Presentation of Relations
Between Data Structures (Example only) 14
1̲ ̲ ̲P̲U̲R̲P̲O̲S̲E̲ ̲A̲N̲D̲ ̲S̲C̲O̲P̲E̲
The purpose of these guidelines is to introduce the
document to be made: "The Database Design Document"
(CPS/DBD/001).
Section 2 is an overview of its contents.
Section 3 is a draft of chapter 3 in the DBD. It is
mandatory that data are defined by a pseudo SWELL/PASCAL
convention, as well as a graphical presentation according
to the guidelines included in section 3 of this note.
The purpose of the DBD/001 is to define all tables,
files, and data areas shared by more than one S/W package.
The name, "Database " is slightly misleading
but has been kept for historical reasons.
2̲ ̲ ̲C̲A̲M̲P̲S̲ ̲D̲A̲T̲A̲B̲A̲S̲E̲ ̲D̲E̲S̲I̲G̲N̲ ̲D̲O̲C̲U̲M̲E̲N̲T̲ ̲(̲C̲P̲S̲/̲D̲B̲D̲/̲0̲0̲1̲)̲
T̲A̲B̲L̲E̲ ̲O̲F̲ ̲C̲O̲N̲T̲E̲N̲T̲S̲
1. PURPOSE AND SCOPE
2. APPLICABLE DOCUMENTS
3. DATA DEFINITIONS AND CONVENTIONS
4. TYPES AND CONSTANTS
4.1 GLOBAL TYPES
4.2 GLOBAL CONSTANTS
4.3 ERROR CODES
5. SYSTEM DATA
5.1 SYSTEM PARAMETERS
5.2 CONFIGURATION PARAMETERS
5.3 PROFILES
5.4 GLOBAL SERIAL NUMBERS
6. ROUTING AND DISTRIBUTION TABLES
7. QUEUES
8. CONTROL BLOCKS
9. TABLES AND RECORDS (NOT INCLUDED IN 5 + 6)
10. INTERNAL FORMATS (MESSAGES, COMMENTS ETC.)
11. FILES (NOT INCLUDED IN 5-10)
12. S/W LOAD FILES AND INITIALIZATION DATA
13. TRACE AND PERFORMANCE MONITORING RECORDS
14. DATA INDEX
3̲ ̲ ̲D̲A̲T̲A̲ ̲D̲E̲F̲I̲N̲I̲T̲I̲O̲N̲S̲ ̲A̲N̲D̲ ̲C̲O̲N̲V̲E̲N̲T̲I̲O̲N̲S̲
This section defines general guidelines for the definition
and conventions which apply to the database design
document.
The subjects which are specified are:
- data types:
- standard
- scalar
- subrange
- structured
- constant and variable definitions
- graphical presentation of data:
- bit, character and word level
- logical relationships between data structures
- name convention
3.1 D̲A̲T̲A̲ ̲T̲Y̲P̲E̲S̲
3.1.1 S̲t̲a̲n̲d̲a̲r̲d̲ ̲T̲y̲p̲e̲s̲
The standard types of SWELL represent the units accessible
in one instruction of the CR80.
a) B̲Y̲T̲E̲
BYTE is an unsigned integer, which can be held
in one byte (8 bits) and therefore lies
in the range 0:255 .
CHAR is equivalent to byte.
b) I̲N̲T̲E̲G̲E̲R̲
INTEGER is an integer, which can be held in one
word (16 bits i.e. 15 numeric bits, 1 sign
bit).
c) L̲O̲N̲G̲
LONG is an integer, which can be held in two
words (32 bits).
The type is "declared" as:
LONG = RECORD
LEAST, MOST: INTEGER
END
d) S̲T̲R̲I̲N̲G̲
STRING is an array which can hold a number of chars.
The type is "declared" as: STRING = ARRAY 0
13 OF CHAR
3.1.2 S̲c̲a̲l̲a̲r̲ ̲T̲y̲p̲e̲s̲
A scalar type defines an ordered set of values by enumeration
of identifiers which denote these values.
scalar type ::=( identifier , identifier )
Example:
(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY,
SUNDAY).
3.1.3 S̲u̲b̲r̲a̲n̲g̲e̲ ̲T̲y̲p̲e̲s̲
A type may be defined as a subrange of another scalar
type by indication of the least and the largest value
in the subrange. The first constant specifies the lower
bound, and must not be greater than the upper bound.
subrange type ::= constant expression .. constant
expression
The base of a subrange type is integer.
Examples: 1..10
'A'..'Z'
MONDAY..FRIDAY
3.1.4 S̲t̲r̲u̲c̲t̲u̲r̲e̲d̲ ̲T̲y̲p̲e̲s̲
A structured type is characterized by the types of
its components and by its structuring method.
structured type ::= array type record type
3.1.4.1 A̲r̲r̲a̲y̲ ̲T̲y̲p̲e̲s̲
An array type is a structure consisting of a fixed
number of components, which are all of the same type,
called the component type. The elements of the array
are designated by indices, values belonging to the
so-called index type.
array type ::= array index type of component
type
component type ::= type
Examples:
ARRAY 1..10 OF #0000..#0FFF
ARRAY 'S'..'Z' OF INTEGER
ARRAY WEEKDAY OF WORKHOURS
ARRAY WEEKDAY OF RECORD
BREAKFAST: INTEGER;
LUNCH: INTEGER;
DINNER: INTEGER
END
3.1.4.2 R̲e̲c̲o̲r̲d̲ ̲T̲y̲p̲e̲s̲
A record type is a structure consisting of a fixed
number of components, possibly of different types.
The record type definition specifies for each component,
called a f̲i̲e̲l̲d̲, its type and an identifier which denotes
it. The scope of these field identifiers is the record
definitions itself.
record type ::= RECORD field list END
1
field list ::= fields ; fields 0
fields ::= field identifier , field identifier
: type
Examples:
RECORD
DAY : 1..31;
MONTH : 1..12;
YEAR : INTEGER
END
RECORD
NAME, FIRST NAME: ARRAY 1.. NAMELENGTH OF CHAR;
AGE: BYTE;
MARRIED: BYTE
END
3.1.4.3 R̲e̲c̲o̲r̲d̲ ̲V̲a̲r̲i̲a̲n̲t̲s̲
There are many cases where a record may have slightly
different format depending on context. The record is
then said to have several v̲a̲r̲i̲a̲n̲t̲s̲.
The variants are distinguished by a so-called t̲a̲g̲ ̲f̲i̲e̲l̲d̲,
which may be thought of as a subtype within the record
type.
The different formats are defined in a case construction
within the record format.
The more general record definition taking variants
into account is then:
record type ::= RECORD field list END
field list ::= fixed parts
fixed part ; variant part
variant part
fixed part ::= fields ; fields 1
0
fields ::= field identifier , field identifier
: type
variant part ::= CASE tag field type identifier
OF
variant ; variant
variant ::= case label list :( field list ) empty
tag field ::= identifier empty
Example:
Type coroutine ̲record =
record
next ̲coroutine, previous ̲coroutine: pointer;
saved ̲registers: array 0..77 of integer;
priority: byte
case coroutine ̲type of
input ̲coroutine: (state: integer;
input ̲buffer: array
0..isize of byte;
current ̲format: array
0..fsize of byte);
command ̲coroutine:(current ̲command: integer;
vdu ̲state: integer)
end
3.1.5 P̲o̲i̲n̲t̲e̲r̲
A pointer is an unsigned integer used as an address.
The range is 0..65535.
Note that the pointer type is not supported in SWELL,
where pointers are of integer type.
Examples:
RETURNADDRESS: POINTER;
NEXT ̲ELEMENT: POINTER;
3.1.6 R̲e̲f̲e̲r̲e̲n̲c̲e̲
A reference is an indirect address of some object.
It is used to identify the object to the unit which
is responsible for the object.
A reference is an unsigned integer in the range 0..65535.
A s̲h̲o̲r̲t̲ ̲r̲e̲f̲e̲r̲e̲n̲c̲e̲ is an unsigned integer in the range
0..255.
Examples:
QUEUE ̲ELEMENT: REFERENCE;
SUBQUEUE ̲ID: SHORT REFERENCE;
3.2 D̲E̲C̲L̲A̲R̲A̲T̲I̲O̲N̲ ̲O̲F̲ ̲V̲A̲R̲I̲A̲B̲L̲E̲S̲ ̲A̲N̲D̲ ̲C̲O̲N̲S̲T̲A̲N̲T̲S̲
3.2.1 D̲e̲c̲l̲a̲r̲a̲t̲i̲o̲n̲ ̲o̲f̲ ̲V̲a̲r̲i̲a̲b̲l̲e̲s̲
Variable declarations consist of a list of identifiers
denoting the variables, followed by their type.
variable declaration ::= identifer , identifier
:
type
Examples:
I,J : INTEGER
OPERATOR: (PLUS, MINUS, TIMES)
CLASSTABLE: ARRAY 0..127 OF CLASSTYPE
3.2.2 C̲o̲n̲s̲t̲a̲n̲t̲ ̲D̲e̲f̲i̲n̲i̲t̲i̲o̲n̲s̲
A constant definition introduces an identifier as a
synonym to a constant.
constant definition ::=
identifier = constant expression
Examples:
LASTINDEX = N - 1
MIL = - 1
AREA = LENGTH * WIDTH
3.3 N̲A̲M̲I̲N̲G̲ ̲C̲O̲N̲V̲E̲N̲T̲I̲O̲N̲ ̲F̲O̲R̲ ̲D̲A̲T̲A̲ ̲I̲T̲E̲M̲S̲
Data items shall be named with data names describing
the content/use of the item. If the name consists of
more than one word, the words shall be separated by
underscore ' ̲'.
3.4 G̲R̲A̲P̲H̲I̲C̲A̲L̲ ̲P̲R̲E̲S̲E̲N̲T̲A̲T̲I̲O̲N̲ ̲O̲F̲ ̲D̲A̲T̲A̲
3.4.1 B̲i̲t̲ ̲L̲e̲v̲e̲l̲ ̲D̲i̲a̲g̲r̲a̲m̲s̲
Whenever a computer word or register is not used as
an entity but split into fields, possibly to the level
of a single bit, a diagram of the following form shall
be used to enhance the description:
15 10 9 0
FIELD A FIELD B
The rightmost end of the diagram shall represent the
least significant bit, and the leftmost the most significant
bit.
Bits shall be numbered from 0 to 15 with the lowest
number designating the least significant bit.
3.4.2 C̲h̲a̲r̲a̲c̲t̲e̲r̲ ̲L̲e̲v̲e̲l̲ ̲D̲i̲a̲g̲r̲a̲m̲s̲
Data items consisting of character strings, that is
mainly keyboard or card input and CRT or printer output
may be described by diagrams of the following form.
1 2 3 4 5 ...........
n
FIELD A FIELD B FIELD C FIELD D
The character appearing first in the input or output
string shall be shown in the lefthand end of the diagram.
The characters of the string shall be numbered consecutively
beginning with number 1 (one).
3.4.3 W̲o̲r̲d̲ ̲L̲e̲v̲e̲l̲ ̲D̲i̲a̲g̲r̲a̲m̲s̲
Word level diagrams shall be used to enhance description
of all data items of more than one word size of tables
and of whole memory layouts.
The diagrams shall have the following form:
0
ITEM I
3
4
ITEM II
m
m+1
ITEM III
n
The relative size of the boxes shall as close as possible
resemble the relative size of the data items illustrated.
The numbering shall be per word and range from 0 through
n illustrating in total n+1 words.
The lowest number shall be placed at the top of the
drawing.
3.4.4 G̲r̲a̲p̲h̲i̲c̲a̲l̲ ̲P̲r̲e̲s̲e̲n̲t̲a̲t̲i̲o̲n̲ ̲o̲f̲ ̲R̲e̲l̲a̲t̲i̲o̲n̲s̲ ̲B̲e̲t̲w̲e̲e̲n̲ ̲D̲a̲t̲a̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲s̲
̲(̲E̲x̲a̲m̲p̲l̲e̲ ̲o̲n̲l̲y̲)̲