MDBS Data Management System Documentation
Version
1.04Micro Data Base Systems,
Inc.
P. O. Box 248Lafayette,
Indiana
47902 (317) 448-1616(317) 742-7388
August 1980
Copyright Notice
This
entire
manualis provided for
the use of" the customer and theeustomer"s employees. The
entire
contents
have beencopyrighted
by Micro Data Base Systems,Inc.,
andreproduction
by any meansis
prohibited
except aspermitted
in
awritten
agreementwith
Micro DataBase Systems,
Inc.
© COPYRIGHT 1979, 1980, Micro Data Base Systems,
MDBS 2!at:
a
Manage: ment System Documentation ?REFACETk
i
'3 rnan"ctai Z·3 cc:ncerTjed wiU"z data base management. and :it.suse as a t. ocj !
in
soCtware development. Manyexµerts
Rave rn^edicted t.ha t. twoinnovaiions
wit!
dominateth
e computing sceneiri
t.he 1g7;g"s- Th f'first
innovation
i
si
ríth
e ar' e a of
computer hardware w .i t" r2 t. h edevel"jµrr\e-nt of" the micro—computers (computer o n a chip")
. The seconc!,
a sof't.ware advarice,
is
the us e of
highly
sophisti.c"ttéñ
'iía"a b 3-s emanagement
techniques
to eont:
"o1 complex datastructures.
The :e t.woínríovatícmc are com'{'i";nec!
together
in
th
e !v!im^e TJata Ba ""' 1> j7y"7teTt" 'soghisticated
í'at.a Ba: 3e ?4anagement System. We be!iev
that
íj?á .-."g E3sf±mar,agernent systems (DBMS) w i t. !7
their'
capability
o[
supporting
selective
retrieval
to
"what. i-f"" t:yµe inquirü-es andtheir ability
to
suppc·rt
restructuring
as the riat-ureof
the dernrnds change,will
become thefocal
software in
uüicro"s asthey
arealready in
mini— and :mixi-"-computers. The uÜcro—coírµuter. w
i th
its
fantastic
computing power c) yj a-per—dollar
basis,
combined wi th
a power"í"v-l data base managementsystem,
will
be aformidable tcol
i"or
mana¿"ingenterprises
c f" a } ltypes .
Th e purpose o?
th
i
s user " s manualis
twoPold.First
there is
introduc".or,y material
to
the area of" data base management. Sincethis
i
s such avast
andimportant
area wereal ly
cari"t
do completejustice
to
this
topic
andsuitable
references are:
1
. Haseman . \n'. D . an d A . B. Whinston,
Introduction
to Data
Management,
Richard
D.Irwin
.
Inc.
, Homewood. IL , 1977.2.
Martin,
J. , Comouter Data—BaseOrganizat.íori, Prericice
Ha I !,
Englewood
Cliffs,
NJ, 1975.MDBS Data Management System Documentation
3.
Holsapple, C.,
Primer on Data Base Management, MDBSInc.,
Box248,
Lafayette,
IN, 1979.The second goal
of
this
manualis to give
adetailed
guidedtour
through
the use OÍ" MDBS.DDL and MDBS.DMS. Here our aimis
to
be ascomplete and as comprehensive as
possible.
Finally,
werequest
comments from ourreaders
asto
howsuccessful,
in
their
view, we have beenin achieving
thesegoals.
Have you beenable
to follow
ourdescription
of
how MDBS.DDL and MDBS.D!A.S should beused and
actually
have you achieved the expectedresults?
Or havethere
beenpoints
where thesteps
wereunclear
or ambiguous? Weplan
to incorporate
thesesuggestions in future
versions to
finally
achievea manual
that
is
atit
companionto
what wefeel
is
a remarkable andtruly
innovative
sQt"twareproduct in
the micro--computer area.© COPYRIGHT
MOBS 2ata Management System Documentation TABLE OF CONTENTS
Page
I.
INTRODUCTION... . !5II.
MDBS.DDL DATA DESCRIPTIObl LANGUAGE........
1'7A.
Introduction...
i': 'B.
Features.
...
. ...
. . . 18C.
Getting Started
WithMDBS.DDL...
2Ci.
Initial
loading
andtest.
run...
-...
202.
Relocating
KIDBS.DDL...
2Z3.
Important
MDBS.DDL addresses:Personalizing
andpatching MDBS.DDL...
23D. MDBS Data
Description
Language...
251.
Iritroduction
and,Definitions...
25 2. IJDLExample...
273. Many—to—Many
Example...
334.
Multiple
owner/memberexample...
405. LU)L
Specifications...
44El. Notes on Data Bm: e
Files...
7C) E. Modesof
Operation...
721.
Introduction...
722. Text Entry/Commanci
mode...
75MDBS Data Management System Documentation
3.
Line editing
mode...
954. DDL
analyzer
mode...
103III.
MDBS.DMS DATA MANAGEMENTSYSTEM...
149A.
Introduction...
149B. Features
...
150C.
Getting Started
WithMDBS.DMS...
1511.
Relocating
MDBS.DMS...
1512.
Personalizing
andpatching MDBS.DMS...
151D. MDBS Data Management
System...
1551.
Introduction...
...
1552.
Calling
procedure...
1743. Data management system
routines..-...
177IV. CONCLUDING
REMARKS...
258APPENDIX
1...
262APPENDIX
2...
264
-© COPYRIGHT
MDBS Data Management System Documentation DDL COMMANDS
(a) By Mnemonic Pa ge
BAGKSPACE-key Delccte
text.
. . . ...
...
...
. . . ...
. . . 74BYE Return
to operating
system. . "7qC Change
a
line
of"text.
.e . ...
. ...
. . . ...
97C Repeat changes.
. . . - . . . 1 C) Ci
Ccmtr<il C
Interrupt
apoperation.
. . . 74Control
H Backspace anddelete
acharacter.
. . . '74Control
P Toggle outpu!- . . . ,. . . 73
Control
XInterrupt.
aline
of"input.
. .
.. ..
. ... .. ..
73D
Delete
t-ext...
...
...
80DDL Data
Definition
LanguageAnalyzer.
. . . ...
82ÚELETE Key B.acksp·ace and
delete
acharacter.
. . . 73DR Data
description
format.for dri'íe.
. . . 83it
Enter line edit
mcAe. - . . . . . . . . . . . . . . . . . . 85¿—d
EN Data
description
format for
endline.
...
83ESCAPE- Key Return t-o
ogerating
system. . . . . . . . . . . . . . 79 FI F'at-a.description
format
Í"orfile.
. . . 83IT Fcítta descrij"±:
ion format
for"item.
...
. . . . 83L
List
t
e xt
. . . 86ME Data
description
format tor
member. . . 83N Renumber thc'
text.
. . . 88
OW Data
description
format
f"or owner.. . . 83
p
ruler.
. . . . . ....
....
. . . . ...
9OPA Data de'umi"iption í'ormat
for
password. , . . 83R Read a
text
tile...
91MDBS Data Management System Documentation
RE Data
description
format for
record...
83RETURN-Key End the
current
line
Oí7input....,...
73 RETURN-Key Movethrough
text...
96S Leave the
editor"
mode...
99SE Data
description
format for
set...
83W
Write
atext
file...
93© COPYRIGHT
MDBS Data Management System Documentation DDL COMMANDS
(b) By
Function
Backspace and
delete
a character". ...
. . . 73Change a
line
of"text.
...
. . ...
. ... ..
. . ...
. . . ...
...
. 97Data
def"inition
languageanalyzer.
. . . 82Data
description
Í7ormat. c'cmman&m. . . - . . . - . . . . - . . . . 83
Delete
text-. . ...
. ...
. ...
. . . ... ..
. .-.. -..
. . '3 QEnd the
current
line
'jf
iní?'Llt.. . . , . . . - . . 73
^
Enter line edit
mode. . . - . - . . . 85
Leave t-he
editor
mode. . . . q9List
text.
. . . 86Move through
text.
. . . . . . . . , . . . - . . . , 96ruler.
. . . , . . . , . . . , . . . , . . g aRead a
text
ri1e..
a V * · * 0 t · O · * D 0 6 6 » 0 b . P b r E 4 P r + · P y · P · V · · t · <4jL~"Penümber t. "h
e
t
ext-. . . - . . . - . . . - . . . 88
Repeat charÁEes- . . . .. . . - . . . .. . . 1 O C)
Restart
a )ine.
. . . 0 . . . 0 . . . - . > . . 7:"3Return
to operating
system. . , 79Write
atext
file... ...
.... ....
93MOBS Data Management System Documentation
DDL ERROR MESSAGES
?age
A DEPENDING ON ITEM CANNOT BE A REPEATED FIELD
.
..
. . ...
105A VARIABLE LENGTH ITEM MUST BE LAST IN A RECOFD .
..
. ...
106CANNOT WRITE TO DISK
...
.. .. ..
...
..
.-...
!0'7CAN'T HAVE OTHER OWNERS WITH SYSTEM
. . . !08
DEPENDING o'\í ITEM MUST BE Éí TWO BYTE BINARY VARIABLE
..
.llj9
DEPENDING ON ITEN lvlUST BE BINARY . .
. . . .
t 1 C)
DEPENDING ON ITEM t{oT pREvIc)Ugij.Y DEFINED If.! THLS RI'CCRU j. 11
DUPLICATE ITEP! NAME IN RECORD
..
. . . ...
. . . ...
...
. í12DUPLICATE RECORD NAME
. . . 113
DUPLICATE FET NAME
. . . .
: .
i
4 ERROR . . . . .. . . .
1
i
5 EXPECTING A NUMBER IN A FIELD. . . !
1(3
EXPECTING A RECORD, ITEM, DR SET LINE
. . . :
r'
EXPECTING AUTO OR MAN
. . . j1 8
EXPECTING GET OR END ZJNE
... ...
119FILE HAS NOT BEEN CREATED: PLEASE DC SO . . .
..
. . ...
. . ...
!ZGIMPROPER DRIVE NUMBER .
. . . 121
INCORRECT MEMBER ORDER .
. . . - . . . . 122
INCORRECT OWNER ORDER . . - . . . .
. . . , . . . - . - Z23
INVALID ITEM TYPE
.
..
. ... .. ..
... ..
... ..
... ..
. ...
, . ...
. 12-lINVALID SET CHARACTERISTICS
..
. .....
..
. . . ...
..
. . ...
! 25INVALID SET TYPE
..
...
. ' 2(3ITEM READ OR 'n'EITE ACCESS LESS THAN RECORD'S
. . . 12'7
KEY UNDECLARED
. . . 128
MOBS Kata Management. System Documentation MAY LENGTH FOR BINARY \'ARIA!3LE IG 2
. . . 129
MAXIMUN RECORD SIZE TOO LARGÉ TO FIT ON PAGE
. . . ',3C
N.LMES CANNÜT START WITH A $ OR BE BLANK
..
...
. ...
. . . ...
131NG) XEMBER AÑD/OR OWNER LINE FOR A SET
. . . F32
rn: PAGES ALLOCATED Tci A FILE
. . . E23
¡'.;¿y; ENñUgH ROOM CEil DEI'/E 1
.
..
. ...
. . ...
. . ...
. . ...
. ... ..
135NUMBER LARGER THAN 255
. . . , . . . . 136
PAGE LENGTH MUST BE DI\U31!3LE 3Y 256 .
..
...
. . . ...
137PASSWORD LINE EX7ECTED . . .
. . . 138
PASSWORD ENTRY OR RF:ZORTJ LINE EXPECTED
. . . 139
PREMATURE END OF INF'U" . . . .
. . .
i
"tc)READ ACCESS GREATER THAN :.\/PITE ACCEF3
. . . i-41
EzccíRD ACCEGG GREATER THAR' GET 'S . . . .
- . . . - . . . .
i
42RECGRD NOT FOUND
. . . 143
REPEATED ITEM TOO LARGE
..
. . . ... ..
...
. . . ...
. . . . 144R/W ACCESS NOT EQUAL FGR DZ7ENDTNG AND CURRENT ITEM
. . . 145
SECOND LINE OF GET DEFINITION INVALID
..
. .....
..
... .. .. i46
£OF?T KEY NOT IN RECORD . . . . . . . .
..
. . . ...
. . . ...
. . 147SYFJTEKJ CAb' 'T BE E MEMBER.
. . . 148
MDBS Data Management- System Documentation
INDEX OF DML COMMANDS
DML Cornmand Page
ÁCS Add
Current
OÍ" rununit
to
Set...,...
179AMS Add Member
to
Set...
180CCT Check
Current of
rununit
Type..¥...
182CLOSE CLOSE the data b¿)se
...
183GMT Check cLlrrer}t Member Type
...
184COT Check
current
Owner Type...
185CR Create Record
...M.
186CRS Create Record and
Store
data...
1É37DEFINE DEFINE a data
bloek...
189DEC
Delete
Record based onCurrent of
rununit
...
í90DRM
Delete
Record based oncurrent
Member...
192DRO
Delete
Record based oncurrent
Owner...
194DRR
Delete
Record based oncurrent
Record...
196EXTEND EXTEND a data
block...
198FFM Find
First
Member...,...
200FFO Find
First
Owner...
201FINDM FIND Member
...,....
202FINDO FIND Owner
...,...,...
2C3FLM
Find Last
Member...,...
204FLO Find
Last
Owner...
205FMSK
Find
Member based oí": 'Sort Yey...
206FNM Find Next Member
...
207FNO Find Next Owner
...
208E) COPYRIGHT 1979, 1980.
MDBS Data Management. System Docuraentation FC'FK Find Owner'" }: .;,.)e't3(i
on
Sort
key . . . . . - - . . . . . . . . . . . :'Z'.: "i":'FP\' Find
F"evi:
>us M±mber .-. . . X . . . , . , : ZIC'
t"'"--; I Mind F'"u?v.lo1j3 C:wne" "7) 1 :
GEtC GET ciaf"a frorú Curr"e,"ít. of" run uniÁ.
. . "" '"'
GETM GET data !"""'cm:
'currerzt Member
. . . 2.í: :"
GETO GET data
fror
current
Üwner" . ?.;l
GETR GET data from curr"e'nt Record .
..
. . . ... ..
. . . - 215GFC GET
Field
fromCurrent
of" rununit.
....
..
....
,..
me
GFM '-;et
Field
f"rcmcurrent
Member" . . . . . . .. . . Z 17
GFO Get
Field
from current: Owner ,. - . . - . , . . . , . . . ;"' ! S
GFR Get
Field
t"rnmcurrent
Record . . . . . . . . . . . . . . . :"' " gGMC Get Member Count . . . '"2C\
GCg g e
t
'7)wne
r
"íounf . P 22i
GTC Get
record-Type
oÍ"Current
of" rununit
. ...
. . ...
:222GThC Get
record-Type
of"current
Member . . . . . . . . . . . . 223 GTO Get recorcí-T,ypeof current
Owner . . . . . . . . . . . . . . . Z24X
OPEN OPEN data base
. . . :'">5
PUTC PUT data
into Current of
rununit
...
. . . ...
. . . 227PUTK! FUT data
irAo current
Member. . . - . . . 22t?
T"UTO PUT data :nt:o current. Owner
. . . 23C)
FUTR PUT data
into
current. Record . . . . . . . . . . . . . . . . . . . ¿'32 RMS Removecurrent
Member from Set. . . - . . . 233
RSM Remove
all
Set k4embers. . . , . . . 234
SCM Set
Current
of rununit
based on Member . . . 235seo Set Current.
of
rununit
based on Owner . . . 236SCR Set
Current
ofr'jn unit
based on Record . . . 23'7MDBS Data Management System Documentation SFC Set
Field
in Current
OÍ" rununit
..
. . . ...
. . 238SFM Set
Field
in current
Member ...
. . . 239SFO Set
Field
in
cur-rent Owner.. ..
....
.... ....
241SFR Set
Field
in current.
Record . . . ...
...
. ... ..
... -.
242SMC Set Member based on
Current
oí^ rununit
. . . . . . . . 243 SMM Setcurrent
Member based oncurrent
Member . . . . . Z44 SMO Setcurrent
Member based oncurrent
Owner . . . . . . 245 SMR Setcurrent
Member based oncurrent
Record . . . . . Z4S SOC Set Owner based onCurrent of
rununit
. . . 247
SOM Set
current
Owner based oncurrent
Member. . . 248
SQQ Set
current
Owner tmsed oncurrent
Owner. . . 250
SOR Set
current
Owner based oncurrent
Record. . . 252
SRC Set Record based on
Current
of" rununit
. . . 253
SRM Set
current
Record based on Member. . . - . . . 254
SRO Set
current
Record bz'sed on Owner .. . . 25'q
STAT
return
runS'TATistics.
.
.. .. .. ..
. . ...
...
. . . . ...
. . 256TOGGLE TOGGLE run
optimization
switch.
. . . .
..
. . . ., . 257(9 COPYRIGHT 1'379,
MOBS Data Management System Documentation
NEW RELEASES, VERSIONS, AND A WARNING
Any programming endeavor of" the magnitude cjf' the MDBS system.s
i
sbound
t
c)continue
t
o evolve overtime.
Realizing
this,
Micrr'
DataBase Systems vows
to provide it.s users with
updatesto
t.heir
version
f" co
r
a nomina!handling fee.
Updat.es can be pr(?videdonly
z-f'ter the'signed End [Jeer Agreement Form
is
ont'i le with
MIJB3, In c . Newversions
of" MDBSsort\/are
wi I ! b e considt=r: :zdas sermraZe
products.
However , ownersof previous
versi.onswill
I)?entitled
to
apreferential
rate str'-iU.ure
(as sc.on as the signed End User A.gr"."emer,tForm
is received
by MDBS, In c . ).
Finally,
each '33py fjf^ MOBSproducts
is perso:nalized with
thelicensee's
name. There areseveral
levels
or
thi
sj;ersonal i zat.ion,
some or
whichinvolve
encryption
methods gum^ariteed t.c b e
combinatorally
hard cc ciecyphe: '". 1vU)BSproducts
were produced wi
Eh Zasizable
investment
of"capital
andlabor to
saynothi:
"ig of" the year'¶: O!"prior
involvementin
the data base management area. b yprin3iµalt>
ot" MOBS .Accordingly,
we areseriously
concerr,ed about. any uríauthcrized-copying of" ourproducts
andwill
take an y anc". a i l :2vai!?.b|elega!
action against i.llegal
copying ordistribution
of' ourproducts.
MDBS Data líanagement System Documentation
I.
íNTEIODUCTIONThe Micro Data Base Systems (MD!3S) has components
for defining
datastructures
and f'or thestorage
andretrieval
of data.
Add—on packagesavailable
for
N!DBS a! low thekgging
oítransacticns
Icu"recovery,
th
erestructuring
of
a data base, and queryhandlirig.
MDBSis
not a mere í'i
Ie management system. Th e ideas used
in designing
MOBS take the CCJDASYL Data Base Task Grcmp Report{Apri
l 71 ) as a sEart.ingpoint.
However" , 2'!DBG p1"cu/ ides man ymdditional
dala
struct.uring
and datamar)ip'Á!atioI1 f'eA:
ures that
are not-available
in
strictly
CODASYL datat.ase systems. MDBS
is
implementedentirely
in
machine language. For
eachappAication
system alogical
structure
oí" the data basemust
initially
bedefined;
that.is,
a f"orrnaldefinition
i
s madei
nwhich
th
erelationships
hetu'eenth
e data e1er,ientsis presented.
Ríitial!y
a user maylist
thevarious
data items(field
names)that
'ñ 'i l I be
involved in
aparticular
apptication.
The process c>f"def"ining
a
logical
datastructure
consists
of"grouping
data itemsinto
record
types ( o
r
,in conventional
data Kjrocessingterminology,
into
logical
files)
andindicating
appropriate
relationships
betweenrecord
types.
TheseTe|ationship3
areonly
conceptual and do notimply
anyphysical
storage allocation.
Nowhere ir. t:he use of' the data managernerít. systemdoes a user
refer
to
anactual
datastorage location,
butrather,
h erefers
t
o th e conceptualstructure
asinitially
defined.
Thi
sdefining
or
th e .datastructure
is
donevia
the DDL (Dataljef"init
ior':Language) and µr'ocessed by the program narííed MDBS. DDL.
e: COPYRIGHT 1979, 1980, Micro
MDBS Data Management System Documentation
Alter
thestructure
has beendefined
theapplication
programs t·:i
I l ,o f'
course,
needto
access dM:a from orplace
new dataluto
the ("íat.7.base. An
application
program cÍOé3not,
however, r"u3 zí ( or" "ii!" i t-a
:' t.hC'
desired
datadirectly
f"r
om ( or
t
o )t
'ne dat 3 bas e . l?1ste¿"('j. i t".requests
the data managementroutines
(MOW. D!d3)t
o p¿!rforY. t.h enecessary
operations.
This
requires
thewriter
o!" theapplicatio»
programs
to
knowonly
the conceptualstructure
of" the data base; th e"
OMSi
sresponsible
f^or
maintaining
th
e ph.ysi calstructür'e.
Th erequests to
the DMZ are madevia subroutine
c¿: .l l s whi
ch ma k e u;" ¿-icollection
o!7 commands cc'mpz"isir.g t.h e DMLPata
M3r:iµu!at.iori
Language) .
The
basic
MDB3 packageconsists
of" MDBG.DDL and ?.¢!3!32. CJMC . Ther·e
ar" e other",
very
useUi! , add—onsto
M!JB3-C'ccasior;a!ly,
it.
tiay becomenecessary
to
alter
thelogical
struc-t'-ire
OÍ ariexisting
dzz t. a base ,
The MDBS.DRE system
is
designeá U)permit
chemgesto
bE: made tcj 3 i.atabase
structure
without
the need Cc) dumpan d i'e-]c¿íci zhe da
t
3 base .Another add—on
is
!V1DBS. RTL which logsa
l!
transactions
made cr. j, ci-atníbase
since
thelast
data base backuµ. In the eventof
a syster,: crash ( e . g . , powerloss)
t
h e data base car. berestored
autotüat-ica!iy
byinvoking
arecovery
utility.
Athird
add-onis
MDBS.QRS whích acceptsEnglish—like,
rlonprocedur(3 Iqueries
and produccsdesired
r"eµort.s. Thiscuts
programmingeffort
substantial
ly.
Fu l idetai
Is about dt-he3e?
add-ons may be found
in
the MDBS.DRS. MDBS.RTL, and MIJBZ.QRG User sManuals.
MDBS Data Managemen'c System Documentation
I I .
?v!D!3S
..DDL
A
,
Int-roduction
Ir,
this
section,
we concF"r)trat.e orldicro
Data Ease Svs'um 's%' "Da i".aDescription
Ana.iyzer/'Editor
which we cal l MDBS.DDL(for
M,icro .3.ataBase System 's 3ata Descr"ipt.ion LanÉ"uage) .
In
Part
B welist
severa! features
or
MDBS. BOL whichzr
et
."iendescribed in
more det.ai- !i
nlater
sect:íons.
Iii
Sect.i.: m t": t.l?.e user"i
s]nstruc-ted
3ñ h ("w t-o " br
i
ng—up " MDBS. !JDL ; tb e i:
ind
o!'modif"icaticn"
Jhat can ba madeto t'ais
arealsa
descr Jbed.T c develop a data base
proper,
data base management c7ríc€pcs "irenecessary.
Ii' Section
I-J, wediscuss
such concepts and present. thedata
description
language (DDL)for
describing
a data basestructure.
The user mayalso
wantto
look aheadto Section
i
II
. !Jto
see how such conceK)t.s are used.To
create
a data base, the user mustfirst
describe
thestructure
Qr the data
using
the datadescription
!anE"uage (asdiscussed
i
r,Section
IJ ) and thenpnysical ly
initial
ize
the data basewith
theproper tables.
This is
a) ]. óone by the DDLana],yzer,/eaitor
whichis discussed in Section
E. The analyzer/editcr
permití:
t-nein?ut
,editing
and z-tza!ysis of" a datadescription.
© COPYRIGHT '1979, 1980, iQicro Data Base Systems, T
,;
MOBS Data Management System Documentation B
. Features
MDEIS.DDL
allows
the userto describe
a data bas estructure
anc!
initialize
a data ba s e. A data basestructure
is dcfined using
the data
description
language (DDL) . Suc h adescription
i
sentered
into
the computer(either
i
n lower or upper" case)via
theText Entry/Command mode of MDBS.DDL.
This
modesupports:
1. Textentry
2 -
Listing
3.
Deleting
4. Saving5 . Ret.r"ieving 6 . Renumbering
as
well
asproviding
formats
andother text
entry aids.
Once
entered,
the t.ext can beedited
using
th
e l ineeditor
or
MDBS . DDL.Finally,
th
e DDLanalyzer
processes a data
bas edescription
and,if
noerrors
aredetected,
initializes
a database. If"
a
syntactical
or logical
error
i"
detected,
anerror
message
is displayed
and the user canquickly
correct
the problemusing
thetext
entry
oredit
features.
MDBS
supports
thefol
lowingfeatures
for
data base design work:i
.Variable
and Í"ixedlength records.
2.
Character,
integer,
floating
point
(real),
logical,
internal
decimal,
externa!
decimal , andbinary
record
fields
(data items).
i4}L);2S Data i\áanagerne.nt System 'Doeumentat
i
on .-2, {jr-"--tc_íme, cm e—to—many , many_:ío—one , and many_to—
':'!2¿Fny s:€:t-
types.
E Sc :'Led
, '-IFO . FIFO , ne x
t
,prior.
andimmaterial
s e t: -:jrderZn,gs.5
. Automatic or manual
record insertion
into sets.
t":. Read and
write
accessprotection
via
passwordsat
" · 7 7
z-he
item, recora
ariaset levels
o eorganizat-ion.
m
O Record t.yp es may own
other
occurrences o'? the same'"'ecord- type (
i
. e . ,recursive
set".)
.e e T
8 . M""'ny reccmd t:ypes
can
Dart1cipat.e ín
a an í'éñset.
g , Fu-; l network datastructures.
These i'eatu.res are discussed
in Section
!1.A data base can be
physical ly
spread over a number of"drives
'"8maximum) an d the
drives
can befloppy
(mini—orful!— sized)
orhard
disks.
The data base
is organized using
a paging system. Asingle
drive
can
logically
contain
3191 pages an d a pagei
slogiealiy
restricted
to, at
most, 65536bytes.
Thuslarge
data bases can besupported
{subject
to
opermting systemconstraints
on thesize
of' afi
le).
Gnc:e a data- tú'íse descr i.pZion has been
entered
an d a data bas einitialized,
t
Fie user ear, ezzsi 'l,y access the data base through a
host lar)guz: gc ( ¿;uch as BASIC) us i-rig MDBS. DMS. In
Section
I I I wetake up the
discussion
of" í\'!DF3:;.
DMS.© CCTYRIGPÁ
MOBS Data Management System Documentation C.
Getting Started with
MDBS.DDL1.
initial
Loading and Test RunThe
details
specific
to
your systemfor
making aninitial
t.estof
the MDBS.DDL package areoutlined
in
the MDBS systemspecific
manualwhich
is
supplied
when 'Iou purchase the system.!2rief"\y.
youwill
execute program DDL (see the manual MDBS system
specific
manual f"'orits
f"ul!y qualifi-ed
name) whichwill
display:
MDBS.DDL VER X.X
(C) COPYRIGHT 1979, 1980, \'Jicro Data Base Systems,
Incorporated
Reg # XXXXXYour name and
address
At
this
point
you can read a sample data basedeseriptiorj
stored
in
file
INVNTRY(again
see the systemspecific
manualfor
thefully
qualified
name). The procedureis
shown below(underlined
text
is
generated by the MDBS.DDL system):1
This
example was used by M. Gagíe, G.Koehíer,
and A.B. Whi"nstonin
their article
"Data—Bame Systems And Micro—Computers: AnOverview",
published in
BYTE magazine.MDBS Data Management System Documentation
R "Read a
Fi le"
commandFILENA}j'"i computer prompt
INVNTRY
fully qualified
f"ile
name
for
INVNTRYTo
list
this
sampledescription
type"L".
Toactually
initialize
asmal l data basc·
with
this
description
type DDL.This
will
result
in
the prompt:
DATA-BASE FILENAME?
to
which you should respondwith
afully
qualified
file
name whichexists
onth
efirst
drive of
your system (use a temporaryfile
for
this
purpome). The datadescription
will
then bedisplayed
(without
line
numbers) and a data baseinitialized.
The complete sequence looks
like
DZ)L
"Enter
DDLAnalyzer"
commandDATA-BASF FILENAME? computer prompt
name
fully qualified f'ile
rame(DDL out,gut) computer generated
output
DDL PROCESSING CCJMPLETED
I r you have not had. a euecessf"ul run
, re—read
this
s gctic-F) and thesystem
specif'ic
manual andtry
again.
Ir
y oustill
have n o : uck ,please cal } Micro
Data Rase Systems, In c . Í"or
help.
© COFWRIGHT 1979,MDBS Data Management System Documentation
2.
Relocating
MW3S.DDLUnder some opera-ting systems,
it
may bedesiraiAe
to locate
MDBS.DDLat
aposition
other
thanthat supplied
byMicro
!J)aÜ EaseSystems. For
thi.s
purpose, we haveprovided
arelocatable
f"o""rr. oí' the—
data
description
analyzer
and arelocator
so that. anexecutable
formof the
analyzer
can be ORGedto
anyplace in
memory. Pleaserefer
to
the system
specific
manualfor further
information.
MDBS Data Managem'"nt System Documentation
3.
Important
Addresses:Personalizing
andPatching
MDBS.DDLMDBS.DDL
consists
of
a programregion
and work arearegion.
Theseare
contiguous
ancí the work areaimmediately follows
the program area.The
size of
the 'm:mk area can beincreased
or decreased through apatch
to
the sys em.There are
several
addressesthat
the usershould
be aware orin
MDBS.DDL. The user may
alter
these as shownin
the systemspecific
manual. A
brief
description
of" each itemfollows.
(a)
Initial
Entr;,'Point
Upon
entry
at
this
point,
all
programvariables
andregions
areeither
physically
orlogically
re—initialized.
Registers
are not saved but theentering
stack is preserved.
H:
j
I/O Entry Points
Dif"f"erent
operating
systems handleinput
andoutput to terminals,
printers
anddisks in
avariety
of
ways. To keepthis
manualfree
of
systemspecií"ics
theI/O inf"ormation relevant for
your sYstemis published in
the systemspecific
manual. Patchesto
non—standard.I/O
routines
should be madein
accordancewith
theinstruction"i
of
the systemspecific
manual...
(C) Echo Toggle
(Default
00 hex)This byte
is: checkedto
see if" the user wantsto
have MDBS.DDLecho
input
to
theoutput
device.
It
thebyte
valueis
zer~í,echoing
will
take place-
If
it
is
the value one, no echoingwill
be performed..
G COPYRIGHT 1979, 1980, Mie:-o
MDBS Data Management System Documentation
(d) Last Word
of
Memory (Def"ault OBFFF hex)Th e address
stored
heregives
thelast aval lable
word cjf memorythat
the MDBS.DDL program may use. Notethat
MDBS. ijDL uses a l !-V,
memory
starting
f'r
omi
ts
load address upto
t.he valuein this
field.
Needlessto
say, the user" should make surethat
lhe
!a s
t
--word
of
memoryis physical ly
beyondthe
end of the program. (e) ScreenControl
Byte(Default
OB hex)This
byte
should have one of" thefollowing
values:
Screen Width Byte Value
less than or equal
to
64 1 1 (OB hex)characters
greater
than or equal tCj 80 15 (OF hex)characters
64
to
80characters
pergreatest
irzteger less
line
(ca:
l
it
N) than cu" equalt-o :
N/5 -1
(t)
Re-entry Point
I f
th
e user wishest
o re—enter MDBS.DDL. whi le ;:'resen"vingal
].program
varimbles
andregions,
then he mustissue
a jumpto
th
j. s address.In
the next.section
wediscuss
the datadescript.ion
language. Th edata
description
langut-tge and í"eatures or a data bas edesign
ar
eillustrated
with
examples.MDBS Data Management System Documentation
D
. DDL (Data
Definition
Language) 1.
Introduction
3ñcÍDefinitions
The DDL i s used
t
oformally
describe
a conceptual(or logical)
structure
of
a data base. Thesedescriptions
arei
n terms ot
datai
terns ,record types,
andsets.
A DATA-ITEM
is
thesmallest unit
of
nameddata.
An ITEM—OCCURRENCEis
arepresentation
of
a value OÍ" adata--item.
( Eg . AGEi
3 a data—item,
and an a ge or 21 might be an occurrence of" AGE) A"repeating
,
. - . Iitem" acts
as a o?\é?—dimensionalarray
whose maximumrep! i-cation factor
must b e
specii"i
-i; a "depending on" item mayoptionally
bespecified
.~~N%~~~Nu
-
'f · .' . · ae··
'
-
u wewhich
indicates
the current. "len&th"
.,.QjL==La_rray. "A RECORD—TYPE
is
a namedcollection
of"zero,
on e , or
more data—items.
A RECORD-OCCURRENCEis
a samplingof values
of" thedata-items
\
def"ined
to
becontained
by the record—type. There may be an :":rbitrary
number
of occurrences in
the data base OÍ" each record—typesp'ecified.
No two record—types may have the same name. The data—itemnames mus
t
b e uniqueonly within
therecord-type.
(The same data—item name may be usedin
more tlían onerecord type.
) Theorder,
type
, an d
size
of"t
h e itemswithin
arecord
type aredefined in
therecord description.
Consider the f"ol lowing example
ot
arecord description:
RECORD EMPLOYEEITEM NUMBER INT 8
ITEM 7AME CHAR 20
ITEM !/1AGE REAL 8
ITEM "i'AX REAL 8
© COPYRIGHT 1979, 1980, Micro Data
MDBS Data Management System Documentation
The above example
defines
a record—type EMPLOYEEcontaining
r
ourdata-items:
NUMBER (employee number), NAME, WAGE (wages) and TAX
(taxes
withheld).
The "types "
or
th
e data—items 3r
einteger,
""Y
character,
rea l , andrea!,
respectively,
and NAMEis specified
to
be amaximum óf7 20
characters
in ler.gth.
Anoccurrence of
this
record—typemight be (1520
, A
B SMITH, 7520
. 20 , 158. 42) . There would be an
occurrence
tor
each employeein
the company."Record—type"
i
s usedi
ndef"ining
astructure
, and"record-occurrence"
i
s usedto reler
to
theactual
datavalues.
A group of"data values may make up a
record occurrence,
andthey
are sUmedusing
th
e nameof
the record—type and the namesof
the data—iten'.u.If
the namesof al
l ernployees aredesired (using
thedefinition
az"i
nth
eabove example) , the
application
program wouldrequest
of" th·:± DMS a! !--occurrences
of
t-he record—type EMPLOYEE and[
or
each on ei
t
wouldrequest
the occurrence(the value)
of" thedata-item
NAF-IE.A SET
i
s a namedrelationship
between record—types. One or morerecord—types are dec
lared
as the "owners" and one or more record—types ar edeclared
a sth
e "members"of
the set.. Any record—type may bedeclared
as the owner record—typeof
one or moresets;
liktt'".'ise
ror
member record—types. Aset
occurrence may have anarbiti"ary
r,umberof
occurrences
of
eachof
the record—types. The"set order" (the logical
order of
the memEerrecord occurrences)
must bedeclared.
Th e
set is
t.r'"basic struct.ural
unit
of" tlú" data base. I t"is
usedt
odefine
th
erelationship
betweendifferent.
recorA—2:.y;:'es. Inparticular,
theset links
ezch ownerrecord
occurrenceto
it-3related
© COPYRIGHT 1979, 1980, Micro Data Base Systems,
MDBS Data Management System Documentation
member
record occurrences.
This is best explained
through
examples. 2 . DDL ExampleA
simple
but c"ommon business problemis
the needto maintain
lists
of" people ororgcmizations
sorted in
diíferent
orders.
Considerth
ecase o í' a company which
maintains
lists
of" customers sort: od by name,address, and zi-p code. The !4DB2 s,y3tern handles
this
problemusing
thedat.a
structure
of'7i
gureII.D.
1. Theactual options avaiÁuble
f'or thedata
definition
" '"'edetai
ledi
nth
eremaining
portions
orthi
ssection.
Notet"mt only
onerecord
type (CUSTOMER) has beendefined,
while three sets
Oames, NUMBERS and ZIP) are shown. Therecord
typeSYSTEM, used as owner
in
thesesets,
is
aspecial
recorc'. predM"ined by KÍDBS.DDL whichpermits
accessto
datain
the data base. Thereis only
on einstance
of" t.he SYSTEM record—typein
the data base andthere is
no data associate.-iwith
t.hi
s record—type. Th e SYSTEMrecord
i
sdiscussed later
in this
section.
The CUSTOMER recc)[""d
t
ypecontains
a l ! the datare!aLing
to
acustomer. Data—item NUMBER
contains
the customer number" ,i
tem NAMEtb
e customer name , et
c . A l I of" the data—itemsstore g}]aracter data,
as
indicated
by the CHARspecification.
Th ei
ternsize
foilows
theword CHAR.
Th e use OT '¶:'2ree
sets is
the keyto maintaining
the customerfile
in three
differe
orders.
Th e MDBS. DMS system wi I lautomatically
insert
arecord
i
n the proper"location
in
eachof
thesethree sets
when the
record is created.
Notethat this
i
s alogical
construct
on l y —-- a
record is only physical ly present in
one
place.
By use of"e COPYRIGHT 1979, 1980, Micro Data Base Systems,
MDBS Data Management SysA: em Documentation
approprÑate DML conmands, a given
record
can be accessedeU"ícíent.iy,
o
r
, t: y use or
other
DML commands, asorted list.
oí' '"'ecords can beaccessed. Examples
of
such programs areii
iustrated
in Section
III.D.
A I i
three
sets
i
nFigure
II.D.
1 are SORTED. The"sort.
key"is
stated for
eachset
(NAMEfor set
NAMES,
et
c . ) an di
st!i
efield-defined
f"o
r
t
h eset to
besorted
upon. Each customer recc.rd occursonly
oncein
the data base,yet three logical
set orders exist..
There are
six allowable set
orders.
Besides SORTED , t'aere ar ealso:
FIFO —re\.ord
occurrences are addedto
the end oí" thc. set. suchtmt
each new rec- :,rd occurrence beccnneslogically
the ] ast
member o f' t:heset;
LIFO —record
occurrences are addedto
thef'ront
c ¿" theset
such t.hat each new
record
oc.:nírrence
becomeslogically
"L'jefirst
member of" the
set;
NEXT — a rú=wrecord
occurrenceis
ioi;ically
placed
in
theset
after
the"current"
memberrecord oí
theset ("current"
i
sdefined
i
nth
e DMLdiscussion)
; PRIOR — a newrecord occurrence is
logically
placed in
theset beíore
the"current."
Inem:,'jerrecord
of'th
eset;
an d IMMAT — the user does not care about the set"orúr.
Notethat
the IMMATset ordering al
lows the MDBS sy'U.emto
!^ea 1i-zecertain
ef"ficieneies
and shouk2 be usedif
possible.
In
th
e s et
description
of Figure II.D.1
thespecification
"AUTO"appears.
This indicates
that. as occurrences of"record
tyoe CU3TOI','!EF arecreated,
therecords
will
automatical ly
beinserted
in set
ONORDER by the MDBS system. The word "MAN"(for
manual)could also
;'"ñiíve beenspecified.
Theseoptions
ar e discussed fur-b-herin 3+ctio
iI!.IJ.5.
Also,
thespecification
"1: N"states that
therelationship
between theMDBS Data Management System Documentation
owner
of
the seb andits
membersis
a one—to—manyrelationship.
For each owner occurrencethere
may be many member"occurrences,
but
not
vise
versa.
Most data base systemssupport
only
this
typeof
relationship
—— a many—to—many (N: M)relationship
supported
by theMDBS system
is described in
thenext section.
0
Developing
the DDLfor
a data baseto
be usedin
the MOBS systemdoes
not require
any knowledgeof
t-he DML (Data Management Language). The user needsonly to define
the data basestructure;
the systemwill
take care
of
datastorage
andretrieval
for
application
programs.However, much
insight
will
be gainedir
the sect.iondescribing
the IJMLis
read(Section
III.D).
By seeing what commands areavailable,
it
will
beeasier to
understand howto
design the data base andestablish
set relationships.
Also,
theadditional
exampleswill
beextremely
helpful.
Our example of7
Figure
II.D.1
can be extendedto include
moreinf"ormation.
Supposethat
we wishto
keep arecord of orders
that
acustomer has
placed.
Conceptually,
each customer may haveseveral (or
one or even
zero) orders that
have beenplaced.
Eachorder
thoughis
associated
with
just
one customer. Thus we have whatis called
a"one—to—many"
structure
(one customerto
manyorders),
whichis
anatural
structure
for
a data baseset relationship.
Inorder to
extend the example
of Figure
II.D.1,
wederine
a secondrecord
typewhich
represents
a customerorder
(seeFigure
II.D.2).
or
course,to
actually
define
the complete DDLfor
this
example, we would add the newrecord descri.ption
after
thedescription
tor
the CUSTOMERrecord.
© COPYRIGHT 1979,
MOBS Data Management System Documentation
Note
that in record
type ORDER we have def"inedfive
da t-.a
items:
NUMBER(for
order
numb'zms), DATE
(order date)
, PART(the stock
rüsmberof
thepart ordered)
, QUANTITY(the quantity
ordered)
anti I"R'CE ( t.h einvoice
price).
Three of
t
h e data itemshold
chareíetar é-iata, but.QUANTITY and PRICE have data t','pes BIN
(Binary)
and REALrespectively.
QUANTITYi
sstored
as abinary
data itern t.c) r?duc-í-storage
requirement.s.
This is
reasonab!esince
QUANTI TYwill
n e v er
exceedÉ35535
i
nthis
application.
Th ebinary
dat-a typeis
usec2to
stcr·mintegral
values in binary
format.instead
of" the packed decimal format. c ommont
o mari y BASICs. Thedigit.
"2" aí't.er" BIP'indicate
-that
twobytes
should be a!located
t: ostore
t
h ebinary
va i l) e. Th e REALspecification
for
PRICEis
areal
number whose data ler,gt-.hi'
8bytes.
LOG(Logical)
and INT(Integer)
datatypes
arealso supported.
The
set
ONORDERlinks
each customert
o hi
sorders.
Th e s e t.ordering
i
s FIFO , s o tha,t
,[
or" each customer, theorders
will
bemaintained in
afirst—in,
first—out
basis,
whichwill
normally
beth
esequence
i
n whi.": h theorders
werereceived.
The new set-dE'3cription
would be added
to
the DDLafter all
therecord descripti
")ñ3 72Lregi'ieri.
MDBS Data Management System Documentation
RECORD CUSTOMER Customer
record
ITEM NUMBER CHAR 8 Customer number
ITEM NAME CHAR 20 Customer name
ITEM ADORERS CHAR 20
Street
addressITEM CITY CHAR ZD
City
ITEM ZIP-CVJE CHAR 5
Zip
codeSET NAMES AUTO
Í:
N Sorted by NameSORTED NAME OWNER SYSTEI'4
MEMBER CUSTC'"."ER
SET NUMBERS AUTO 1:N Sortcu"! by Number
SORTED NUMBER OWNER SYSTEid
MEMBER CUSTQÉIER
SET ZIP AUTO 1:N
Sorted
byZip
codeSGRTED ZIP-CODE OWNER SYSTEM
MEMBER CUSTCMER END
FIGURE
II.D.1
DDL
Declarations
for Multiply
Sorted
RecordsMDBS Data Management System Documentation
RECORD ORDER Custemer
orders
ITEM NUMBER CHAR 6 Order number
ITEM DATE CHAR 8 Date
received
ITEM PART CHAR 6
Part
number-ITEM QUANT'TY BIN 2
Quantity
orderedITEM PRICE REAL 8
Unit
costSET ONORDER MAN I : N
Link
customersFIFO
to orderc
OWNER CUSTOIW"R K!ENB"R ORDER
END
FIGURE
II.D.2
DDL
Declarations
for
Cu3toIner OrdersMOBS Data Management System Documentation 3 . Many—to—Many Examp) e
. t? t?
Standard (COñÁSYL) data base systems
require
a one—to—manyrelatiQric.hip
betweenth
e owner' and the membersof
aset üccurrence.
Thi"
restricticn
may fújrce the use of"unnatural
datastructures
. whi
c::"\complicates
DIVÍLprograms
unnecessari ly,
making the programharder to
conceptualize
anf7to maintain.
Theseunnatural
structures
r
e a Isoquite
ineff"icien"'"
i
n terms or
bothstorage
andprocessing.
As anexample, imagine .. computerized
bibliography
systemin
which we have booktitles
that
may beclassified
by a number oí" l'.ey\t.".jrds. We wishto
beable to obtain:
I)
Asorted
list
of" bookscorresponding
t.o a
given
keyword, a: "id, 2 ) A
sorted
list
of
keywords corr"c: ¿sponding t.o agiven book. Sinc"" each keyword
describes
many books, andsince
on ebook c an have severa' I keywords,
a many—to—many
relat.ion: íhip exists
between keywords nnd books.
If
we arerestricted
to standard
"one—to—many"sets,
w e woul d b eforced
t
ointrod'iíce
artificial
"link
records"
whi
eh are used f.osimulate
many—to—manysets in conventional
database systemm Theselink
records
force
usto
adopt ahighly
unnatural
,rest.ric'ted
dategstructure
which, Nríce thelink
records contain
no data , haslittle
conceptual
va !ue . A DDL (DataDescription
Language)descriptiori
of'such a
structure
is
shownin Figure II.D.3.
The
set relations
involved
are a l i one—to—manyrelationships
however, we mus
t
create
an occurrence of" reccu"d type LINKfor
eachbook—keyword
pair' in
our database. In a more complex example (such as whenauthors
a:" ·--'introduced),
theactual
datarelati'.mships
present.MOBS Data Management System Documentation
quicjcly
becomeunclear.
Anadditional
problemwith
this
structure
i
sthat
i
t
i
squite
dif1"icult
to maintain
asorted order
between the books and keywords.Also,
t
h e u s e or
link
records
results
i
n awastage
of
data basestorage
space..
Th e MOBS Data Management System
permits
explicit
useof
many-·to—many
sets.
Aspecial
internal
structure
is
used whicha!lowí:
the li'!I)BS fsystem
t
oautomc'tically
maintain
the data basepointers
necessaryto
represent
suchsets.
Thi
s meansthat
situations
such a sth
ebibliography
exai'üp} e can b econveniently
handled b yth
·2 schemadeclaration
of Figure II.D.4.
In the
declaration
for
set. S3, thespecification
of
a second s et
ordering
indicatc-s
that
t
h eset is
a many—to--manyset
anc"that
theowner
records
areto
bemaintained in sorted
order.
Thef'irst
setordering
speeif"ication
indicates
that
the members of" theset
arealso
to
bemaintained in
asorted order.
Notethat
this
feature al
lows oneto
either
rim all
keywordsfor
agiven
book or t.olist-
all
b