      (get* @db table column value)))
 
 (defn delete* [db table m]
-  (assoc db table (reduce (fn [a [k v]]
-                            (update-in a [k] dissoc v))
-                          (db table)
-                          m)))
+  (update-in db [table] assoc
+             :data (reduce (fn [a [k v]]
+                             (update-in a [k] dissoc v))
+                           (get-in db [table :data])
+                           m)))
 
 (defn delete [table id]
   (dosync

     (alter db delete* table m))))

(defn put* [db table m]
  (assoc db table (reduce (fn [a [k v]]
                            (update-in a [k] assoc v m))
                          (db table)
                          m)))

(defn put [table m]
  (dosync


(defn get*
  ([db table]
     (vals (get-in db [table :data :id])))
  ([db table column value]
     (get-in db [table :data column value])))

(defn get
  ([table]
