no isPrimary
This commit is contained in:
parent
c1b90b9643
commit
a4a14828e8
1 changed files with 16 additions and 0 deletions
|
|
@ -134,6 +134,22 @@ Then `sudo sysctl -p` or restart Docker.
|
|||
|
||||
---
|
||||
|
||||
## Data Model
|
||||
|
||||
### Translations: no isPrimary column
|
||||
|
||||
WordNet synsets often have multiple lemmas per language (e.g. "dog", "domestic dog", "Canis familiaris"). An earlier design included an isPrimary boolean to mark which translation to display in the quiz.
|
||||
This was dropped because:
|
||||
|
||||
The schema cannot enforce a single primary per (term_id, language_code) with a boolean alone — multiple rows can be true simultaneously
|
||||
Fixing that requires either a partial unique index or application-level logic, both adding complexity for no MVP benefit
|
||||
The ambiguity can be resolved earlier and more cleanly
|
||||
|
||||
Decision: the Python extraction script picks one translation per language per synset at extraction time, taking the first lemma (WordNet orders lemmas by frequency). By the time data enters the database the choice is already made.
|
||||
The translations table carries a UNIQUE (term_id, language_code) constraint, which enforces exactly one translation per language at the database level. No isPrimary column exists.
|
||||
|
||||
---
|
||||
|
||||
## Current State
|
||||
|
||||
### Completed checkboxes (Phase 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue