(print (format nil "~%Beginning to store..~%")) (print (dbstore g1 ( (weight . 1) (height . 15) (sex . M) (univ . A) (year . 10) (age . 20) (salary . 1) (homestate . A) (married . Y) (kidnames . nil) )) ) (print (dbstore g2 ( (weight . 2) (height . 14) (sex . M) (univ . B) (year . 20) (age . 20) (salary . 2) (homestate . B) (married . N) (kidnames . nil) )) ) (print (dbstore g3 ( (weight . 3) (height . 13) (sex . M) (univ . C) (year . 30) (age . 20) (salary . 3) (homestate . C) (married . Y) (kidnames . nil) )) ) (print (dbstore c1 ( (weight . 4) (height . 12) (sex . F) (univ . A) (year . 40) (age . 30) (salary . 4) (homestate . A) (married . N) (kidnames . (c11 c12)) )) ) (print (dbstore c2 ( (weight . 5) (height . 11) (sex . F) (univ . B) (year . 40) (age . 30) (salary . 5) (homestate . B) (married . Y) (kidnames . nil) )) ) (print (dbstore c3 ( (weight . 6) (height . 10) (sex . F) (univ . C) (year . 30) (age . 30) (salary . 6) (homestate . C) (married . N) (kidnames . (c31)) )) ) (print (dbstore m1 ( (weight . 7) (height . 9) (sex . M) (univ . A) (year . 20) (age . 40) (salary . 7) (homestate . A) (married . Y) (kidnames . nil) )) ) (print (dbstore m2 ( (weight . 8) (height . 8) (sex . F) (univ . B) (year . 10) (age . 40) (salary . 8) (homestate . B) (married . N) (kidnames . nil) )) ) (print (dbstore m3 ( (weight . 9) (height . 7) (sex . M) (univ . C) (year . 10) (age . 40) (salary . 9) (homestate . C) (married . Y) (kidnames . nil) )) ) (print (dbstore l1 ( (weight . 10) (height . 6) (sex . F) (univ . A) (year . 20) (age . 20) (salary . 10) (homestate . A) (married . N) (kidnames . (l11 l12)) )) ) (print (dbstore l2 ( (weight . 11) (height . 5) (sex . M) (univ . B) (year . 30) (age . 20) (salary . 11) (homestate . B) (married . Y) (kidnames . nil) )) ) (print (dbstore l3 ( (weight . 12) (height . 4) (sex . F) (univ . C) (year . 40) (age . 20) (salary . 12) (homestate . C) (married . N) (kidnames . nil) )) ) (print (dbstore p1 ( (weight . 13) (height . 3) (sex . M) (univ . A) (year . 40) (age . 30) (salary . 13) (homestate . A) (married . Y) (kidnames . nil) )) ) (print (dbstore p2 ( (weight . 14) (height . 2) (sex . F) (univ . B) (year . 30) (age . 30) (salary . 14) (homestate . B) (married . N) (kidnames . (p21)) )) ) (print (dbstore p3 ( (weight . 15) (height . 1) (sex . M) (univ . C) (year . 20) (age . 30) (salary . 15) (homestate . C) (married . Y) (kidnames . (p31 p32 p33)) )) ) (print (format nil "~%Done storing~%")) (print (format nil "~%Inserting now.. all should be successful..~%")) (print (dbinsert g1 general)) (print (dbinsert g2 general)) (print (dbinsert g3 general)) (print (dbinsert c1 colonel)) (print (dbinsert c2 colonel)) (print (dbinsert c3 colonel)) (print (dbinsert l1 lieutenant)) (print (dbinsert l2 lieutenant)) (print (dbinsert l3 lieutenant)) (print (dbinsert m1 major)) (print (dbinsert m2 major)) (print (dbinsert m3 major)) (print (dbinsert p1 private)) (print (dbinsert p2 private)) (print (dbinsert p3 private)) (print (format nil "~%this insert shouldn't work..~%")) (print (dbinsert p36 private)) (print (format nil "~%Finding all with weight less than equals 9~%")) (print (findall (lep weight 9))) (print (format nil "~%Finding next with height 15~%")) (print (findnext (eqp height 15))) (print (format nil "~%and the next..~%")) (print (findnext (eqp height 15))) (print (format nil "~%and the next with height greater than 16 when none exist..~%")) (print (findnext (gep height 16))) (print (format nil "~%find the next in general..~%")) (print (findnextinset general (gep weight 0) )) (print (format nil "~%and the next..~%")) (print (findnextinset general t)) (print (format nil "~%and the next..~%")) (print (findnextinset general (gep weight 0))) (print (format nil "~%finding any with whatever.. should return g1..~%")) (print (findany (and (eqp univ A) (eqp salary 1)))) (print (format nil "~%finding a male lieutenant..~%")) (print (findanyinset lieutenant (eqp sex M))) (print (format nil "~%trying to delete a non-existent lieutenant~%")) (print (dbremove l10 lieutenant)) (print (format nil "~%should be able to remove l3 though..~%")) (print (dbremove l3 lieutenant)) (print (format nil "~%checking if still there in lieutenant..~%")) (print (findallinset lieutenant (gep weight 0))) (print (format nil "~%should not be gone from the officers list..~%")) (print (findall (gep weight 0))) (print (format nil "~%trying to delete non-existent officer..~%")) (print (dbdelete g5)) (print (format nil "~%this delete should remove both from officers and general..~%")) (print (dbdelete g3)) (print (format nil "check..check..~%")) (print (findall (gep weight 0))) (print (findallinset general (gep weight 0))) (print (format nil "~%colonel non-existent grows taller..~%")) (print (dbmodify c5 height 200)) (print (format nil "~%while c1 gets richer..~%")) (print (dbmodify c1 salary 300)) (print (findall (gep salary 20)))