Skip to content

Commit af58af1

Browse files
fix deploy action
1 parent 0d17570 commit af58af1

File tree

2 files changed

+3
-74
lines changed

2 files changed

+3
-74
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ jobs:
4545
myst build --html
4646
4747
- name: Upload artifact for deployment
48+
if: github.ref == 'refs/heads/main'
4849
uses: actions/upload-pages-artifact@v3
4950
with:
5051
path: './book/_build/html'
52+
name: github-pages
5153
retention-days: 1 # save storage
5254

5355
deploy:

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

Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -560,80 +560,7 @@
560560
" ↓ ↓\n",
561561
" AuthorBook\n",
562562
"```\n",
563-
"\n",
564-
"In code:\n",
565-
"```python\n",
566-
"@schema\n",
567-
"class Author(dj.Manual):\n",
568-
" definition = \"\"\"\n",
569-
" author_id : int\n",
570-
" ---\n",
571-
" name : varchar(100)\n",
572-
" \"\"\"\n",
573-
"\n",
574-
"@schema\n",
575-
"class Book(dj.Manual):\n",
576-
" definition = \"\"\"\n",
577-
" isbn : varchar(13)\n",
578-
" ---\n",
579-
" title : varchar(200)\n",
580-
" \"\"\"\n",
581-
"\n",
582-
"@schema\n",
583-
"class AuthorBook(dj.Manual):\n",
584-
" definition = \"\"\"\n",
585-
" -> Author\n",
586-
" -> Book\n",
587-
" ---\n",
588-
" author_order : tinyint\n",
589-
" \"\"\"\n",
590-
"```\n",
591-
"\n",
592-
"**Features**:\n",
593-
"- No special notation for association table—looks like any other table\n",
594-
"- Thin solid lines indicate foreign keys are in primary key (cascading identity)\n",
595-
"- Top-to-bottom layout shows you can populate Author and Book first, then AuthorBook\n",
596-
"- Underlined names show Author and Book are independent dimensions\n",
597-
"\n",
598-
"### Key Observations\n",
599-
"\n",
600-
"1. **Cyclic vs. Acyclic**:\n",
601-
" - Traditional notations allow: `Employee ←→ Department ←→ Manager ←→ Employee` (cycle)\n",
602-
" - DataJoint requires: `Employee` → `Department` → `DepartmentManager` (acyclic)\n",
603-
"\n",
604-
"2. **Information Density**:\n",
605-
" - Crow's Foot shows more detail (nullable, optional)\n",
606-
" - DataJoint emphasizes structure and flow\n",
607-
" - Both require hovering/inspection for complete details\n",
608-
"\n",
609-
"3. **Semantic Meaning**:\n",
610-
" - Traditional: Focus on cardinality (how many)\n",
611-
" - DataJoint: Focus on identity cascade (how entities relate conceptually)\n",
612-
"\n",
613-
"4. **Reading Strategy**:\n",
614-
" - Crow's Foot: Examine each endpoint's symbols\n",
615-
" - DataJoint: Follow the line styles and direction\n",
616-
"\n",
617-
"### When Each Notation Excels\n",
618-
"\n",
619-
"**Use Chen's ER when**:\n",
620-
"- Doing initial conceptual modeling\n",
621-
"- Working with business stakeholders\n",
622-
"- Need to explicitly name relationships\n",
623-
"- Database implementation is secondary\n",
624-
"\n",
625-
"**Use Crow's Foot when**:\n",
626-
"- Documenting existing databases\n",
627-
"- Cardinality and optionality are critical\n",
628-
"- Working with DBAs familiar with this standard\n",
629-
"- Need to show all relationship details\n",
630-
"\n",
631-
"**Use DataJoint when**:\n",
632-
"- Designing scientific workflows\n",
633-
"- Primary key cascade matters for your queries\n",
634-
"- Working with hierarchical or time-series data\n",
635-
"- The DAG structure matches your domain (no cycles)\n",
636-
"- You want diagrams to be executable (code generates diagrams)"
563+
"\n"
637564
]
638565
},
639566
{

0 commit comments

Comments
 (0)