diff --git a/make-cd.lisp b/make-cd.lisp
index e69de29..6e58eb3 100644
--- a/make-cd.lisp
+++ b/make-cd.lisp
@@ -0,0 +1,60 @@
+(defvar *db* nil)
+
+(defun make-item (&rest clauses)
+  clauses)
+
+(defun add-item (item)
+  (push item *db*))
+
+(defun dump-db ()
+  (dolist (item *db*)
+    (format t "~{~a: ~10t~a~%~}~%" item)))
+
+(defun prompt-read (prompt)
+  (format *query-io* "~a: " prompt)
+  (force-output *query-io*)
+  (read-line *query-io*))
+
+(defun prompt-for-cd ()
+  (make-item
+   :title
+   (prompt-read "Title")
+   (prompt-read "Artist")
+   (or (parse-integer (prompt-read "Rating") :junk-allowed t) 0)
+   (y-or-n-p "Ripped [y/n]: ")))
+
+
+(defun add-cds ()
+  (loop (add-item (prompt-for-cd))
+     (if (not (y-or-n-p "Another? [y/n]: "))
+         (return))))
+
+(defun save-db (filename)
+  (with-open-file (out filename
+                       :direction :output
+                       :if-exists :supersede)
+    (with-standard-io-syntax
+      (print *db* out))))
+
+(defun load-db (filename)
+  (with-open-file (in filename)
+    (with-standard-io-syntax
+      (setf *db* (read in)))))
+
+(defun select (selector-fn)
+  (remove-if-not selector-fn *db*))
+
+(defun make-comparison (field value)
+  `(equal (getf item ,field) ,value))
+
+(defun make-comparisons-list (fields)
+  (loop while fields
+       collecting (make-comparison (pop fields) (pop fields))))
+
+(defmacro where (&rest clauses)
+  `#'(lambda (item)
+       (and ,@(make-comparisons-list clauses))))
+
+(defun delete-rows (selector-fn)
+  (setf *db* (remove-if selector-fn *db*)))
+