Changeset 1549dae for docs/P1-ConceptualModel/wiki/ERModelAIUsage.md
- Timestamp:
- 09/29/26 20:55:13 (10 hours ago)
- Branches:
- main
- Parents:
- 0cee8ec
- File:
-
- 1 edited
-
docs/P1-ConceptualModel/wiki/ERModelAIUsage.md (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
docs/P1-ConceptualModel/wiki/ERModelAIUsage.md
r0cee8ec r1549dae 13 13 === Diagram === 14 14 15 `ERModel_v01.xml` / `ERModel_v01.png`. 15 Current version: `ERModel_v05.xml` / `ERModel_v05.png` (see session 5 below). First 16 version: `ERModel_v01.xml` / `ERModel_v01.png`. 16 17 17 18 '''Declaration of how the diagram was produced.''' The initial model is the … … 305 306 '''What I decided:''' to add the P7 structure to the ER model. The new elements are placed 306 307 automatically, so the layout can be tidied by hand in TerraER. 308 309 === Session 5 — 2026-09-29 (Claude Opus 5.5): v05, correction after review === 310 311 '''Prompt (student, excerpt):''' I pasted the reviewer's comments that `Holds` and `Contains` 312 are implemented differently in the database than in the model, with the suggestion to 313 "correct only the Phase 1 model so that it matches Phase 2", and asked: 314 315 > Can you take a look at this stuff? and fix them, but don't push anything just make the 316 > changes requested and try to explain it to me to see if you understand the problem with 317 > the solution 318 319 '''Response (AI, summarised):''' 320 321 * Explained that an M:N relationship has no identifier of its own, while `holdings` and `watchlist_items` each have an `id` primary key, so the database treats them as entity sets. 322 * Changed the model to v05. `Holdings` (`id`, `quantity`, `reserved_quantity`, derived `avg_price`, `created_at`, `updated_at`) and `WatchlistItems` (`id`, `added_at`) became entity sets, with the 1:N relationships `Holds`, `PositionIn`, `Contains` and `Lists`, each total on the new entity's side. The old relationship keys are now stated as uniqueness rules. The key descriptions no longer name foreign-key columns. 323 * Generated `ERModel_v05.xml` / `ERModel_v05.png` from scratch with TerraER 3.11's own figure classes and writer (adapted from the v01 generator), on a grid, with no overlapping attributes. It was verified by reading the file back with TerraER's reader (184 figures) and by inspecting the rendered PNG. 324 * Updated [wiki:ERModel] (v05 sections and history entry). 325 326 '''What I decided:''' to follow the reviewer's advice and change the model rather than the 327 database, since every later phase already uses the database as it is.
Note:
See TracChangeset
for help on using the changeset viewer.
