(with-open-file (out filename :direction :output :if-exist :supersede)
(with-standard-io-syntax
(print *db* out)))