# saved from url
# http://www-cs.canisius.edu/PL_TUTORIALS/C++/EXAMPLES/MRD/TESTS2/DEMO1.script -->
% mrd
MRD> help
MRD> print
Name of existing relation: family2
MRD> select
Name of existing relation: family
Now you will enter one or more selection criteria.
Enter name of field to compare against: lastname
Enter comparison: = != < > <= >=
=
Enter the data to be used in comparison:
Azari
Another? (y/n) n
MRD> print
MRD> stats
Name of existing relation: family
What is the name of the field to summarize? age
MRD> print
Name of existing relation: states.txt
MRD> view
Name of existing relation:
MRD> join
Name of first relation: family
which field in this relation? city
Name of second relation: states
which field in this relation? city
MRD> print
Name of existing relation:
MRD> project
Name of existing relation:
Now enter one or more field names.
Put one space between field names.
Do not press return until all done.
firstname lastname city state
MRD> print
Name of existing relation:
MRD> number
Name of existing relation: family
MRD> print
Name of existing relation:
MRD> print
Name of existing relation: states2
MRD> unique
Name of existing relation: states2
MRD> print
Name of existing relation:
MRD> print
Name of existing relation: cityfun
MRD> project
Name of existing relation: cityfun
Now enter one or more field names.
Put one space between field names.
Do not press return until all done.
cityfun
MRD> print
Name of existing relation:
MRD> unique
Name of existing relation:
MRD> print
Name of existing relation:
MRD> sort
Name of existing relation: family
What is the name of the field to sort on? age
MRD> print
Name of existing relation:
MRD> sort
Name of existing relation: family
What is the name of the field to sort on? iq
MRD> print
Name of existing relation:
MRD> sort
Name of existing relation: family
What is the name of the field to sort on? lastname
MRD> print
Name of existing relation:
MRD> cross
Name of first relation: family
Name of second relation: currentyear
MRD> print
Name of existing relation:
MRD> print
Name of existing relation: fam2
MRD> add
Name of existing relation: fam2
firstname (string): Joe
lastname (string): Smith
age (integer): 80
city (string): Timbuktu
iq (float): 98.7
MRD> print
Name of existing relation: fam2
MRD> ls
MRD> new
What do you want to call the new relation? animals
Now you will define the fields. Later you can add records.
New field name (no spaces please): name
Is the data type c=charstring, i=int, d=floating point: c
What is the print width? 10
Another field? (y/n) y
New field name (no spaces please): numfeet
Is the data type c=charstring, i=int, d=floating point: i
What is the print width? 10
Another field? (y/n) y
New field name (no spaces please): color
Is the data type c=charstring, i=int, d=floating point: c
What is the print width? 6
Another field? (y/n) n
Now you can use the "add" command to add records.
MRD> quit