Help >
Example Database Definition
Version
7.11
The Data Base Definition
DATA BASE NAME IS EXAMPLE
Suppress GI
TD SETUP 1 RECORD
@ Field Name Type(Len) Comments
@ ---------- --------- --------
company x(30) @
cstreet x(30) @
cstreet2 x(15) @
ccity x(15) @
cstate x(2) @
TD CUSTOMERS 40 RECORDS
@ Field Name Type(Len) Comments
@ ----------- --------- --------
account x(6) @
:1 cust# x(6) key primary
name x(20) key @
street x(15) @
street2 x(15) @
city x(12) key @
state x(2) key @
zip x(5) key @
age n(3) key @
dob date @
hair_color x(10) key @
handed x(6) key @
discount n(1.2) @
year x(4) @
month x(2) @
status x(2) key @
county x(13) @
TD INVENTORY 50 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
item x(6) @
:1 item# x(6) key primary
description x(20) key @
type x(1) key @
mbcode x(1) key @
quan_on_hand n(4) @
unit_cost n(4.2) @
order_quan n(4) @
reordr_point n(3) @
cdescr doc @
TD SALES 5000 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
store# x(3) key @
item# x(6) key @
cust# x(6) key @
pdate date key @
:1 cnyr x(4) @
:2 cn x(2) @
:2 yr x(2) key @
:1 mo x(2) key @
:1 dy x(2) @
descr x(20) key @
quan_bot n(3) @
price n(4.2) @
stotal n(6.2) @
TD STATES 60 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
statenames x(16) key @
:1 state x(2) key primary
:1 padd x(1) @
:1 stname x(13) key @
TD VENDORS 20 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
vendor x(4) @
:1 vend# x(4) key primary
vname x(14) key @
street x(15) @
city x(12) @
state x(2) @
zip x(5) @
vtype x(14) @
contact x(18) @
phone x(12) @
:1 acode x(5) @
:1 pfx x(3) @
:1 nmbr x(4) @
TD ORDERS 300 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
order# x(6) key @
ostatus x(2) key @
vend# x(4) key @
:1 vend x(4) @
order_dt date @
promised_dt date @
delivery_dt date @
next_dt date @
TD LINEITEMS 300 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
order# x(6) key @
vend# x(4) key @
item# x(6) key @
:1 part x(6) @
desc x(15) @
otype x(4) key @
unit_cost n(4.2) @
quan_ordered n(4) @
file_dt date @
pflag x(1) @
seq x(6) key @
lstatus x(1) @
TD PARTS 70 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
part x(6) @
:1 part# x(6) key primary
pname x(15) key @
quan_on_hand n(4) @
unit_cost n(4.2) @
mb_code x(4) @
order_quan n(4) @
TD ASSEMBLIES 100 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
ass# x(6) key @
:1 partno x(6) @
part# x(6) key @
quan_reqd n(3) @
level n(2) @
equan n(4) @
tree x(6) key @
TD CATEGORIES 30 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
type x(1) key primary
category x(13) key @
TD HISTORY 400 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
item# x(6) key @
description x(20) key @
unit_cost n(4.2) @
category x(13) key @
mbcode x(1) key @
year x(4) key @
month x(2) key @
sold n(5) @
totals n(7.2) key @
TD LETTERS 40 RECORDS
@ FIELD NAME TYPE(LEN) COMMENTS
@ ---------- --------- --------
lid x(4) key @
letter memo @
dletter doc @
TD ARCHIVES 500 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
arch# x(3) key @
archdate x(8) @
archtime x(8) @
dsk# x(2) @
ndisks x(2) @
dcap x(4) @
fnm x(12) @
rc1 x(6) @
rc2 x(6) @
dgn x(12) @
TD SHADOW 10 RECORDS
@ Field Name Type(Len) Comments
@ ---------- --------- --------
xseq x(9) key @ Used to make order
@ lineitem assignments
@ exclusive
TD SCRATCH 5000 RECORDS TEMPORARY
@ Field Name Type(Len) Comments
@ ---------- --------- --------
tname x(12) @
maximum x(7) @
loaded x(7) @
active x(7) @
newmax x(7) @
pad x(55) @
rtype x(5) @
@ ***********************************************************************
@ UNIQUE clauses that help to "tune" structure space usage
@ ***********************************************************************
UNIQUE cust# sz(CUSTOMERS)*2
UNIQUE item# sz(INVENTORY)
UNIQUE state sz(STATES)
UNIQUE vend# sz(VENDORS)
UNIQUE type sz(CATEGORIES)
UNIQUE part# sz(PARTS)
UNIQUE name sz(CUSTOMERS)*0.9
UNIQUE arch# sz(ARCHIVES)*0.1
UNIQUE order# sz(ORDERS)*0.3
UNIQUE pdate sz(SALES)*0.6
UNIQUE city 25
UNIQUE status 10
UNIQUE age 90
UNIQUE rich 10
UNIQUE store# 20
UNIQUE year 20
UNIQUE yr 20
Unique description sz(INVENTORY)
Unique descr sz(INVENTORY)
UNIQUE mo 20
UNIQUE month 20
UNIQUE stname sz(STATES)
UNIQUE vname sz(VENDORS)
UNIQUE category sz(CATEGORIES)
UNIQUE pname sz(PARTS)
UNIQUE totals sz(HISTORY)
UNIQUE ass# sz(ASSEMBLIES)*0.5
UNIQUE order_dt sz(ORDERS)*0.3
UNIQUE tree sz(INVENTORY)*0.2
UNIQUE zip 40
UNIQUE hair_color 20
UNIQUE handed 10
UNIQUE mbcode 10
UNIQUE otype 10
UNIQUE xseq 5000