metodisering
This commit is contained in:
6
db.lisp
6
db.lisp
@@ -4,6 +4,7 @@
|
||||
|
||||
(connect-toplevel "worblehat" "horace" "" "localhost")
|
||||
|
||||
(defun create-tables ()
|
||||
(:create-table book
|
||||
((isbn :type string :primary-key t)
|
||||
(title :type string)
|
||||
@@ -18,18 +19,15 @@
|
||||
(author :type integer :unique t))
|
||||
(:foreign-key (review) (review id))
|
||||
(:foreign-key (author) (author id)))
|
||||
|
||||
(:create-table review
|
||||
((id :type integer :primary-key t :references (book :cascade :cascade))
|
||||
(review :type text)
|
||||
(grade :type integer)
|
||||
(author :type string)))
|
||||
|
||||
(:create-table author
|
||||
((id :type integer :primary-key t :references (book :cascade :cascade))
|
||||
(surname :type string)
|
||||
(lastname :type string)))
|
||||
|
||||
(:create-table copy
|
||||
((id :type integer :primary-key t)
|
||||
(shelf :type string)
|
||||
@@ -37,7 +35,7 @@
|
||||
(owner :type string)
|
||||
(condition :type string)
|
||||
(book :type string))
|
||||
(:foreign-key (book) (book isbn)))
|
||||
(:foreign-key (book) (book isbn))))
|
||||
|
||||
|
||||
;(defclass book ()
|
||||
|
Reference in New Issue
Block a user