Skip to content

Database: Add Merise data models diagrams (MCD, MLD)#28

Merged
ebouchut merged 16 commits into
devfrom
chore/config-add_mocodo_to_generate_MCD_MLD
Jun 2, 2026
Merged

Database: Add Merise data models diagrams (MCD, MLD)#28
ebouchut merged 16 commits into
devfrom
chore/config-add_mocodo_to_generate_MCD_MLD

Conversation

@ebouchut
Copy link
Copy Markdown
Owner

@ebouchut 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)

ebouchut added 2 commits June 2, 2026 16:37
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+
Copilot AI review requested due to automatic review settings June 2, 2026 14:42
@ebouchut ebouchut self-assigned this Jun 2, 2026
@ebouchut ebouchut added documentation Improvements or additions to documentation enhancement New feature or request database dependencies labels Jun 2, 2026
@ebouchut ebouchut moved this to In Progress in learn-dev-project Jun 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread README.md
Comment thread README.md Outdated
Comment thread Makefile
Comment thread Makefile Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Copilot AI review requested due to automatic review settings June 2, 2026 17:04
@ebouchut ebouchut review requested due to automatic review settings June 2, 2026 17:04
Copilot AI review requested due to automatic review settings June 2, 2026 17:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 11 changed files in this pull request and generated 14 comments.

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md
Comment thread Makefile
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md Outdated
Copilot AI review requested due to automatic review settings June 2, 2026 19:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 11 changed files in this pull request and generated 6 comments.

Comment thread Makefile
Comment thread README.md Outdated
Comment thread README.md
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md
Comment thread CONTRIBUTING.md
Copilot AI review requested due to automatic review settings June 2, 2026 19:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 11 changed files in this pull request and generated 4 comments.

Comment thread README.md
Comment thread Makefile
Comment thread docs/database/mld/learn-dev_geo.json
Comment thread CONTRIBUTING.md
Copilot AI review requested due to automatic review settings June 2, 2026 19:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 11 changed files in this pull request and generated 7 comments.

Comment thread Makefile
Comment thread README.md
Comment thread README.md Outdated
Comment thread CONTRIBUTING.md
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread docs/database/mld/learn-dev_geo.json
Copilot AI review requested due to automatic review settings June 2, 2026 19:59
@ebouchut ebouchut merged commit 4463033 into dev Jun 2, 2026
2 checks passed
@ebouchut ebouchut deleted the chore/config-add_mocodo_to_generate_MCD_MLD branch June 2, 2026 19:59
@github-project-automation github-project-automation Bot moved this from In Progress to Done in learn-dev-project Jun 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 11 changed files in this pull request and generated 5 comments.

Comment thread Makefile
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 thread README.md
Comment on lines +111 to +114
- Install Python on macOS
```shell
brew install python@3.14
```
Comment thread CONTRIBUTING.md
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 thread README.md
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
```
@ebouchut ebouchut mentioned this pull request Jun 2, 2026
@ebouchut ebouchut linked an issue Jun 2, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

database dependencies documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add MCD and MLD Diagrams

3 participants