You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/30-schema-design/055-normalization.md
+3-77Lines changed: 3 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,9 +179,7 @@ DataJoint takes a different, more intuitive approach to normalization that emerg
179
179
180
180
> **Every relation (table) must represent a well-defined entity type, and all attributes in that table must describe that entity type directly and only that entity type.**
181
181
182
-
This principle applies to both:
183
-
1.**Schema design** (the structure of your database tables)
184
-
2.**Query results** (the relations returned by queries)
182
+
This principle guides schema design, ensuring that each table represents a coherent entity type.
185
183
186
184
### What This Means in Practice
187
185
@@ -1225,78 +1223,6 @@ class StudentMajor(dj.Manual):
1225
1223
1226
1224
The `declaration_date` is not a property of the student or the major—it's a property of the relationship between them.
1227
1225
1228
-
## Normalization in Query Results
1229
-
1230
-
A unique aspect of DataJoint's normalization principle is that it applies to **query results**, not just schema design.
1231
-
1232
-
### Normalized Query Results
1233
-
1234
-
When you execute a query in DataJoint, the result should also represent a well-defined entity type:
1235
-
1236
-
**Example: Well-normalized query**
1237
-
1238
-
```python
1239
-
# Query result represents "students with their enrollment count"
0 commit comments