Database: Add Merise data models diagrams (MCD, MLD)#28
Merged
Conversation
Owner
ebouchut
commented
Jun 2, 2026
- Add Mocodo to generate Merise diagrams and include generated MCD and MLD diagrams - - Add a section about Merise database diagrams (MCD, MLD, MPD) to the contribution guide
- Add a Makefile with targets to build the database diagrams (mcd, mld, mpd)
Mocodo (a Python CLI tool) is used to generate the:
- MCD diagram in `docs/database/mcd/`
- MLD diagram in`docs/database/mld/`
Installation:
cd learn)dev
python -m pip pip # Run once
source venv/bin/activate # Run each time you start a new shell
pip install 'mocodo[svg,clipboard]'
Usage:
mocodo --input docs/database/mcd/learn-dev.mcd -t arrange --colors
brewer+
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Merise database modeling documentation and build automation so contributors can regenerate MCD/MLD/MPD artifacts from source definitions.
Changes:
- Add a Makefile to generate Merise diagrams (MCD/MLD/MPD) and Postgres DDL.
- Add Python tooling setup instructions for regenerating diagrams.
- Add Merise diagram documentation to the contribution guide and commit generated MCD/MLD artifacts.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents optional Python/tooling setup to regenerate Merise diagrams. |
| Makefile | Adds targets to generate MCD/MLD/MPD diagrams and DDL, plus a clean target. |
| docs/database/mcd/learn-dev.mcd | Adds the Mocodo source describing the conceptual data model (MCD). |
| docs/database/mcd/learn-dev.svg | Adds the generated MCD diagram (SVG). |
| docs/database/mcd/learn-dev_geo.json | Adds generated layout metadata for the MCD diagram. |
| docs/database/mld/learn-dev_mld.mcd | Adds the generated Mocodo MLD source (derived from the MCD). |
| docs/database/mld/learn-dev_mld.svg | Adds the generated MLD diagram (SVG). |
| docs/database/mld/learn-dev_mld.md | Adds the generated MLD as a Markdown list of relations. |
| docs/database/mld/learn-dev_mld_geo.json | Adds generated layout metadata for the MLD diagram. |
| docs/database/mld/learn-dev_geo.json | Adds additional generated layout metadata (for a related diagram). |
| CONTRIBUTING.md | Adds a Merise (MCD/MLD/MPD) overview and links to the diagrams. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+38
to
+43
| mpd: | ||
| @echo "Generating MPD from PostgreSQL Database..." | ||
| @mkdir -p docs/database/mpd | ||
| @test -n "$(TBLS_DSN)" || (echo "TBLS_DSN is required (e.g., postgres://user:pass@host:5432/dbname)" >&2; exit 1) | ||
| tbls doc "$(TBLS_DSN)" docs/database/mpd --force | ||
| @echo "MPD generated in docs/database/mpd/" |
Comment on lines
+1
to
+5
| { | ||
| "width": 551, | ||
| "height": 819, | ||
| "cx": [ | ||
| [ "EMAIL_TOKEN", 230 ], |
Comment on lines
+111
to
+114
| - Install Python on macOS | ||
| ```shell | ||
| brew install python@3.14 | ||
| ``` |
Comment on lines
+344
to
+347
| This section describes the data model using the progressive 3 diagrams | ||
| (MCD, MLD, and MPD) from the Merise methodology. | ||
| This gives a view from high-level conceptual model (MCD), logical model (MLD) to | ||
| physical model (MPD) with all the database details. |
Comment on lines
+127
to
+134
| - [ ] Install **[tbls](https://github.com/k1LoW/tbls#install)** | ||
| ```shell | ||
| # On macOS | ||
| brew install tbls | ||
|
|
||
| # or any OS with Go installed | ||
| go install github.com/k1LoW/tbls@latest | ||
| ``` |
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.