grid.newpage()
grid.box("book_table",
         c("ISBN", "title", "author", "pub"),
         x=.55,
         y=.7,
         primary="ISBN",
         foreign="pub")

grid.box("publisher_table",
         c("ID", "name", "country"),
         x=.85,
         y=.7,
         primary="ID")

grid.box("author_table",
         c("ID", "name", "gender"),
         x=.55,
         y=.3,
         primary="ID",
         foreign="gender")

grid.box("book_author_table",
         c("ID", "book", "author"),
         x=.2,
         y=.6,
         primary="ID",
         foreign=c("book", "author"))

grid.box("gender_table",
         c("ID", "gender"),
         x=.85,
         y=.3,
         primary="ID")

boxCurve("book_table", "publisher_table",
         "pub", "ID")
boxCurve("author_table", "gender_table",
         "gender", "ID")
boxCurve("book_author_table", "book_table",
         "book", "ISBN")
boxCurve("book_author_table", "author_table",
         "author", "ID",
         direction=c("right", "down"))

