docs/database: add some notes about elementId embeddings
All checks were successful
Build and test / build (push) Successful in 7m56s
All checks were successful
Build and test / build (push) Successful in 7m56s
This commit is contained in:
@@ -11,6 +11,8 @@ but it is easier to be able to refer to the entries without a composite foreign
|
||||
|
||||
(NOTE: `entryId` is now inferred from `elementId` within sqlite using a generated column, so saying it is "stored in a separate field" might be a stretch)
|
||||
|
||||
In addition, the reading element id's are added with `1000000000` to make them unique from the kanji element id's. This reduces the amount of space needed for indices in some locations, because you can simply filter out each part with `>` or `<`.
|
||||
|
||||
We used to generate the `elementId` separately from `orderNum` as a sequential id, but it lead to all values
|
||||
shifting whenever the data was updated, leading to very big diffs. Making it be a unique composite of data coming
|
||||
from the source data itself means that the values will be stable across updates.
|
||||
|
||||
Reference in New Issue
Block a user