Skip to content

Commit a2e55c9

Browse files
minor formatting
1 parent fd27042 commit a2e55c9

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

book/35-example-designs/050-languages-database.ipynb

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Languages Database Example\n",
7+
"# Example: Languages \n",
88
"\n",
99
"This example demonstrates a classic many-to-many relationship design using an association table. We'll track people and the languages they speak, along with their fluency levels.\n",
1010
"\n",
@@ -719,7 +719,7 @@
719719
},
720720
{
721721
"cell_type": "code",
722-
"execution_count": 8,
722+
"execution_count": null,
723723
"metadata": {},
724724
"outputs": [
725725
{
@@ -818,7 +818,7 @@
818818
},
819819
{
820820
"cell_type": "code",
821-
"execution_count": 9,
821+
"execution_count": null,
822822
"metadata": {},
823823
"outputs": [
824824
{
@@ -924,12 +924,14 @@
924924
],
925925
"source": [
926926
"# Query 4: Show the peole who speak at least four languages\n",
927-
"Person.aggr(Fluency, 'name', nlanguages='count(lang_code)', languages='GROUP_CONCAT(lang_code)') & 'nlanguages >= 4'"
927+
"Person.aggr(Fluency, 'name',\n",
928+
" nlanguages='count(lang_code)', languages='GROUP_CONCAT(lang_code)'\n",
929+
" ) & 'nlanguages >= 4'"
928930
]
929931
},
930932
{
931933
"cell_type": "code",
932-
"execution_count": 10,
934+
"execution_count": null,
933935
"metadata": {},
934936
"outputs": [
935937
{
@@ -1028,12 +1030,14 @@
10281030
],
10291031
"source": [
10301032
"# Query 5: Show the top 3 people by number of languages spoken\n",
1031-
"Person.aggr(Fluency, 'name', nlanguages='count(lang_code)') & dj.Top(3, order_by='nlanguages desc')"
1033+
"Person.aggr(Fluency, 'name',\n",
1034+
" nlanguages='count(lang_code)'\n",
1035+
" ) & dj.Top(3, order_by='nlanguages desc')"
10321036
]
10331037
},
10341038
{
10351039
"cell_type": "code",
1036-
"execution_count": 11,
1040+
"execution_count": null,
10371041
"metadata": {},
10381042
"outputs": [
10391043
{
@@ -1134,7 +1138,9 @@
11341138
"source": [
11351139
"# Query 6: Show all the people Lindsay Roman (person_id=7) can communicate wtih\n",
11361140
"\n",
1137-
"Person & (Fluency * Fluency.proj(other_person='person_id') & {'other_person': 7})\n"
1141+
"Person & (\n",
1142+
" Fluency * Fluency.proj(other_person='person_id') & {'other_person': 7}\n",
1143+
" )\n"
11381144
]
11391145
},
11401146
{

book/35-example-designs/060-management-hierarchy.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Management Hierarchy Example\n",
7+
"# Example: Management Hierarchy\n",
88
"\n",
99
"This example demonstrates self-referencing tables and hierarchical data structures, showing how to model organizational relationships where employees manage other employees. It also showcases the benefits of using lookup tables for normalized data design.\n",
1010
"\n",

0 commit comments

Comments
 (0)