Skip to content

Commit

Permalink
adding notes about patient/person ids
Browse files Browse the repository at this point in the history
  • Loading branch information
ericbuckley committed Feb 6, 2025
1 parent 4d0ccfa commit a6c3cdc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/site/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ erDiagram
Patient ||--o{ BlockingValue : "has"
```

**Note**: Both the Person and Patient models include an `INT id` and a `UUID reference_id`
column. While either could serve as the primary key, using both provides optimization
benefits at the cost of additional storage.
The `INT id` column is designated as the primary key due to its smaller size, making it
more efficient for indexing and joining operations. However, using integers as user-facing
keys poses a security risk by potentially revealing the number of records in the database.
To address this, the `UUID reference_id` is used as a reference key, offering a secure way
to reference records without exposing the total record count.
In summary, `INT id` optimizes indexing and joins, while `UUID reference_id` is used
externally for secure record references.

---

## How These Models Work in the Algorithm
Expand Down

0 comments on commit a6c3cdc

Please sign in to comment.