metodisering
This commit is contained in:
parent
fdc02cdfcc
commit
a771b49ca7
66
db.lisp
66
db.lisp
|
@ -4,40 +4,38 @@
|
||||||
|
|
||||||
(connect-toplevel "worblehat" "horace" "" "localhost")
|
(connect-toplevel "worblehat" "horace" "" "localhost")
|
||||||
|
|
||||||
(:create-table book
|
(defun create-tables ()
|
||||||
((isbn :type string :primary-key t)
|
(:create-table book
|
||||||
(title :type string)
|
((isbn :type string :primary-key t)
|
||||||
(year :type integer)
|
(title :type string)
|
||||||
(publisher :type string)
|
(year :type integer)
|
||||||
(udc :type string)
|
(publisher :type string)
|
||||||
(edition :type integer)
|
(udc :type string)
|
||||||
(picture :type string)
|
(edition :type integer)
|
||||||
(description :type (or db-null text))
|
(picture :type string)
|
||||||
(language :type string)
|
(description :type (or db-null text))
|
||||||
(review :type integer :unique t)
|
(language :type string)
|
||||||
(author :type integer :unique t))
|
(review :type integer :unique t)
|
||||||
(:foreign-key (review) (review id))
|
(author :type integer :unique t))
|
||||||
(:foreign-key (author) (author id)))
|
(:foreign-key (review) (review id))
|
||||||
|
(:foreign-key (author) (author id)))
|
||||||
(:create-table review
|
(:create-table review
|
||||||
((id :type integer :primary-key t :references (book :cascade :cascade))
|
((id :type integer :primary-key t :references (book :cascade :cascade))
|
||||||
(review :type text)
|
(review :type text)
|
||||||
(grade :type integer)
|
(grade :type integer)
|
||||||
(author :type string)))
|
(author :type string)))
|
||||||
|
(:create-table author
|
||||||
(:create-table author
|
((id :type integer :primary-key t :references (book :cascade :cascade))
|
||||||
((id :type integer :primary-key t :references (book :cascade :cascade))
|
(surname :type string)
|
||||||
(surname :type string)
|
(lastname :type string)))
|
||||||
(lastname :type string)))
|
(:create-table copy
|
||||||
|
((id :type integer :primary-key t)
|
||||||
(:create-table copy
|
(shelf :type string)
|
||||||
((id :type integer :primary-key t)
|
(rented :type boolean)
|
||||||
(shelf :type string)
|
(owner :type string)
|
||||||
(rented :type boolean)
|
(condition :type string)
|
||||||
(owner :type string)
|
(book :type string))
|
||||||
(condition :type string)
|
(:foreign-key (book) (book isbn))))
|
||||||
(book :type string))
|
|
||||||
(:foreign-key (book) (book isbn)))
|
|
||||||
|
|
||||||
|
|
||||||
;(defclass book ()
|
;(defclass book ()
|
||||||
|
|
Reference in New Issue