Skip to content

Commit 7453db5

Browse files
clean up diagramming section
1 parent c7c51d6 commit 7453db5

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

book/20-concepts/01-relational.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,12 @@ erDiagram
244244
Entity-relationship diagram in Crow's Foot notation, including an explicit relationship set.
245245
:::
246246

247+
```{figure} ../images/employee-project-datajoint.svg
248+
:align: center
249+
250+
DataJoint diagram for the same design
251+
```
252+
247253

248254
# The DataJoint Model
249255
DataJoint solves a major dilemma in how relational databases are taught today [@10.48550/arXiv.1807.11104]

book/30-schema-design/035-diagrams.ipynb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,20 @@
6262
" definition = \"\"\"\n",
6363
" project_code : varchar(8)\n",
6464
" ---\n",
65-
" \"\"\""
65+
" project_title : varchar(50)\n",
66+
" start_date : date\n",
67+
" end_date : date\n",
68+
" \"\"\"\n",
69+
"\n",
70+
"@schema\n",
71+
"class Assignment(dj.Manual):\n",
72+
" definition = \"\"\"\n",
73+
" -> Employee\n",
74+
" -> Project\n",
75+
" ---\n",
76+
" percent_effort : decimal(4,1) unsigned\n",
77+
" \"\"\"\n",
78+
"\n"
6679
]
6780
},
6881
{

0 commit comments

Comments
 (0)