Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#lang racket
(require graphviz)
(define tables
`(("product" ("title"
"description"
"price"))
("category" ("title"
"description"))
("customer" ("firstname"
"lastname"
"address"))
("order" ("customer"
"status"
"shipping-method"
"comments"))
("lineitem" ("order"
"product"
"price"
"discount"))
("supplier" ("name"))))
(define relations
`(("product" "category" 'many 'many)
("order" "lineitem" 'one 'many)
("lineitem" "product" 'many 'one)
("order" "customer" 'many 'one)
("supplier" "order" 'one 'many)
("lineitem" "supplier" 'many 'one)))
(er-diagram tables relations)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment